[riot-notifications] [RIOT-OS/RIOT] netdev_ieee802154: Mismatch between radio ll address and in memory address (#10380)

Koen Zandberg 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:
 - cc2538
 - socket_zep
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.
 - cc2420
 - kw2xrf

### 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.
 - at86rf2xx
 - mrf24j40

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/10380#issuecomment-438235081
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20181113/c9ae55bb/attachment-0001.html>


More information about the notifications mailing list