[riot-notifications] [RIOT-OS/RIOT] cpu/esp*: esp_now and esp_wifi cleanup (#10929)

Gunar Schorcht notifications at github.com
Mon Jul 1 18:38:14 CEST 2019


@MrKevinWeiss I have tested it again. It works as expected.

In my configuration, I have one ESP8266 as ESP-NOW node flashed with command
```
USEMODULE='esp_now' CFLAGS='-DESP_NOW_CHANNEL=8' make -C examples/gnrc_networking BOARD=esp8266-esp-12x PORT=/dev/ttyUSB0 flash
```
and one ESP8266 as border router flashed with project [RIOT_ESP_NOW_WiFi_Border_Router](https://github.com/gschorcht/RIOT_ESP_NOW_WiFi_Border_Router) and command
```
CFLAGS='-DESP_NOW_CHANNEL=8 -DESP_WIFI_SSID=\"<SSID>\" -DESP_WIFI_PASS=\"<Passphrase>\"' make BOARD=esp8266-esp-12x PORT=/dev/ttyUSB1 flash
```

On the  boarder router, I can observe with `ifconfig`:
```
Iface  6  HWaddr: 5E:CF:7F:80:3F:08 
          L2-PDU:249 MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  Source address length: 6
          Link type: wireless
          inet6 addr: fe80::5ccf:7fff:fe80:3f08  scope: local  VAL
          inet6 addr: 2001:db8::5ccf:7fff:fe80:3f08  scope: global  VAL
         ...
Iface  7  HWaddr: 5C:CF:7F:80:3F:08  Link: up 
          L2-PDU:1500 MTU:1440  HL:255  RTR  
          Source address length: 6
          Link type: wireless
          inet6 addr: fe80::5ecf:7fff:fe80:3f08  scope: local  VAL
          inet6 addr: 2003:c1:e70f:7b93:5ecf:7fff:fe80:3f08  scope: global  VAL
          ...
```
That is, the border router has `2001:db8::5ccf:7fff:fe80:3f08` on its ESP-NOW interface and `2003:c1:e70f:7b93:5ecf:7fff:fe80:3f08` on the WiFi interface with the prefix he got from the DSL router.

On the ESP-NOW node, I can observe with `ifconfig` after a while:
```
Iface  8  HWaddr: 5E:CF:7F:94:76:A9 
          L2-PDU:249 MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  Source address length: 6
          Link type: wireless
          inet6 addr: fe80::5ccf:7fff:fe94:76a9  scope: local  VAL
          inet6 addr: 2001:db8::5ccf:7fff:fe94:76a9  scope: global  VAL
          ...
```
That is, the ESP-NOW node gets the prefix from the border router, which means that both interfaces are working on the border router simultaneously.

Once I have created a route on my machine in the LAN which points to the link local address of the WiFi interface of the border router for prefix '2001:db8::/64' using command
```
sudo ip -6 route add 2001:db8::/64 via fe80::5ecf:7fff:fe80:3f08 dev eth0
```
I can ping6 the ESP-NOW node behind the border router from my machine in the LAN.

BTW, this configuration is also working completely without RPL since the the prefix is provided by Router Advertisements that are sent by the boarder router. Therefore, this configuration is also working, if `examples/gnrc_networking` is compiled without RPL for the ESP-NOW node.

But, if I enable RPL on both nodes, I get something like this on the ESP-NOW node:
```
rpl
instance table:	[X]	
parent table:	[X]	[ ]	[ ]	

instance [0 | Iface: 8 | mop: 2 | ocp: 0 | mhri: 256 | mri 0]
	dodag [2001:db8::5ccf:7fff:fe80:3f08 | R: 512 | OP: Router | PIO: on | TR(I=[8,20], k=10, c=0, TC=5s)]
		parent [addr: fe80::5ccf:7fff:fe80:3f08 | rank: 256]
```
and I can ping the ESP-NOW node behind the border router from my machine in the LAN.

Finally, everything is working as expected with and without RPL.

-- 
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/pull/10929#issuecomment-507339285
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190701/a4be52d6/attachment.html>


More information about the notifications mailing list