[riot-notifications] [RIOT-OS/RIOT] netdev_ieee802154: Mismatch between radio ll address and in memory address (#10380)
notifications at github.com
Tue Nov 13 12:35:12 CET 2018
After looking through the driver code, I see multiple issues with the ieee802.15.4 short address handling. The generic structure at the moment is that the `set_short_addr` handler of every radio sets both the `netdev::short_addr` and the register of radio. The handler doesn't set a return code, causing the generic `netdev_ieee802154_set` to also handle the set call, setting the `netdev::short_addr` a second time, without clearing the broadcast bit. The cc2538 is the only exception here, that one doesn't set the `netdev::short_addr` member.
What is happening:
### Not clearing any bit:
The cc2538 doesn't clear the broadcast bit, same for socket_zep.
### Only clearing the bit for the `netdev::short_addr`:
Some radios only clear the broadcast bit in the `netdev::short_addr` member, but not the value that is send to the radio. This results in somewhat correct behaviour where the `netdev::short_addr` remains in sync with the value in the radio.
### Clearing the bit for both the register and the `netdev::short_addr`:
This results in a desync between the radio and the netdev struct due to the second write to the `netdev::short_addr` member.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications