
-109-
v8.6
Interacting with Waspmote
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 Linux:
gcc sniffer.c -o sniffer
Examples of use:
-
Seeing received data:
./sniffer USB0
-
Dumping of received data to a file:
./sniffer USB0 >> data.txt
-
Passing received values to another program:
./sniffer USB0 | program
Note:
The speed used for the example is 19200 bps. The final speed will depend on the speed the XBee module has been
configured with (default value 115200).
Code:
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>