-
Notifications
You must be signed in to change notification settings - Fork 2k
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
netdev_ieee802154: Mismatch between radio ll address and in memory address #10380
Comments
On a second look, I think this problem only occurs with the short address, radios clear the first bit before setting it, to mark it as unicast. The netdev_ieee802154 layer doesn't clear this bit. |
Maybe it would be better to return an error if we try to netdev::set a broadcast address as the link layer address? |
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 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
|
For now I propose to at least ensure that the handling of the address is identical between the radios. In the future, having a sanity check in the set call somewhere is IMHO preferable |
@bergzand do you plan on writing a fix for this issue? |
I kinda got stuck looking for a nice way to solve this issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
This should be an easy fix, right? |
Description
Most, if not all, radios adjust the link layer address to force it to unicast. However, the netdev_ieee802154 doesn't adjust the address, causing a mismatch between what gnrc thinks the link layer address is and what the radio has configured as a link layer address.
Steps to reproduce the issue
On
examples/gnrc_networking
on a samr21-xpro use the shell to set the long address to something non-unicast such asFF:F0:FF:F1:FF:F2:FF:F3
.Expected results
The address is set to and displayed as
7F:F0:FF:F1:FF:F2:FF:F3
, to mark it as unicastActual results
ifconfig
shows the address asFF:F0:FF:F1:FF:F2:FF:F3
.Versions
The text was updated successfully, but these errors were encountered: