Radio Sniffer Agent¶
IoT-LAB MQTT Radio Sniffer agent¶
Radio Sniffer Agent provides access to the IoT-LAB nodes radio sniffer.
Packets are encapsulated as pcap (wireshark:pcap).
Radio Sniffer agent base topic:
{prefix}/iot-lab/radiosniffer/{site}
Every topics from radio sniffer agent topics start by this topic prefix
| param prefix: | configured prefix |
|---|---|
| param site: | site where the agent is run |
Topics Summary¶
| Topic | Type | |
|---|---|---|
| Radio sniffer agent | ||
{prefix}/iot-lab/radiosniffer/{site} |
||
{snifferagenttopic}/error/ |
Error | |
{snifferagenttopic}/ctl/stopall |
Request | |
| Node | ||
{snifferagenttopic}/{archi}/{num}/ctl/stop |
Request | |
| Raw packet sniffer | ||
{snifferagenttopic}/raw/ctl/header |
Request | |
{snifferagenttopic}/{archi}/{num}/raw/ctl/start |
Request | |
{snifferagenttopic}/{archi}/{num}/raw/ctl/stop |
Request | |
{snifferagenttopic}/{archi}/{num}/raw/data |
Output
|
|
Radio sniffer Agent global topics¶
Error Topic¶
Asynchronous error messages are posted to error topic. Failure on requests are not duplicated here.
{snifferagenttopic}/error/
For format see: Error topic
Stop all redirections¶
Stop all started sniffer.
stopall request: |
||
|---|---|---|
| Topic: | {snifferagenttopic}/ctl/stopall |
|
| Message | Topic | Payload |
| Request | {topic}/request/{clientid}/{requestid} | empty |
| Reply | {topic}/reply/{clientid}/{requestid} | empty or error_msg |
Node topics¶
Stop sniffer¶
Stop given node sniffer.
stop request: |
||
|---|---|---|
| Topic: | {snifferagenttopic}/{archi}/{num}/ctl/stop |
|
| Message | Topic | Payload |
| Request | {topic}/request/{clientid}/{requestid} | empty |
| Reply | {topic}/reply/{clientid}/{requestid} | empty or error_msg |
Raw packet sniffer¶
Topics to access to the node sniffer in raw packet mode.
Sniffer listen to all radio packets on a given channel.
It must first be started in raw mode to have the raw packet output.
Global pcap header must be queried independently first.
| param channel: | 802.15.4 channel between 11 and 26 |
|---|
Start sniffer in raw mode¶
Start one node sniffer in raw mode on given channel.
raw/start request: |
||
|---|---|---|
| Topic: | {snifferagenttopic}/{archi}/{num}/raw/ctl/start |
|
| Message | Topic | Payload |
| Request | {topic}/request/{clientid}/{requestid} | Channel string |
| Reply | {topic}/reply/{clientid}/{requestid} | empty or error_msg |
Stop raw sniffer¶
Equivalent to Stop sniffer adde here for completeness
raw/stop request: |
||
|---|---|---|
| Topic: | {snifferagenttopic}/{archi}/{num}/raw/ctl/stop |
|
| Message | Topic | Payload |
| Request | {topic}/request/{clientid}/{requestid} | empty |
| Reply | {topic}/reply/{clientid}/{requestid} | empty or error_msg |
RAW packet sniffer PCAP global header¶
PCAP format consists of two main parts, a global header, then messages with a per message header: wireshark:pcap
This request returns the global header for raw mode.
raw/header request: |
||
|---|---|---|
| Topic: | {snifferagenttopic}/raw/ctl/header |
|
| Message | Topic | Payload |
| Request | {topic}/request/{clientid}/{requestid} | empty |
| Reply | {topic}/reply/{clientid}/{requestid} | Global pcap header |
Raw packet sniffer¶
Sniffer sends 802.15.4 raw radio frames encapsulated as pcap.
One sniffed packet is sent by message. PCAP payload format is:
Packet PCAP Header | Packet data
PCAP Header contains:
:4 bytes: Timestamp seconds
:4 bytes: Timestamp microseconds
:4 bytes: Number of octet saved
:4 bytes: Actual lengt of packet
| 802.15.4 RAW sniffer channel | ||
|---|---|---|
| Topic: | {snifferagenttopic}/{archi}/{num}/raw/data |
|
| Message | Topic | Payload |
| Output | {topic}/out | PCAP packet |