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. Also, see IEEE GET Program for creating an IEEE account and downloading the specification.
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_PHY_PACKET_SIZE
-
IEEE802154_FCS_LENGTH
-
IEEE802154_MTU
-
IEEE802154_SHORT_ADDR_LENGTH
-
IEEE802154_EXT_ADDR_LENGTH
-
IEEE802154_MAX_ADDR_LENGTH
-
IEEE802154_NO_CHANNEL
-
IEEE802154_BROADCAST_ADDRESS
-
IEEE802154_NO_SHORT_ADDRESS_ASSIGNED
-
IEEE802154_BROADCAST_PAN_ID
-
IEEE802154_SHORT_ADDRESS_NOT_ASSOCIATED
-
IEEE802154_PAN_ID_NOT_ASSOCIATED
-
IEEE802154_A_UNIT_BACKOFF_PERIOD(turnaround_time)
-
IEEE802154_A_UNIT_BACKOFF_PERIOD_US(turnaround_time, symbol_period)
-
IEEE802154_L2_CTX_TYPE
-
IEEE802154_PHY_SUN_FSK_863MHZ_915MHZ_SYMBOL_PERIOD_US
-
IEEE802154_PHY_OQPSK_2450MHZ_SYMBOL_PERIOD_US
-
IEEE802154_PHY_SYMBOL_PERIOD_US(is_subg_phy)
-
IEEE802154_PHY_SYMBOLS_PER_SECOND(symbol_period)
-
IEEE802154_PHY_SUN_FSK_PHR_LEN
-
IEEE802154_PHY_A_TURNAROUND_TIME_DEFAULT
-
IEEE802154_PHY_A_TURNAROUND_TIME_1MS(symbol_period)
-
IEEE802154_PHY_A_TURNAROUND_TIME(is_subg_phy)
-
IEEE802154_PHY_A_CCA_TIME
-
IEEE802154_HW_CAPS_BITS_COMMON_COUNT
Number of bits used by ieee802154_hw_caps type.
-
IEEE802154_HW_CAPS_BITS_PRIV_START
This and higher values are specific to the protocol- or driver-specific extensions.
-
IEEE802154_AR_FLAG_SET
Typedefs
-
typedef void (*ieee802154_event_cb_t)(const struct device *dev, enum ieee802154_event evt, void *event_params)
Enums
-
enum ieee802154_device_role
Values:
-
enumerator IEEE802154_DEVICE_ROLE_ENDDEVICE
-
enumerator IEEE802154_DEVICE_ROLE_COORDINATOR
-
enumerator IEEE802154_DEVICE_ROLE_PAN_COORDINATOR
-
enumerator IEEE802154_DEVICE_ROLE_ENDDEVICE
-
enum ieee802154_channel
IEEE 802.15.4 Channel assignments.
Channel numbering for 868 MHz, 915 MHz, and 2450 MHz bands (channel page zero).
Channel 0 is for 868.3 MHz.
Channels 1-10 are for 906 to 924 MHz with 2 MHz channel spacing.
Channels 11-26 are for 2405 to 2530 MHz with 5 MHz channel spacing.
For more information, please refer to section 10.1.3.
Values:
-
enumerator IEEE802154_SUB_GHZ_CHANNEL_MIN = 0
-
enumerator IEEE802154_SUB_GHZ_CHANNEL_MAX = 10
-
enumerator IEEE802154_2_4_GHZ_CHANNEL_MIN = 11
-
enumerator IEEE802154_2_4_GHZ_CHANNEL_MAX = 26
-
enum ieee802154_hw_caps
Values:
-
enumerator IEEE802154_HW_2_4_GHZ = BIT(0)
2.4Ghz radio supported
TODO: Replace with channel page attribute.
-
enumerator IEEE802154_HW_SUB_GHZ = BIT(1)
Sub-GHz radio supported.
TODO: Replace with channel page attribute.
-
enumerator IEEE802154_HW_2_4_GHZ = BIT(0)
-
enum ieee802154_filter_type
Values:
-
enumerator IEEE802154_FILTER_TYPE_IEEE_ADDR
-
enumerator IEEE802154_FILTER_TYPE_SHORT_ADDR
-
enumerator IEEE802154_FILTER_TYPE_PAN_ID
-
enumerator IEEE802154_FILTER_TYPE_SRC_IEEE_ADDR
-
enumerator IEEE802154_FILTER_TYPE_SRC_SHORT_ADDR
-
enumerator IEEE802154_FILTER_TYPE_IEEE_ADDR
-
enum ieee802154_event
Values:
-
enumerator IEEE802154_EVENT_TX_STARTED
-
enumerator IEEE802154_EVENT_RX_FAILED
-
enumerator IEEE802154_EVENT_SLEEP
-
enumerator IEEE802154_EVENT_TX_STARTED
-
enum ieee802154_rx_fail_reason
Values:
-
enumerator IEEE802154_RX_FAIL_NOT_RECEIVED
-
enumerator IEEE802154_RX_FAIL_INVALID_FCS
-
enumerator IEEE802154_RX_FAIL_ADDR_FILTERED
-
enumerator IEEE802154_RX_FAIL_OTHER
-
enumerator IEEE802154_RX_FAIL_NOT_RECEIVED
-
enum ieee802154_tx_mode
IEEE802.15.4 Transmission mode.
Values:
-
enumerator IEEE802154_TX_MODE_DIRECT
Transmit packet immediately, no CCA.
-
enumerator IEEE802154_TX_MODE_CCA
Perform CCA before packet transmission.
-
enumerator IEEE802154_TX_MODE_CSMA_CA
Perform full CSMA/CA procedure before packet transmission.
Note
requires IEEE802154_HW_CSMA capability.
-
enumerator IEEE802154_TX_MODE_TXTIME
Transmit packet in the future, at specified time, no CCA.
Note
requires IEEE802154_HW_TXTIME capability.
-
enumerator IEEE802154_TX_MODE_TXTIME_CCA
Transmit packet in the future, perform CCA before transmission.
Note
requires IEEE802154_HW_TXTIME capability.
-
enumerator IEEE802154_TX_MODE_COMMON_COUNT
Number of modes defined in ieee802154_tx_mode.
-
enumerator IEEE802154_TX_MODE_PRIV_START = IEEE802154_TX_MODE_COMMON_COUNT
This and higher values are specific to the protocol- or driver-specific extensions.
-
enumerator IEEE802154_TX_MODE_DIRECT
-
enum ieee802154_fpb_mode
IEEE802.15.4 Frame Pending Bit table address matching mode.
Values:
-
enumerator IEEE802154_FPB_ADDR_MATCH_THREAD
The pending bit shall be set only for addresses found in the list.
-
enumerator IEEE802154_FPB_ADDR_MATCH_ZIGBEE
The pending bit shall be cleared for short addresses found in the list.
-
enumerator IEEE802154_FPB_ADDR_MATCH_THREAD
-
enum ieee802154_config_type
IEEE802.15.4 driver configuration types.
Values:
-
enumerator IEEE802154_CONFIG_AUTO_ACK_FPB
Indicates how radio driver should set Frame Pending bit in ACK responses for Data Requests.
If enabled, radio driver should determine whether to set the bit or not based on the information provided with
IEEE802154_CONFIG_ACK_FPB
config and FPB address matching mode specified. Otherwise, Frame Pending bit should be set to1
(see section 6.7.3). Requires IEEE802154_HW_TX_RX_ACK capability.
-
enumerator IEEE802154_CONFIG_ACK_FPB
Indicates whether to set ACK Frame Pending bit for specific address or not.
Disabling the Frame Pending bit with no address provided (NULL pointer) should disable it for all enabled addresses. Requires IEEE802154_HW_TX_RX_ACK capability.
-
enumerator IEEE802154_CONFIG_PAN_COORDINATOR
Indicates whether the device is a PAN coordinator.
-
enumerator IEEE802154_CONFIG_PROMISCUOUS
Enable/disable promiscuous mode.
-
enumerator IEEE802154_CONFIG_EVENT_HANDLER
Specifies new radio event handler.
Specifying NULL as a handler will disable radio events notification.
-
enumerator IEEE802154_CONFIG_MAC_KEYS
Updates MAC keys and key index for radios supporting transmit security.
-
enumerator IEEE802154_CONFIG_FRAME_COUNTER
Sets the current MAC frame counter value for radios supporting transmit security.
-
enumerator IEEE802154_CONFIG_FRAME_COUNTER_IF_LARGER
Sets the current MAC frame counter value if the provided value is greater than the current one.
-
enumerator IEEE802154_CONFIG_RX_SLOT
Configure a radio reception window.
This can be used for any scheduled reception, e.g.: Zigbee GP device, CSL, TSCH, etc.
Note
requires IEEE802154_HW_RXTIME capability.
-
enumerator IEEE802154_CONFIG_CSL_PERIOD
Configure CSL receiver (Endpoint) period.
In order to configure a CSL receiver the upper layer should combine several configuration options in the following way: 1. Use ``IEEE802154_CONFIG_ENH_ACK_HEADER_IE`` once to inform the radio driver of the short and extended addresses of the peer to which it should inject CSL IEs. 2. Use ``IEEE802154_CONFIG_CSL_RX_TIME`` periodically, before each use of ``IEEE802154_CONFIG_CSL_PERIOD`` setting parameters of the nearest CSL RX window, and before each use of IEEE_CONFIG_RX_SLOT setting parameters of the following (not the nearest one) CSL RX window, to allow the radio driver to calculate the proper CSL Phase to the nearest CSL window to inject in the CSL IEs for both transmitted data and ACK frames. 3. Use ``IEEE802154_CONFIG_CSL_PERIOD`` on each value change to update the current CSL period value which will be injected in the CSL IEs together with the CSL Phase based on ``IEEE802154_CONFIG_CSL_RX_TIME``. 4. Use ``IEEE802154_CONFIG_RX_SLOT`` periodically to schedule the immediate receive window earlier enough before the expected window start time, taking into account possible clock drifts and scheduling uncertainties. This diagram shows the usage of the four options over time: Start CSL Schedule CSL window ENH_ACK_HEADER_IE CSL_RX_TIME (following window) | | | CSL_RX_TIME (nearest window) | RX_SLOT (nearest window) | | | | | | CSL_PERIOD | | | | | | | v v v v v ----------------------------------------------------------[ CSL window ]-----+ ^ | | | +--------------------- loop ---------+
-
enumerator IEEE802154_CONFIG_CSL_RX_TIME
Configure the next CSL receive window (i.e.
“channel sample”) center, in units of nanoseconds relative to the network subsystem’s local clock.
-
enumerator IEEE802154_CONFIG_ENH_ACK_HEADER_IE
Indicates whether to inject IE into ENH ACK Frame for specific address or not.
Disabling the ENH ACK with no address provided (NULL pointer) should disable it for all enabled addresses.
-
enumerator IEEE802154_CONFIG_COMMON_COUNT
Number of types defined in ieee802154_config_type.
-
enumerator IEEE802154_CONFIG_PRIV_START = IEEE802154_CONFIG_COMMON_COUNT
This and higher values are specific to the protocol- or driver-specific extensions.
-
enumerator IEEE802154_CONFIG_AUTO_ACK_FPB
-
enum ieee802154_attr
IEEE 802.15.4 driver attributes.
See ieee802154_attr_value and ieee802154_radio_api for usage details.
Values:
-
enumerator IEEE802154_ATTR_COMMON_COUNT
Number of attributes defined in ieee802154_attr.
-
enumerator IEEE802154_ATTR_PRIV_START = IEEE802154_ATTR_COMMON_COUNT
This and higher values are specific to the protocol- or driver-specific extensions.
-
enumerator IEEE802154_ATTR_COMMON_COUNT
Functions
-
static inline bool ieee802154_is_ar_flag_set(struct net_buf *frag)
Check if AR flag is set on the frame inside given net_pkt.
- Parameters:
frag – A valid pointer on a net_buf structure, must not be NULL, and its length should be at least 1 byte (ImmAck frames are the shortest supported frames with 3 bytes excluding FCS).
- Returns:
true if AR flag is set, false otherwise
-
enum net_verdict ieee802154_handle_ack(struct net_if *iface, struct net_pkt *pkt)
Radio driver ACK handling callback into L2 that radio drivers must call when receiving an ACK package.
The IEEE 802.15.4 standard prescribes generic procedures for ACK handling on L2 (MAC) level. L2 stacks therefore have to provides a fast and re-usable generic implementation of this callback for radio drivers to call when receiving an ACK packet.
Note: This function is part of Zephyr’s 802.15.4 stack L1 -> L2 “inversion-of-control” adaptation API and must be implemented by all IEEE 802.15.4 L2 stacks.
- Parameters:
iface – A valid pointer on a network interface that received the packet
pkt – A valid pointer on a packet to check
- Returns:
NET_OK if L2 handles the ACK package, NET_CONTINUE or NET_DROP otherwise.
Note: Deviating from other functions in the net stack returning net_verdict, this function will not unref the package even if it returns NET_OK. TODO: Fix this deviating behavior.
-
void ieee802154_init(struct net_if *iface)
Radio driver initialization callback into L2 called by radio drivers to initialize the active L2 stack for a given interface.
Radio drivers must call this function as part of their own initialization routine.
Note: This function is part of Zephyr’s 802.15.4 stack L1 -> L2 “inversion-of-control” adaptation API and must be implemented by all IEEE 802.15.4 L2 stacks.
- Parameters:
iface – A valid pointer on a network interface
-
struct ieee802154_security_ctx
- #include <ieee802154.h>
-
struct ieee802154_context
- #include <ieee802154.h>
-
struct ieee802154_filter
- #include <ieee802154_radio.h>
-
struct ieee802154_key
- #include <ieee802154_radio.h>
-
struct ieee802154_config
- #include <ieee802154_radio.h>
IEEE802.15.4 driver configuration data.
Public Members
-
struct ieee802154_config.[anonymous].[anonymous] auto_ack_fpb
IEEE802154_CONFIG_AUTO_ACK_FPB
-
struct ieee802154_config.[anonymous].[anonymous] ack_fpb
IEEE802154_CONFIG_ACK_FPB
-
bool pan_coordinator
IEEE802154_CONFIG_PAN_COORDINATOR
-
bool promiscuous
IEEE802154_CONFIG_PROMISCUOUS
-
ieee802154_event_cb_t event_handler
IEEE802154_CONFIG_EVENT_HANDLER
-
struct ieee802154_key *mac_keys
IEEE802154_CONFIG_MAC_KEYS
Pointer to an array containing a list of keys used for MAC encryption.Refer to secKeyIdLookupDescriptor and secKeyDescriptor in IEEE 802.15.4
key_value field points to a buffer containing the 16 byte key. The buffer is copied by the callee.
The variable length array is terminated by key_value field set to NULL.
-
uint32_t frame_counter
IEEE802154_CONFIG_FRAME_COUNTER
-
net_time_t start
Nanosecond resolution timestamp relative to the network subsystem’s local clock defining the start of the RX window during which the receiver is expected to be listening (i.e.
not including any startup times).
-
net_time_t duration
Nanosecond resolution duration of the RX window relative to the above RX window start time during which the receiver is expected to be listening (i.e.
not including any shutdown times).
-
struct ieee802154_config.[anonymous].[anonymous] rx_slot
IEEE802154_CONFIG_RX_SLOT
-
uint32_t csl_period
IEEE802154_CONFIG_CSL_PERIOD
The CSL period in units of 10 symbol periods, see section 7.4.2.3.
in CPU byte order
-
net_time_t csl_rx_time
IEEE802154_CONFIG_CSL_RX_TIME
Nanosecond resolution timestamp relative to the network subsystem’s local clock defining the center of the CSL RX window at which the receiver is expected to be fully started up (i.e. not including any startup times).
-
const uint8_t *data
header IEs to be added to the Enh-Ack frame
in little endian
-
uint16_t short_addr
in CPU byte order
-
const uint8_t *ext_addr
in big endian
-
struct ieee802154_config.[anonymous].[anonymous] ack_ie
IEEE802154_CONFIG_ENH_ACK_HEADER_IE
-
union ieee802154_config.[anonymous] [anonymous]
Configuration data.
-
struct ieee802154_config.[anonymous].[anonymous] auto_ack_fpb
-
struct ieee802154_attr_value
- #include <ieee802154_radio.h>
IEEE 802.15.4 driver attributes.
This structure is reserved to scalar and structured attributes that originate in the driver implementation and can neither be implemented as boolean ieee802154_hw_caps nor be derived directly or indirectly by the MAC (L2) layer. In particular this structure MUST NOT be used to return configuration data that originate from L2.
Note
To keep this union reasonably small, any attribute requiring a large memory area, SHALL be provided pointing to memory allocated from the driver’s stack. Clients that need to persist the attribute value SHALL therefore copy such memory before returning control to the driver.
-
struct ieee802154_radio_api
- #include <ieee802154_radio.h>
IEEE 802.15.4 radio interface API.
Public Members
-
struct net_if_api iface_api
network interface API
Note
Network devices must extend the network interface API. It is therefore mandatory to place it at the top of the radio API struct so that it can be cast to a network interface.
-
enum ieee802154_hw_caps (*get_capabilities)(const struct device *dev)
Get the device driver capabilities.
- Param dev:
pointer to radio device
- Return:
Bit field with all supported device driver capabilities.
-
int (*cca)(const struct device *dev)
Clear Channel Assessment - Check channel’s activity.
- Param dev:
pointer to radio device
- Retval 0:
the channel is available
- Retval -EBUSY:
The channel is busy.
- Retval -EIO:
The CCA procedure could not be executed.
- Retval -ENOTSUP:
CCA is not supported by this driver.
-
int (*set_channel)(const struct device *dev, uint16_t channel)
Set current channel.
- Param dev:
pointer to radio device
- Param channel:
the number of the channel to be set in CPU byte order
- Retval 0:
channel was successfully set
- Retval -EINVAL:
The given channel is not within the range of valid channels of the driver’s current channel page.
- Retval -ENOTSUP:
The given channel is within the range of valid channels of the driver’s current channel page but unsupported by the current driver.
- Retval -EIO:
The channel could not be set.
-
int (*filter)(const struct device *dev, bool set, enum ieee802154_filter_type type, const struct ieee802154_filter *filter)
Set/Unset PAN ID, extended or short address filters.
Note
requires IEEE802154_HW_FILTER capability.
- Param dev:
pointer to radio device
- Param set:
true to set the filter, false to remove it
- Param type:
the type of entity to be added/removed from the filter list (a PAN ID or a source/destination address)
- Param filter:
the entity to be added/removed from the filter list
- Retval 0:
The filter was successfully added/removed.
- Retval -EINVAL:
The given filter entity or filter entity type was not valid.
- Retval -ENOTSUP:
Setting/removing this filter or filter type is not supported by this driver.
- Retval -EIO:
Error while setting/removing the filter.
-
int (*set_txpower)(const struct device *dev, int16_t dbm)
Set TX power level in dbm.
- Param dev:
pointer to radio device
- Param dbm:
TX power in dbm
- Retval 0:
The TX power was successfully set.
- Retval -EINVAL:
The given dbm value is invalid or not supported by the driver.
- Retval -EIO:
The TX power could not be set.
-
int (*tx)(const struct device *dev, enum ieee802154_tx_mode mode, struct net_pkt *pkt, struct net_buf *frag)
Transmit a packet fragment as a single frame.
Note
Depending on the level of offloading features supported by the driver, the frame may not be fully encrypted/authenticated, may not contain an FCS or may contain incomplete information elements (IEs). It is the responsibility of L2 implementations to prepare the frame according to the offloading capabilities announced by the driver and to decide whether CCA, CSMA/CA or ACK procedures need to be executed in software (“soft MAC”) or will be provided by the driver itself (“hard MAC”).
Warning
The driver must not take ownership of the given network packet and frame (fragment) buffer. Any data required by the driver (including the actual frame content) must be read synchronously and copied internally if transmission is delayed or executed asynchronously. Both, the packet and the buffer may be re-used or released immediately after the function returns.
- Param dev:
pointer to radio device
- Param mode:
the transmission mode, some of which require specific offloading capabilities.
- Param pkt:
pointer to the network packet to be transmitted.
- Param frag:
pointer to a network buffer containing a single fragment with the frame data to be transmitted
- Retval 0:
The frame was successfully sent or scheduled. If the driver supports ACK offloading and the frame requested acknowlegment (AR bit set), this means that the packet was successfully acknowledged by its peer.
- Retval -ENOTSUP:
The given TX mode is not supported.
- Retval -EIO:
The frame could not be sent due to some unspecified error.
- Retval -EBUSY:
The frame could not be sent because the medium was busy (CSMA/CA or CCA offloading feature only).
- Retval -ENOMSG:
The frame was not confirmed by an ACK packet (TX ACK offloading feature only).
- Retval -ENOBUFS:
The frame could not be scheduled due to missing internal buffer resources (timed TX offloading feature only).
-
int (*start)(const struct device *dev)
Start the device and place it in receive mode.
- Param dev:
pointer to radio device
- Retval 0:
The driver was successfully started.
- Retval -EIO:
The driver could not be started.
-
int (*stop)(const struct device *dev)
Stop the device and switch off the receiver (sleep mode).
- Param dev:
pointer to radio device
- Retval 0:
The driver was successfully stopped.
- Retval -EIO:
The driver could not be stopped.
-
int (*continuous_carrier)(const struct device *dev)
Start continuous carrier wave transmission.
To leave this mode,
start()
orstop()
should be called, putting the radio driver in receive or sleep mode, respectively.- Param dev:
pointer to radio device
- Retval 0:
continuous carrier wave transmission started
- Retval -EIO:
not started
-
int (*configure)(const struct device *dev, enum ieee802154_config_type type, const struct ieee802154_config *config)
Set radio driver configuration.
- Param dev:
pointer to radio device
- Param type:
the configuration type to be set
- Param config:
the configuration parameters to be set for the given configuration type
- Retval 0:
configuration successful
- Retval -ENOTSUP:
The given configuration type is not supported by this driver.
- Retval -EINVAL:
The configuration parameters are invalid for the given configuration type.
- Retval -ENOMEM:
The configuration cannot be saved due to missing memory resources.
- Retval -ENOENT:
The resource referenced in the configuration parameters cannot be found in the configuration.
-
uint16_t (*get_subg_channel_count)(const struct device *dev)
Get the available amount of Sub-GHz channels.
TODO: Replace with a combination of channel page and channel attributes.
- Param dev:
pointer to radio device
- Return:
number of available channels in the sub-gigahertz band
-
int (*ed_scan)(const struct device *dev, uint16_t duration, energy_scan_done_cb_t done_cb)
Run an energy detection scan.
Note
requires IEEE802154_HW_ENERGY_SCAN capability
Note
The radio channel must be set prior to calling this function.
- Param dev:
pointer to radio device
- Param duration:
duration of energy scan in ms
- Param done_cb:
function called when the energy scan has finished
- Retval 0:
the energy detection scan was successfully scheduled
- Retval -EBUSY:
the energy detection scan could not be scheduled at this time
- Retval -EALREADY:
a previous energy detection scan has not finished yet.
- Retval -ENOTSUP:
This driver does not support energy scans.
-
net_time_t (*get_time)(const struct device *dev)
Get the current time in nanoseconds relative to the network subsystem’s local uptime clock as represented by this network interface.
See net_time_t for semantic details.
Note
requires IEEE802154_HW_TXTIME and/or IEEE802154_HW_RXTIME capabilities.
- Param dev:
pointer to radio device
- Return:
nanoseconds relative to the network subsystem’s local clock
-
uint8_t (*get_sch_acc)(const struct device *dev)
Get the current estimated worst case accuracy (maximum ± deviation from the nominal frequency) of the network subsystem’s local clock used to calculate tolerances and guard times when scheduling delayed receive or transmit radio operations.
The deviation is given in units of PPM (parts per million).
Note
requires IEEE802154_HW_TXTIME and/or IEEE802154_HW_RXTIME capabilities.
Note
Implementations may estimate this value based on current operating conditions (e.g. temperature).
- Param dev:
pointer to radio device
- Return:
current estimated clock accuracy in PPM
-
int (*attr_get)(const struct device *dev, enum ieee802154_attr attr, struct ieee802154_attr_value *value)
Get the value of a driver specific attribute.
Note
This function SHALL NOT return any values configurable by the MAC (L2) layer. It is reserved to non-boolean (i.e. scalar or structured) attributes that originate from the driver implementation and cannot be directly or indirectly derived by L2. Boolean attributes SHALL be implemented as ieee802154_hw_caps.
- Retval 0:
The requested attribute is supported by the driver and the value can be retrieved from the corresponding ieee802154_attr_value member.
- Retval -ENOENT:
The driver does not provide the requested attribute. The value structure has does not been updated with attribute data.
-
struct net_if_api iface_api
-
IEEE802154_MAX_PHY_PACKET_SIZE
IEEE 802.15.4 Management
- group ieee802154_mgmt
IEEE 802.15.4 net management library.
Defines
-
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:
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_ACK = 1
-
enumerator NET_REQUEST_IEEE802154_CMD_UNSET_ACK
-
enumerator NET_REQUEST_IEEE802154_CMD_PASSIVE_SCAN
-
enumerator NET_REQUEST_IEEE802154_CMD_ACTIVE_SCAN
-
enumerator NET_REQUEST_IEEE802154_CMD_CANCEL_SCAN
-
enumerator NET_REQUEST_IEEE802154_CMD_ASSOCIATE
-
enumerator NET_REQUEST_IEEE802154_CMD_DISASSOCIATE
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_CHANNEL
-
enumerator NET_REQUEST_IEEE802154_CMD_GET_CHANNEL
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_PAN_ID
-
enumerator NET_REQUEST_IEEE802154_CMD_GET_PAN_ID
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_EXT_ADDR
-
enumerator NET_REQUEST_IEEE802154_CMD_GET_EXT_ADDR
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_SHORT_ADDR
-
enumerator NET_REQUEST_IEEE802154_CMD_GET_SHORT_ADDR
-
enumerator NET_REQUEST_IEEE802154_CMD_GET_TX_POWER
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_TX_POWER
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_SECURITY_SETTINGS
-
enumerator NET_REQUEST_IEEE802154_CMD_GET_SECURITY_SETTINGS
-
enumerator NET_REQUEST_IEEE802154_CMD_SET_ACK = 1
-
struct ieee802154_req_params
- #include <ieee802154_mgmt.h>
Scanning parameters.
Used to request a scan and get results as well, see section 8.2.11.2
Public Members
-
uint32_t channel_set
The set of channels to scan, use above macros to manage it.
-
uint32_t duration
Duration of scan, per-channel, in milliseconds.
-
uint16_t channel
Current channel in use as a result.
-
uint16_t pan_id
Current pan_id in use as a result.
-
union ieee802154_req_params.[anonymous] [anonymous]
Result address.
-
uint8_t len
length of address
-
uint8_t lqi
Link quality information, between 0 and 255.
-
uint32_t channel_set
-
struct ieee802154_security_params
- #include <ieee802154_mgmt.h>
Security parameters.
Used to setup the link-layer security settings, see tables 9-9 and 9-10 in section 9.5.
-
NET_REQUEST_IEEE802154_SET_ACK