Figure: Cutecom application capturing Waspmote's output
Linux Sniffer
As well as using the terminal to see the sensor information, an application which allows this captured data to be dumped to a
file or passed to another program to be used or checked has been developed.
File:
"sniffer.c"
Compilation on Meshlium:
gcc sniffer.c -o sniffer
Examples of use:
-
Seeing received data:
-
Dumping of received data to a file:
-
Passing received values to another program:
Note: the speed used for the example is 19200 baud. The final speed will depend on the speed the XBee module has been configured
with (default value 115200).
Code:
#include
#include
#include
#include
#include
#include
./sniffer USB0
./sniffer USB0 >> data.txt
./sniffer USB0 | program
<stdio.h>
<string.h>
<unistd.h>
<fcntl.h>
<errno.h>
<stdlib.h>
-137-
Interacting with Waspmote
v6.3
Need help?
Do you have a question about the Waspmote and is the answer not in the manual?