All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Socket-based ZEP

UDP socket-based IEEE 802.15.4 device over ZEP More...

Detailed Description

UDP socket-based IEEE 802.15.4 device over ZEP

See also
ZigBee Encapsulation Protocol for protocol definitions

This ZEP implementation can send a dummy HELLO packet on startup. This is used to make dispatchers aware of the node. To enable this behavior, add

USEMODULE += socket_zep_hello

to your Makefile.

A ZEP dispatcher can just drop those packets (ZEP type 0xFF) if it chooses to parse the ZEP header.

The header of the HELLO packet will look like this:

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Preamble (EX)         |  Version (2)  |  Type  (255)  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                                                               +
|                                                               |
+                         Reserved (0)                         +
|                                                               |
+                                                               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |      'H'      |      'E'      |      'L'      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      'L'      |      'O'      |       0       |       0       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       0       |       0       |       0       |       0       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Files

file  socket_zep.h
 Socket ZEP definitions.
 
file  socket_zep_params.h
 Configuration parameters for the Socket-based ZEP driver.
 

Data Structures

struct  socket_zep_params_t
 ZEP device initialization parameters. More...
 
struct  socket_zep_t
 ZEP device state. More...
 

Macros

#define SOCKET_ZEP_MAX   (1)
 Number of allocated parameters at socket_zep_params.
 

Enumerations

enum  zepdev_state_t { ZEPDEV_STATE_IDLE , ZEPDEV_STATE_RX_ON , ZEPDEV_STATE_RX_RECV , ZEPDEV_STATE_TX }
 ZEP device RX state. More...
 

Functions

void socket_zep_setup (socket_zep_t *dev, const socket_zep_params_t *params)
 Setup socket_zep_t structure.
 
void socket_zep_cleanup (socket_zep_t *dev)
 Cleanup socket resources.
 
void socket_zep_hal_setup (socket_zep_t *dev, ieee802154_dev_t *hal)
 Setup socket ZEP in order to be used with the IEEE 802.15.4 Radio HAL.
 

Variables

socket_zep_params_t socket_zep_params [SOCKET_ZEP_MAX]
 socket_zep configurations
 

Macro Definition Documentation

◆ SOCKET_ZEP_MAX

#define SOCKET_ZEP_MAX   (1)

Number of allocated parameters at socket_zep_params.

Note
This was decided to only be confiruable on compile-time to be more similar to actual boards

Definition at line 35 of file socket_zep_params.h.

Enumeration Type Documentation

◆ zepdev_state_t

ZEP device RX state.

Enumerator
ZEPDEV_STATE_IDLE 

ZEP is not doing anything, not receiving frames.

ZEPDEV_STATE_RX_ON 

ZEP is able to receive frames.

ZEPDEV_STATE_RX_RECV 

unprocessed frame is in RX buffer, rx stopped

ZEPDEV_STATE_TX 

ZEP is currently sending a frame.

Definition at line 83 of file socket_zep.h.

Function Documentation

◆ socket_zep_cleanup()

void socket_zep_cleanup ( socket_zep_t * dev)

Cleanup socket resources.

Parameters
devthe socket_zep device handle to cleanup

◆ socket_zep_hal_setup()

void socket_zep_hal_setup ( socket_zep_t * dev,
ieee802154_dev_t * hal )

Setup socket ZEP in order to be used with the IEEE 802.15.4 Radio HAL.

Parameters
[in]devpointer to the socket ZEP instance
[in]halpointer to the HAL descriptor associated to the device

◆ socket_zep_setup()

void socket_zep_setup ( socket_zep_t * dev,
const socket_zep_params_t * params )

Setup socket_zep_t structure.

Parameters
[in]devthe preallocated socket_zep_t device handle to setup
[in]paramsinitialization parameters