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...
 

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.
 

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