Closed jfischer-no closed 9 years ago
@BytesGalore did you also encounter this behavior? @jfischer-phytec-iot can you briefly explain your setup?
@cgundogan I only used short addresses, due to always running into "the old way" of transmitting a packet. I will test long addresses tomorrow morning without and with the fix proposed by @jfischer-phytec-iot, then I will report.
@cgundogan
@cgundogan @jfischer-phytec-iot unfortunately I cannot test/reproduce neither using (forcing) long address usage :( The R-IDGE Linux USB border router seems to drop the packets internally (the R-IDGE firmware has no promiscuous mode yet). Only multicast addresses are successfully processed by now.
But still the proposition seems to be valid as we take the RPL parent address directly form a provided DIO [1] and do not convert the byteorder [2] when assigning the address of this parent.
For instance sending (trying to send) a packet to:
fe80::12:4bff:fee4:a83
results in:
p.frame.dest_addr == {0x83, 0x0a, 0xe4, 0xfe, 0xff, 0x4b, 0x12 0x00}
using the byteorder conversion [3].
[1] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/routing/rpl/rpl_control_messages.c#L685 [2] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/routing/rpl/rpl_dodag.c#L180 [3] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/link_layer/net_if/net_if.c#L379
"Fields that are longer than a single octet are sent to the PHY in the order from the octet containing the lowest numbered bits to the octet containing the highest numbered bits." <- (IEEE Std 802.15.4TM‐2011" As I understand, ntohll is correct here?
@jfischer-phytec-iot What is described there is little-endian, i.e. not Network Byte Order (Big endian)
Currently I'm not sure where it goes wrong. The target is the link layer addresse from the neighbor cache and it is always an array of uint8_t. The function sixlowpan_mac_send_data (mac.c) casts it to a (net_if_eui64_t *). I'll dig a little further tomorrow.
@authmillenon Do you have any idea?
No, not without digging myself :/
the byte swap at https://github.com/RIOT-OS/RIOT/blob/master/sys/net/link_layer/net_if/net_if.c#L379 seem out of place, but I have not done any tests or debugging...
@gebart I also thought so, but then type casting to (net_if_eui64_t *) is also not right.
Which radio are you using when seeing? I plan on testing this on an at86rf212b during the weekend.
I have noticed the same issue as you describe here using the at86rf212b.
That was related to the old network stack only, right? Can we close then?
@jfischer-phytec-iot is this still relevant? I'm asking since the gnrc stack is armed, so any objections to close this issue from your side?
@jfischer-phytec-iot ping
I take this as a no. ;)
Linux <-> RIOT works just fine if I use at86rf212b :)
During my adventure "Communication between RIOT and Linux host," I have discovered that the long addresses are transferred in reverse order. If I replace it like:
(see https://github.com/RIOT-OS/RIOT/blob/master/sys/net/link_layer/net_if/net_if.c#L379) then the addresse will be transmitted correctly.
In which order are the addresses in net_if_eui64_t?