Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

ng_sniffer: added ng version of sniffer application #6

Merged
merged 1 commit into from
Jun 2, 2015

Conversation

haukepetersen
Copy link
Contributor

This is the adaption of the existing sniffer application to work with the new network stack.

This PR works so far only with at86rf2xx drivers, e.g. with the iot-lab_M3 or the samr21-xpro boards.

export ATRF_RESET ?= GPIO_6
export ATRF_SLEEP ?= GPIO_7
export ATRF_SPI_SPEED ?= SPI_SPEED_1MHZ
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be done somewhere in board?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yap, but at the moment we do not have a concept for initilizing the network devices in a structured manner yet

@OlegHahm
Copy link
Member

OlegHahm commented May 1, 2015

After RIOT-OS/RIOT#2891 is merged this can be adapted, right?

@haukepetersen
Copy link
Contributor Author

I rather wait for the outcome of RIOT-OS/RIOT#2901...

@haukepetersen
Copy link
Contributor Author

Or not... at least this PR is temporarily adapted.

@PeterKietzmann
Copy link
Member

Needs rebase after #2881 was merged. Right?

@miri64
Copy link
Member

miri64 commented May 27, 2015

Needs adaption:

diff --git a/ng_sniffer/Makefile b/ng_sniffer/Makefile
index 7be6e88..e93353d 100644
--- a/ng_sniffer/Makefile
+++ b/ng_sniffer/Makefile
@@ -9,6 +9,9 @@ RIOTBASE ?= $(CURDIR)/../../RIOT

 # Define modules that are used
 USEMODULE += ng_netif
+USEMODULE += ng_nomac
+USEMODULE += ng_at86rf2xx
+USEMODULE += auto_init_ng_netif
 USEMODULE += uart0
 USEMODULE += shell
 USEMODULE += shell_commands
diff --git a/ng_sniffer/main.c b/ng_sniffer/main.c
index c59eb17..6e82dc3 100644
--- a/ng_sniffer/main.c
+++ b/ng_sniffer/main.c
@@ -21,8 +21,7 @@

 #include <stdio.h>

-#include "board.h"
-#include "kernel.h"
+#include "thread.h"
 #include "hwtimer.h"
 #include "shell.h"
 #include "shell_commands.h"
@@ -38,12 +37,12 @@
 /**
  * @brief   Priority of the RAW dump thread
  */
-#define RAWDUMP_PRIO            (PRIORITY_MAIN - 1)
+#define RAWDUMP_PRIO            (THREAD_PRIORITY_MAIN - 1)

 /**
  * @brief   Stack for the raw dump thread
  */
-static char rawdmp_stack[KERNEL_CONF_STACKSIZE_MAIN];
+static char rawdmp_stack[THREAD_STACKSIZE_MAIN];

 /**
  * @brief   Make a raw dump of the given packet contents

@haukepetersen haukepetersen changed the title ng_sniffer: added ng version of sniffer application [WIP] ng_sniffer: added ng version of sniffer application Jun 2, 2015
@haukepetersen
Copy link
Contributor Author

adapted and removed the WIP. Should I squash?

@miri64
Copy link
Member

miri64 commented Jun 2, 2015

ACK, please squash

@haukepetersen
Copy link
Contributor Author

squashed.

@haukepetersen
Copy link
Contributor Author

and go!

haukepetersen added a commit that referenced this pull request Jun 2, 2015
ng_sniffer: added ng version of sniffer application
@haukepetersen haukepetersen merged commit ccf7f23 into RIOT-OS:master Jun 2, 2015
@haukepetersen haukepetersen deleted the ng_sniffer branch June 2, 2015 12:55
chrysn pushed a commit to chrysn-pull-requests/RIOT that referenced this pull request Sep 20, 2022
ng_sniffer: added ng version of sniffer application
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants