[riot-notifications] [RIOT-OS/RIOT] gnrc_netif: centralize device-type-specific functions (#10524)

Gunar Schorcht notifications at github.com
Sat Jan 5 03:20:01 CET 2019

@miri64 After a few hours of work, I was able to get it up and running :rocket: But it's just a hack right now, and I would need your support to solve the problem.

I had the following problems:
- When I build a border router with `esp_eth` and `esp_now`, I had to use following defines explicitly to get it working:
- The nodes had to be build as leaf nodes `GNRC_IPV6_NIB_CONF_6LR=0`. Otherwise, I get
    nib: multihop prefix and context dissemination on router activated,
         but no ABRO found. Discarding router advertisement silently
   on receiption of router advertisements and the global unicast address is not set.
- `esp_now_netdev` is now a 6Lo node, but has no long address with 8 byte size. Therefore, ARO records could not be used in neighbor solicitations https://github.com/RIOT-OS/RIOT/blob/f7e524d18eb3794fc8f3b0357a4ce233204d4a56/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c#L60-L65.

I could solve the last problem by adding the option `NETOPT_ADDRESS_LONG` to `esp_now_netdev`. At the moment I'm just using the 6 byte MAC address extended by two 0-bytes. Checking received ARO records is still a problem https://github.com/RIOT-OS/RIOT/blob/f7e524d18eb3794fc8f3b0357a4ce233204d4a56/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.c#L88 Function `_is_iface_eui64` insists on a size of 8 bytes https://github.com/RIOT-OS/RIOT/blob/f7e524d18eb3794fc8f3b0357a4ce233204d4a56/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.c#L32-L37. I changed it for the moment as following
-    return (netif->l2addr_len == sizeof(eui64_t)) &&
+    return /* (netif->l2addr_len == sizeof(eui64_t)) && */
            (memcmp(&netif->l2addr, eui64, netif->l2addr_len) == 0);
but this is just a hack. Do you have any idea for a better solution?

With these changes the nodes can ping each other using the global unicast address and they can ping any machine in the LAN via the border router. Of course, the way back has to be set as route.

One little problem I could observe was that the bourder router doesn't provide router advertisements on a regular base. Therefore, the assignment of global unicast addresses did only work on startup of the nodes when they are sending router solicitation. Is that correct?

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...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190104/7a4ed4ec/attachment-0001.html>

More information about the notifications mailing list