-
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
kw2xrf: Don't use netdev_ieee802154_t for link layer address #10534
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the PR according to the testing procedures on two of the firefly boards in lille. During that I encountered the following output, but I'm pretty sure that is unrelated to this PR (just wanted to note it down). It did not lead to the node aborting btw, I could use the node as before after the output:
RFCORE_ASSERT(rssi_val > CC2538_RF_SENSITIVITY) failed at line 348 in _recv()!
RFCORE_SFR_RFERRF = 0x00
In addition, I used the default
example to check the send/receive behavior under different address configurations (I needed to add the firefly
board to the BOARD_PROVIDES_NETIF
list for that):
- short address to long address
- short address to short address
- broadcasting from short address
- long address to short address
- long address to long address
- broadcasting from long address
All were successful.
(I did not sniff however while I did the testing. So let me just crosscheck against an M3. You may squash in the meantime) |
I was also able to exchange packages both from and to the short and long addresses of the respective nodes between a firefly and an iotlab-m3. |
Wait a minute... this isn't a change to the cc2538_rf...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still may squash. The code looks alright, I just did not notice that it isn't cc2538_rf
code (only noticed because Murdock was complaining about a typo of yours >.<).
drivers/kw2xrf/kw2xrf_getset.c
Outdated
#ifdef MODULE_SIXLOWPAN | ||
/* https://tools.ietf.org/html/rfc4944#section-12 requires the first bit to | ||
* 0 for unicast addresses */ | ||
dev->netdev.short_addr[1] &= 0x7F; | ||
val_arr[0] &= 0x7F; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val_arr[0] &= 0x7F; | |
val_ar[0] &= 0x7F; |
Sorry! 😭 Must have been a copy paste error from earlier PR's |
27dbea1
to
62ca251
Compare
squashed, again sorry for the confusion caused by the subject 😭 |
I'll have another look today. |
I tried to use the phynode in the testbed, but I'm not sure it is just not reachable from one of the |
I was able to ping between the phynode and |
Mh... but with that I can't use the sniffer :-/ |
With the phynode you can't use the usual IoT-LAB control node sniffer feature because there's no control node with it (it's plugged on an IoT-LAB RPI3 based gateway). But you can still use the sniffer of samr21-xpro or m3 nodes because they are plugged on a real IoT-LAB gateway, with all the usual tooling it provides (sniffer, power consumption). |
Please read what I wrote. I tried to sniff from an m3 (m3-7 and m3-10 because they seem to be spatially close at least according to the map). I only was able to see the packets from the m3, so I suspect the phynode is out of range from the m3, but I was not sure (since @bergzand was able to ping from a
Last time I tried to use profiles with the |
That's what I did, but misinterpret it, sorry ;) The all samr21-xpro and m3 are in the same room and very close, there's no reason (except maybe radio power setting) for the nodes to no see between each others. |
I tried to get the sniffer profile working with the
For both profiles I get
|
( |
I was not. But as said before, I'll try at the office again. |
I redid the tests as before (also set addresses for the interface). Most things work, however the IPv6 address for the phynode is configured wrong:
Weirdly enough, in the sniff the correct IPv6 address is shown as source :-/ |
If I ping the phynode under the address that the sniff shows as source, it I get a "destination unreachable" error back from the phynode. I think something about getting the IID might be broken ;-). |
Arghs, since #10455, the IID from the device is preferred. However, this is currently implemented in |
Or we make |
Done in #10537. With that PR merged this PR works! :-) |
#10537 got merged into master. Please rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested ACK. Used pba-d-01-kw2x
and gnrc_networking
, ping still works and MAC as well as link-local address stay the same.
please squash and rebase as needed |
ping @bergzand, please rebase and squash |
62ca251
to
98f2feb
Compare
Squashed, sorry for the delay |
This change ensures that the endianess returned by the get_addr_long is consistent with the endianess of the get_addr_short
This change modifies the kw2xrf_get_addr_short function to retrieve the short address from the device and not from netdev
98f2feb
to
fcb55c3
Compare
And rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested ACK, used PhyNode and gnrc_networking. Changing addresses works and also shows new address in SLLAO of ND messages.
@miri64: good to go here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Contribution description
This PR modifies the behaviour of the kw2xrf driver to not propagate the link layer address to the netdev_ieee802154_t struct. This helps the goal of separating the netdev and the ieee802154_t layer by another bit. The end goal is to remove the short and long address from the netdev_ieee802154_t struct and match the behaviour of the ethernet drivers.
The performance impact of this change should be negligible, the NETOPT_ADDRESS(_LONG) call is only used on initialization and by the ifconfig command.
Testing procedure
Please test whether:
Issues/PRs references
Another small step for #7736