-
Notifications
You must be signed in to change notification settings - Fork 21
Firefly as a Sniffer
This application is used to have a look of all the information about packets sent between devices.
In this case is used for IEEE 802.15.4 2.4GHz band
To build the application you will need:
- Zolertia Firefly
- At least one IEEE.802.15.4 2.4GHz device
Install Wireshark.
Install the Zolertia toolchains and tools if you don't have it.
Create a folders for contiki e.g. on Desktop/Desktop$ mkdir contikiOS
Now clone the contikiOS repository, update using/contikiOS$ git submodule update --init
Once downloaded, go to the directory: /contiki/examples/sensniff$
Edit the project-conf.h, adding this lines. Remember to change the PANID and the channel to the ones you have configured previously.
#undef IEEE802154_CONF_PANID
#define IEEE802154_CONF_PANID 0xABCD
/* The following are Zoul (RE-Mote, etc) specific */
#undef CC2538_RF_CONF_CHANNEL
#define CC2538_RF_CONF_CHANNEL 26
Now we burn the program on Firefly /contiki/examples/sensniff$ make TARGET=zoul BOARD=firefly sensniff.upload
After this, we need to open the Python script that convert the Firefly serial to a wireshark format: /contiki/tools/sensniff$
We execute the python and the terminal will be similar to:
/contiki/tools/sensniff$ python sensniff.py -d /dev/ttyUSB0
Commands:
c: Print current RF Channel
m: Print Min RF Channel
M: Print Max RF Channel
n: Trigger new pcap header before the next frame
h,?: Print this message
<number>: Change RF channel.
q: Quit
Sniffing in channel: 26
Execute Wireshark: sudo wireshark -i /tmp/sensniff
and inicialialice /tmp/sensniff
Configure the protocol IEEE 802.15.4
If any device transmit over radio with parameter configured previously Firefly will captured it and transferred to Wireshark like this.
- Get the Code
- Toolchain and tools
- Getting Started with Zolertia products
- Change to SubGHZ interface
- Program the Zolertia platforms
- Configure Eclipse (IDE)
- Firefly as a Sniffer
- Sensors