Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

IEEE 802.15.4 L2 APIs. More...

Data Structures

struct  ieee802154_security_ctx
 Interface-level security attributes, see section 9.5. More...
 
struct  ieee802154_context
 IEEE 802.15.4 L2 context. More...
 

Macros

#define IEEE802154_MAX_PHY_PACKET_SIZE   127
 Represents the PHY constant aMaxPhyPacketSize, see section 11.3.
 
#define IEEE802154_FCS_LENGTH   2
 Represents the frame check sequence length, see section 7.2.1.1.
 
#define IEEE802154_MTU   (IEEE802154_MAX_PHY_PACKET_SIZE - IEEE802154_FCS_LENGTH)
 IEEE 802.15.4 "hardware" MTU (not to be confused with L3/IP MTU), i.e.
 
#define IEEE802154_SHORT_ADDR_LENGTH   2
 IEEE 802.15.4 short address length.
 
#define IEEE802154_EXT_ADDR_LENGTH   8
 IEEE 802.15.4 extended address length.
 
#define IEEE802154_MAX_ADDR_LENGTH   IEEE802154_EXT_ADDR_LENGTH
 IEEE 802.15.4 maximum address length.
 
#define IEEE802154_NO_CHANNEL   USHRT_MAX
 A special channel value that symbolizes "all" channels or "any" channel - depending on context.
 
#define IEEE802154_BROADCAST_ADDRESS   0xffff
 Represents the IEEE 802.15.4 broadcast short address, see sections 6.1 and 8.4.3, table 8-94, macShortAddress.
 
#define IEEE802154_NO_SHORT_ADDRESS_ASSIGNED   0xfffe
 Represents a special IEEE 802.15.4 short address that indicates that a device has been associated with a coordinator but did not receive a short address, see sections 6.4.1 and 8.4.3, table 8-94, macShortAddress.
 
#define IEEE802154_BROADCAST_PAN_ID   0xffff
 Represents the IEEE 802.15.4 broadcast PAN ID, see section 6.1.
 
#define IEEE802154_SHORT_ADDRESS_NOT_ASSOCIATED   IEEE802154_BROADCAST_ADDRESS
 Represents a special value of the macShortAddress MAC PIB attribute, while the device is not associated, see section 8.4.3, table 8-94.
 
#define IEEE802154_PAN_ID_NOT_ASSOCIATED   IEEE802154_BROADCAST_PAN_ID
 Represents a special value of the macPanId MAC PIB attribute, while the device is not associated, see section 8.4.3, table 8-94.
 

Enumerations

enum  ieee802154_device_role { IEEE802154_DEVICE_ROLE_ENDDEVICE , IEEE802154_DEVICE_ROLE_COORDINATOR , IEEE802154_DEVICE_ROLE_PAN_COORDINATOR }
 

Detailed Description

IEEE 802.15.4 L2 APIs.

Since
1.0
Version
0.8.0

This API provides integration with Zephyr's sockets and network contexts. Application and driver developers should never interface directly with this API. It is of interest to subsystem maintainers only.

The API implements and extends the following structures:

Note
All section, table and figure references are to the IEEE 802.15.4-2020 standard.

Macro Definition Documentation

◆ IEEE802154_BROADCAST_ADDRESS

#define IEEE802154_BROADCAST_ADDRESS   0xffff

#include <zephyr/net/ieee802154.h>

Represents the IEEE 802.15.4 broadcast short address, see sections 6.1 and 8.4.3, table 8-94, macShortAddress.

◆ IEEE802154_BROADCAST_PAN_ID

#define IEEE802154_BROADCAST_PAN_ID   0xffff

#include <zephyr/net/ieee802154.h>

Represents the IEEE 802.15.4 broadcast PAN ID, see section 6.1.

◆ IEEE802154_EXT_ADDR_LENGTH

#define IEEE802154_EXT_ADDR_LENGTH   8

#include <zephyr/net/ieee802154.h>

IEEE 802.15.4 extended address length.

