The ED value measured during ED scanning is converted
to RSSI in dBm at the ieee802154 driver level before
it is reported to upper layer through the scan callback.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Fix issue in the function
stm32wba_802154_configure_mac_key() : avoid keys copy
in case of the value field of first key in the mac_key
pointer is null.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Restore the channel in the stm32wba_802154_start()
function because channel is reset by the link layer
when the stm32wba_802154_ral_sleep() is called
in the stm32wba_802154_stop() function.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Disable continuous reception when ieee802154 stop
is called.
Configure continuous reception when ieee802154 start
is called.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Enabling the IEEE802154 CSL endpoint to support MCXW72 as a SEED role.
prj-ot-host.conf and sample.yaml corrected for compilation purpose.
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
CSL receiver is managed as follows:
- Started in mcxw_tx() when CSL period is configured
- Synchronized in set_csl_sample_time() for RX slots
- Stopped after PHY operations in SAP handlers
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
Update the stm32wba 802.15.4 driver to integrate the new SoC-level
radio power management.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
The mcxw driver was parsing Thread Vendor-Specific ACK Probing IE
with hardcoded token positions, assuming LQI at offset 6, Link
Margin at offset 7, and RSSI at offset 8. This failed when tokens
were in a different order or when fewer than 3 metrics were present.
Parse the IE length field and iterate through all tokens, matching
them by value (0x01=RSSI, 0x02=Link Margin, 0x03=LQI) instead of
position. This supports 1-2 metrics in any order as per Thread 1.2.
Signed-off-by: Baptiste Coffin <baptiste.coffin_1@nxp.com>
The radio driver updates the filters but never submit
the new ones to the radio core.
The filters was only applied later thanks, probably during
a channel selection that was happening often.
Update the driver stop RX operation and restart it using
the new filters.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
When using OpenThread, set_channel operation may be called often
with the same channel number.
Everytime, even if the channel has not changed, the driver stop all
the radio operations, restart the synthesizer and then restart RX
operations.
This behavior prevents OpenThread joiner to work correcly.
This updates the driver to only stop radio operations if this is really
required.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Add parameter to the link_layer_register_isr() to force
or not the link layer isr registration in case of multiple
function calls.
This change fixes the interrupt service when resuming
from a PM standby state.
Update Bluetooth hci_stm32wba.c driver and
IEEE 802.15.4 ieee802154_stm32wba.c driver accordingly.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.
Duplicates inside different #ifdef branches are preserved
as they may be intentional.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Few functions have been corrected to the SSED attachment for the
MCXW72 as leader :
- mcxw_tx():
tx_frame.tx_delay corrected.
Adjusts the scheduled transmission start time to account for the SHR
duration (160us) as requested by the OpenThread radio API.
- mcxw_rx_thread():
Stores the frame counter and key ID from a
security-enabled enhanced ACK into the received packet's metadata
for cryptographic verification.
- mcxw_tx_started() added:
Notifies the registered event handler that a frame transmission has
started, passing the frame buffer as context.
- pd_mac_sap_handler(): timestamp corrected
- mcxw_configure(): IEEE802154_CONFIG_EVENT_HANDLER case updated
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
This commit prefixes "0x%x" debug logs with the entity, and prints the
"set" parameter when updating a filter.
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
Couple of AF_UNSPEC need to be replaced by NET_AF_UNSPEC so that
OpenThread tests will pass.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Use the series-agnostic STM32 LL headers from the STM32Cube HAL module
instead of series-specific ones in STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fix start/stop driver API implementation. OT stack expects these
functions to only put IEEE802.15.4 in sleep mode and back in RX
mode when calling start. Fixes ifconfig down/up cycling as well
as nodes staying in leader role and not forming a network.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
The 802.15.4 PHY has the poll optimization enabled by default.
Disable it until the driver state machine is updated.
Signed-off-by: George Stefan <george.stefan@nxp.com>
The new nrf-802154 now has the updated API signatures. The migration
code is no longer needed.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Add the driver itself and Kconfig/CMakeLists/dts/bindings related to it.
Other files and libraries needed are in ST's dedicated folder
hal_stm32 (modules/hal/stm32).
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
This was previously only selected when the 2.4GHz driver was
enabled, but SubG can be enabled without the 2.4GHz driver.
Build tested using:
```
west build -b beagleconnect_freedom -d \
build/bcf/ot_coap samples/net/openthread/coap
west flash -d build/bcf/ot_coap
```
Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
The transmit functions will return an error code, instead of a boolean
value. To prepare for this, the API calls are temporarily implemented in
two variants, for old and new API declarations.
The presence of new API will be detected by the use of
NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE macro, which will be
unconditionally defined by a newer nrf-802154 driver.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
The nrf-802154 driver may be unable to acquire a valid timestamp under
rare conditions. In such case, the nrf_802154_received_timestamp_raw
reports time=NRF_802154_NO_TIMESTAMP.
The shim implementation must not calculate the PHR timestamp when
receiving this value, because doing so results in an assert in
ptp_packet.h due to a negative time value.
When the driver is unable to capture the timestamp, the packet is
assigned zero as its timestamp.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
There was an observed situation where the assert checking frame length
is below 128 bytes was hit. While the nrf-802154 checks that the frame
does not exceed that size, there might exists code paths that allow such
packets to pass through.
The change removes the assert and drops the packet instead.
An error is also printed to allow for further debugging.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Updated driver based on changes done in SDK 25.06.00-pvw2.
Update hal_nxp to include BLE LL and IEEE 802.15.4 PHY NBU
combo firmware for MCXW72 boards.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Updated mcxw_get_time function to output its result in nanosecond
resolution and updated code accordingly.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
OpenThread network discovery was not working.
The radio driver is filtering the beacon packets whereas
this is required for OpenThread.
Allow receiving beacon packets.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
This adds support of ED scanning to cc13xx/cc26xx.
This could be required to select the least busy channel
or to found neighboring networks.
Note:
Although the scanning is working, OpenThread still fails
to discover OpenThread networks.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Add mcxw ieee802154 driver
Fix compliance errors for added files.
Update function names to snake_case style.
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
Without this fix I get an MPU fault in samples/net/openthread/shell/
with CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y.
Related commit: a7224830ce
Signed-off-by: Martin Jäger <martin@libre.solar>
Use the same Kconfig for all drivers to configure if the FCS bytes
(checksum) should be included in the packets passed to L2.
The description is slightly reworded to make clear that it does not
only affect the length, but the packet content itself.
Signed-off-by: Martin Jäger <martin@libre.solar>
The status variable stores the return value of `net_recv_data`, which
is an `int` and may be negative.
Signed-off-by: Martin Jäger <martin@libre.solar>