-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
at86rf2xx radio driver not (reliably) sending ACKs #21659
Comments
It seems sending FORCE_TRX_OFF stops the transmission of ACKs. Also mentioned in the datasheet http://ww1.microchip.com/downloads/en/devicedoc/atmel-8351-mcu_wireless-at86rf233_datasheet.pdf:
Commenting the following, makes ACK work for me:
|
@markus-becker-tridonic-com is nice to see that someone is really using this driver. Please, do not change rf2xx_trx_set_state method. This is how we change transceiver FSM states. The RF2XX_TRX_PHY_STATE_CMD_PLL_ON before rf2xx_trx_rx is currently used to avoid buffer overrun. You can disable it but be aware it can happen once RX is enabled. I hope people like you can help with precious data to improve the driver. I'm planning add a RX buffer queue to improve in general. |
Hi @markus-becker-tridonic-com, could you check if the below idea works, please? I'm without radios until Jan 13. The system is currently configured with Dynamic Frame Buffer Protection enabled by RX_SAFE_MODE at (register 0x0C, TRX_CTRL_2). However, we need execute 2 rf2xx_iface_frame_read at rf2xx_trx_rx and Dynamic Frame Buffer Protection is released on the rising edge of pin 23 (/SEL) during the first Frame Buffer read access. I'll improve this situation using SRAM access in near future. The below snip will ensure that ACK will be sent since transceiver is on RF2XX_TRX_PHY_STATUS_BUSY_RX_AACK state until finish all RX/ACK procedures, Figure 7-12. Flow Diagram of RX_AACK. After that, we ensures that new air frames don't override current buffer until finish RX procedure. Is this helpfull?
|
The snippet above works as well. Thanks very much. |
@nandojve do you think this could still make it into the 2.2 release? |
Hi @markus-becker-tridonic-com, on my point of view yes. The solution is ready at #21753. If you have conditions to share some test results may help close the issue faster. |
The RF2XX driver not always sent ACK when a RX frame requests. This happen because RF2XX transceiver asserts TRX_END interrupt after confirm that the FCS is valid. The driver can now decode the frame but in parallel the radio still processing the ACK frame. This will sync the radio FSM state to ensure that ACK will be send. Fixes zephyrproject-rtos#21659 Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The RF2XX driver not always sent ACK when a RX frame requests. This happen because RF2XX transceiver asserts TRX_END interrupt after confirm that the FCS is valid. The driver can now decode the frame but in parallel the radio still processing the ACK frame. This will sync the radio FSM state to ensure that ACK will be send. Fixes #21659 Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Describe the bug
The newly introduced at86rf2xx driver is not sending ACKs.
@nandojve, many thanks for developing and upstreaming the at86rf2xx radio driver! I have been trying to use the driver on a custom hardware with an STM32 uC and the RF233 using OpenThread.
However, I am not (reliably) getting ACKs, as can be seen in the following capture:
The debug output indicated that the correct address filter is being set (
ieee802154_rf2xx.rf2xx_set_ieee_addr: IEEE address 8e:f3:5a:10:a3:7d:64:e1
) and works as the packets sent to the 64bit address are received.To Reproduce
Build echo_client with ot-overlay.conf and commission against a Thread BR, e.g. based on nrf52840.
Expected behavior
ACKs are being sent.
Impact
Device cannot be joined onto Thread network, because DTLS gets multiple unexpected link-layer retransmitted packets.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: