IEEE 802.15.4¶
Overview¶
IEEE 802.15.4 is a technical standard which defines the operation of low-rate wireless personal area networks (LR-WPANs). For more detailed overview of this standard, see this IEEE 802.15.4 Wikipedia article.
Zephyr supports IEEE 802.15.4 with Thread and 6LoWPAN. The Thread implementation is based on OpenThread. The IPv6 header compression in 6LoWPAN is shared with the Bluetooth IPSP (IP support profile).
API Reference¶
IEEE 802.15.4¶
-
group
ieee802154
IEEE 802.15.4 library.
Defines
-
IEEE802154_MAX_ADDR_LENGTH
¶
-
IEEE802154_NO_CHANNEL
¶
-
IEEE802154_L2_CTX_TYPE
¶
-
IEEE802154_AR_FLAG_SET
¶
Enums
Functions
-
static bool
ieee802154_is_ar_flag_set
(struct net_buf *frag)¶ Check if AR flag is set on the frame inside given net_pkt.
- Return
- True if AR flag is set, False otherwise
- Parameters
frag
: A valid pointer on a net_buf structure, must not be NULL, and its length should be at least made of 1 byte (ACK frames are the smallest frames on 15.4 and made of 3 bytes, not not counting the FCS part).
-
enum net_verdict
ieee802154_radio_handle_ack
(struct net_if *iface, struct net_pkt *pkt)¶ Radio driver ACK handling function that hw drivers should use.
ACK handling requires fast handling and thus such function helps to hook directly the hw drivers to the radio driver.
- Return
- NET_OK if it was handled, NET_CONTINUE otherwise
- Parameters
iface
: A valid pointer on a network interface that received the packetpkt
: A valid pointer on a packet to check
-
struct
ieee802154_radio_api
¶ - #include <ieee802154_radio.h>
IEEE 802.15.4 radio interface API.
-
IEEE 802.15.4 Management¶
-
group
ieee802154_mgmt
IEEE 802.15.4 library.
Defines
-
IEEE802154_MAX_ADDR_LENGTH
-
NET_REQUEST_IEEE802154_SET_ACK
¶
-
NET_REQUEST_IEEE802154_UNSET_ACK
¶
-
NET_REQUEST_IEEE802154_PASSIVE_SCAN
¶
-
NET_REQUEST_IEEE802154_ACTIVE_SCAN
¶
-
NET_REQUEST_IEEE802154_CANCEL_SCAN
¶
-
NET_REQUEST_IEEE802154_ASSOCIATE
¶
-
NET_REQUEST_IEEE802154_DISASSOCIATE
¶
-
NET_REQUEST_IEEE802154_SET_CHANNEL
¶
-
NET_REQUEST_IEEE802154_GET_CHANNEL
¶
-
NET_REQUEST_IEEE802154_SET_PAN_ID
¶
-
NET_REQUEST_IEEE802154_GET_PAN_ID
¶
-
NET_REQUEST_IEEE802154_SET_EXT_ADDR
¶
-
NET_REQUEST_IEEE802154_GET_EXT_ADDR
¶
-
NET_REQUEST_IEEE802154_SET_SHORT_ADDR
¶
-
NET_REQUEST_IEEE802154_GET_SHORT_ADDR
¶
-
NET_REQUEST_IEEE802154_GET_TX_POWER
¶
-
NET_REQUEST_IEEE802154_SET_TX_POWER
¶
-
NET_EVENT_IEEE802154_SCAN_RESULT
¶
-
IEEE802154_IS_CHAN_SCANNED
(_channel_set, _chan)¶
-
IEEE802154_IS_CHAN_UNSCANNED
(_channel_set, _chan)¶
-
IEEE802154_ALL_CHANNELS
¶
Enums
-
enum
net_request_ieee802154_cmd
¶ Values:
-
NET_REQUEST_IEEE802154_CMD_SET_ACK
= 1¶
-
NET_REQUEST_IEEE802154_CMD_UNSET_ACK
¶
-
NET_REQUEST_IEEE802154_CMD_PASSIVE_SCAN
¶
-
NET_REQUEST_IEEE802154_CMD_ACTIVE_SCAN
¶
-
NET_REQUEST_IEEE802154_CMD_CANCEL_SCAN
¶
-
NET_REQUEST_IEEE802154_CMD_ASSOCIATE
¶
-
NET_REQUEST_IEEE802154_CMD_DISASSOCIATE
¶
-
NET_REQUEST_IEEE802154_CMD_SET_CHANNEL
¶
-
NET_REQUEST_IEEE802154_CMD_GET_CHANNEL
¶
-
NET_REQUEST_IEEE802154_CMD_SET_PAN_ID
¶
-
NET_REQUEST_IEEE802154_CMD_GET_PAN_ID
¶
-
NET_REQUEST_IEEE802154_CMD_SET_EXT_ADDR
¶
-
NET_REQUEST_IEEE802154_CMD_GET_EXT_ADDR
¶
-
NET_REQUEST_IEEE802154_CMD_SET_SHORT_ADDR
¶
-
NET_REQUEST_IEEE802154_CMD_GET_SHORT_ADDR
¶
-
NET_REQUEST_IEEE802154_CMD_GET_TX_POWER
¶
-
NET_REQUEST_IEEE802154_CMD_SET_TX_POWER
¶
-
NET_REQUEST_IEEE802154_CMD_SET_SECURITY_SETTINGS
¶
-
NET_REQUEST_IEEE802154_CMD_GET_SECURITY_SETTINGS
¶
-
-
struct
ieee802154_req_params
¶ - #include <ieee802154_mgmt.h>
Scanning parameters.
Used to request a scan and get results as well
-
struct
ieee802154_security_params
¶ - #include <ieee802154_mgmt.h>
Security parameters.
Used to setup the link-layer security settings
-