Loading...
Searching...
No Matches
openwsn_radio.h File Reference

RIOT adaption of the "radio" bsp module definitions. More...

Detailed Description

RIOT adaption of the "radio" bsp module definitions.

The radio adaptation runs in an own thread with the highest priority (THREAD_PRIORITY_MAIN - 4) and maps to RIOT's netdev API.

Hardware MAC layer features such as CSMA/CA, ACK handling and retransmissions are handled by OpenWSN, so the radio driver must support disabling AUTOACK and CSMA handling by the hardware. Frame filtering must as well be disabled.

The radio adaptation preloads the buffer so NETOPT_PRELOADING must be supported.

OpenWSN needs to be notified when a frame reception/transmission stats and when it ends. Therefore radio drivers need to support the following netdev events:

- `NETDEV_EVENT_RX_STARTED`
- `NETDEV_EVENT_TX_STARTED`
- `NETDEV_EVENT_RX_COMPLETE`
- `NETDEV_EVENT_TX_COMPLETE`

OpenWSN expects to recover crc information on every received frame even if it will simply drop frames with invalid crc. The stack can function correctly if radio drivers automatically drop frames with an invalid crc (i.e. the stack doesn't get notified about these frames), but it might print the following error if using openwsn_serial:

  • [IEEE802154E] wdDataDuration overflows while at state 19 in slotOffset 0
Author
Peter Kietzmann peter.nosp@m..kie.nosp@m.tzman.nosp@m.n@ha.nosp@m.w-ham.nosp@m.burg.nosp@m..de, April 2019
Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr

Definition in file openwsn_radio.h.

#include "net/netdev.h"
#include "net/ieee802154/radio.h"
+ Include dependency graph for openwsn_radio.h:

Go to the source code of this file.

Data Structures

struct  openwsn_radio_t
 OpenWSN radio variables structure. More...
 
int openwsn_radio_init (void *radio_dev)
 Initialize OpenWSN radio.
 

Function Documentation

◆ openwsn_radio_init()

int openwsn_radio_init ( void *  radio_dev)

Initialize OpenWSN radio.

Parameters
[in]radio_devpointer to a dev interface
Returns
PID of OpenWSN thread
-1 on initialization error