◆ IEEE802154_FCS_LENGTH

#define IEEE802154_FCS_LENGTH   2

#include <zephyr/net/ieee802154.h>

Represents the frame check sequence length, see section 7.2.1.1.

Note
Currently only a 2 byte FCS is supported although some PHYs (e.g. SUN, TVWS, ...) optionally support a 4 byte FCS. Needs to be changed once those PHYs should be fully supported.

◆ IEEE802154_MAX_ADDR_LENGTH

#define IEEE802154_MAX_ADDR_LENGTH   IEEE802154_EXT_ADDR_LENGTH

#include <zephyr/net/ieee802154.h>

IEEE 802.15.4 maximum address length.

◆ IEEE802154_MAX_PHY_PACKET_SIZE

#define IEEE802154_MAX_PHY_PACKET_SIZE   127

#include <zephyr/net/ieee802154.h>

Represents the PHY constant aMaxPhyPacketSize, see section 11.3.

Note
Currently only 127 byte sized packets are supported although some PHYs (e.g. SUN, MSK, LECIM, ...) support larger packet sizes. Needs to be changed once those PHYs should be fully supported.

◆ IEEE802154_MTU

#define IEEE802154_MTU   (IEEE802154_MAX_PHY_PACKET_SIZE - IEEE802154_FCS_LENGTH)

#include <zephyr/net/ieee802154.h>

IEEE 802.15.4 "hardware" MTU (not to be confused with L3/IP MTU), i.e.

the actual payload available to the next higher layer.

This is equivalent to the IEEE 802.15.4 MAC frame length minus checksum bytes which is again equivalent to the PHY payload aka PSDU length minus checksum bytes. This definition exists for compatibility with the same concept in Linux and Zephyr's L3. It is not a concept from the IEEE 802.15.4 standard.

Note
Currently only the original frame size from the 2006 standard version and earlier is supported. The 2015+ standard introduced PHYs with larger PHY payload. These are not (yet) supported in Zephyr.

◆ IEEE802154_NO_CHANNEL

#define IEEE802154_NO_CHANNEL   USHRT_MAX

#include <zephyr/net/ieee802154.h>

A special channel value that symbolizes "all" channels or "any" channel - depending on context.

◆ IEEE802154_NO_SHORT_ADDRESS_ASSIGNED

#define IEEE802154_NO_SHORT_ADDRESS_ASSIGNED   0xfffe

#include <zephyr/net/ieee802154.h>

Represents a special IEEE 802.15.4 short address that indicates that a device has been associated with a coordinator but did not receive a short address, see sections 6.4.1 and 8.4.3, table 8-94, macShortAddress.

◆ IEEE802154_PAN_ID_NOT_ASSOCIATED

#define IEEE802154_PAN_ID_NOT_ASSOCIATED   IEEE802154_BROADCAST_PAN_ID

#include <zephyr/net/ieee802154.h>

Represents a special value of the macPanId MAC PIB attribute, while the device is not associated, see section 8.4.3, table 8-94.

◆ IEEE802154_SHORT_ADDR_LENGTH

#define IEEE802154_SHORT_ADDR_LENGTH   2

#include <zephyr/net/ieee802154.h>

IEEE 802.15.4 short address length.

◆ IEEE802154_SHORT_ADDRESS_NOT_ASSOCIATED

#define IEEE802154_SHORT_ADDRESS_NOT_ASSOCIATED   IEEE802154_BROADCAST_ADDRESS

#include <zephyr/net/ieee802154.h>

Represents a special value of the macShortAddress MAC PIB attribute, while the device is not associated, see section 8.4.3, table 8-94.

Enumeration Type Documentation

◆ ieee802154_device_role

#include <zephyr/net/ieee802154.h>

Enumerator
IEEE802154_DEVICE_ROLE_ENDDEVICE 
IEEE802154_DEVICE_ROLE_COORDINATOR 
IEEE802154_DEVICE_ROLE_PAN_COORDINATOR