[riot-notifications] [RIOT-OS/RIOT] examples/gcoap: add support for socket ZEP (#16472)

Jean Pierre Dudey notifications at github.com
Fri May 14 20:26:54 CEST 2021


@jeandudey approved this pull request.

Working as expected.

<details>
<summary>examples/gcoap</summary>

```
jeandudey at jean ~/D/RIOT>  make -C examples/gcoap BOARD=native USE_ZEP=1 ZEP_MAC=\"E6:CB:21:BF:9B:F8:72:62\" all term
make: Entering directory '/home/jeandudey/Dev/RIOT/examples/gcoap'
Building application "gcoap_example" for "native" with MCU "native".

"make" -C /home/jeandudey/Dev/RIOT/boards/native
"make" -C /home/jeandudey/Dev/RIOT/boards/native/drivers
"make" -C /home/jeandudey/Dev/RIOT/core
"make" -C /home/jeandudey/Dev/RIOT/cpu/native
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/cli_eui_provider
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/periph
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/socket_zep
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/stdio_native
"make" -C /home/jeandudey/Dev/RIOT/drivers
"make" -C /home/jeandudey/Dev/RIOT/drivers/netdev
"make" -C /home/jeandudey/Dev/RIOT/drivers/periph_common
"make" -C /home/jeandudey/Dev/RIOT/sys
"make" -C /home/jeandudey/Dev/RIOT/sys/auto_init
"make" -C /home/jeandudey/Dev/RIOT/sys/checksum
"make" -C /home/jeandudey/Dev/RIOT/sys/div
"make" -C /home/jeandudey/Dev/RIOT/sys/event
"make" -C /home/jeandudey/Dev/RIOT/sys/evtimer
"make" -C /home/jeandudey/Dev/RIOT/sys/fmt
"make" -C /home/jeandudey/Dev/RIOT/sys/iolist
"make" -C /home/jeandudey/Dev/RIOT/sys/luid
"make" -C /home/jeandudey/Dev/RIOT/sys/net/application_layer/gcoap
"make" -C /home/jeandudey/Dev/RIOT/sys/net/application_layer/nanocoap
"make" -C /home/jeandudey/Dev/RIOT/sys/net/crosslayer/inet_csum
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netapi
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif/hdr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif/ieee802154
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif/init_devs
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netreg
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/icmpv6
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/icmpv6/echo
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ipv6
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ipv6/hdr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ipv6/nib
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ndp
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/ctx
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/frag
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/frag/fb
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/frag/rb
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/iphc
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/nd
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/pkt
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/pktbuf
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/pktbuf_static
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/sock
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/sock/udp
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/transport_layer/udp
"make" -C /home/jeandudey/Dev/RIOT/sys/net/link_layer/eui_provider
"make" -C /home/jeandudey/Dev/RIOT/sys/net/link_layer/ieee802154
"make" -C /home/jeandudey/Dev/RIOT/sys/net/link_layer/l2util
"make" -C /home/jeandudey/Dev/RIOT/sys/net/netif
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/icmpv6
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/ipv6/addr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/ipv6/hdr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/sixlowpan
"make" -C /home/jeandudey/Dev/RIOT/sys/net/sock
"make" -C /home/jeandudey/Dev/RIOT/sys/net/sock/async/event
"make" -C /home/jeandudey/Dev/RIOT/sys/net/transport_layer/udp
"make" -C /home/jeandudey/Dev/RIOT/sys/od
"make" -C /home/jeandudey/Dev/RIOT/sys/posix/inet
"make" -C /home/jeandudey/Dev/RIOT/sys/ps
"make" -C /home/jeandudey/Dev/RIOT/sys/random
"make" -C /home/jeandudey/Dev/RIOT/sys/random/tinymt32
"make" -C /home/jeandudey/Dev/RIOT/sys/shell
"make" -C /home/jeandudey/Dev/RIOT/sys/shell/commands
"make" -C /home/jeandudey/Dev/RIOT/sys/xtimer
   text	   data	    bss	    dec	    hex	filename
 199469	  19102	  98300	 316871	  4d5c7	/home/jeandudey/Dev/RIOT/examples/gcoap/bin/native/gcoap_example.elf
/home/jeandudey/Dev/RIOT/examples/gcoap/bin/native/gcoap_example.elf -z [::1]:17754 --eui64="E6:CB:21:BF:9B:F8:72:62" /dev/ttyACM0 
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

NETOPT_RX_END_IRQ not implemented by driver
main(): This is RIOT! (Version: 2021.07-devel-226-g9aa0d-examples/gcoap-zep)
gcoap example app
All up, running the shell now
> help
help
Command              Description
---------------------------------------
coap                 CoAP example
reboot               Reboot the node
version              Prints current RIOT_VERSION
pm                   interact with layered PM subsystem
ps                   Prints information about running threads.
ping6                Ping via ICMPv6
ping                 Alias for ping6
random_init          initializes the PRNG
random_get           returns 32 bit of pseudo randomness
nib                  Configure neighbor information base
ifconfig             Configure network interfaces
6ctx                 6LoWPAN context configuration tool
> ifconfig
ifconfig
Iface  7  HWaddr: 72:62  Channel: 26  NID: 0x23 
          Long HWaddr: E6:CB:21:BF:9B:F8:72:62 
          L2-PDU:102  MTU:1280  HL:64  6LO  
          IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::e4cb:21bf:9bf8:7262  scope: link  VAL
          inet6 addr: 2001:db8::e4cb:21bf:9bf8:7262  scope: global  VAL
          inet6 group: ff02::1
          
> ping 2001:db8::e48b:fd:7abf:1361
ping 2001:db8::e48b:fd:7abf:1361
12 bytes from 2001:db8::e48b:fd:7abf:1361: icmp_seq=0 ttl=64 rssi=8096 dBm time=0.683 ms
12 bytes from 2001:db8::e48b:fd:7abf:1361: icmp_seq=1 ttl=64 rssi=8096 dBm time=0.474 ms
12 bytes from 2001:db8::e48b:fd:7abf:1361: icmp_seq=2 ttl=64 rssi=8096 dBm time=0.720 ms

--- 2001:db8::e48b:fd:7abf:1361 PING statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.474/0.625/0.720 ms
> ifconfig
ifconfig
Iface  7  HWaddr: 72:62  Channel: 26  NID: 0x23 
          Long HWaddr: E6:CB:21:BF:9B:F8:72:62 
          L2-PDU:102  MTU:1280  HL:64  6LO  
          IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::e4cb:21bf:9bf8:7262  scope: link  VAL
          inet6 addr: 2001:db8::e4cb:21bf:9bf8:7262  scope: global  VAL
          inet6 group: ff02::1
          
> 
```
</details>

<details>
<summary>examples/gnrc_border_router</summary>

```
jeandudey at jean ~/D/RIOT> make -C examples/gnrc_border_router BOARD=native all term
make: Entering directory '/home/jeandudey/Dev/RIOT/examples/gnrc_border_router'
Building application "gnrc_border_router" for "native" with MCU "native".

"make" -C /home/jeandudey/Dev/RIOT/boards/native
"make" -C /home/jeandudey/Dev/RIOT/boards/native/drivers
"make" -C /home/jeandudey/Dev/RIOT/core
"make" -C /home/jeandudey/Dev/RIOT/cpu/native
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/cli_eui_provider
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/netdev_tap
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/periph
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/socket_zep
"make" -C /home/jeandudey/Dev/RIOT/cpu/native/stdio_native
"make" -C /home/jeandudey/Dev/RIOT/drivers
"make" -C /home/jeandudey/Dev/RIOT/drivers/netdev
"make" -C /home/jeandudey/Dev/RIOT/drivers/periph_common
"make" -C /home/jeandudey/Dev/RIOT/sys
"make" -C /home/jeandudey/Dev/RIOT/sys/auto_init
"make" -C /home/jeandudey/Dev/RIOT/sys/checksum
"make" -C /home/jeandudey/Dev/RIOT/sys/div
"make" -C /home/jeandudey/Dev/RIOT/sys/evtimer
"make" -C /home/jeandudey/Dev/RIOT/sys/fmt
"make" -C /home/jeandudey/Dev/RIOT/sys/iolist
"make" -C /home/jeandudey/Dev/RIOT/sys/luid
"make" -C /home/jeandudey/Dev/RIOT/sys/net/application_layer/uhcp
"make" -C /home/jeandudey/Dev/RIOT/sys/net/crosslayer/inet_csum
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netapi
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif/ethernet
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif/hdr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif/ieee802154
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netif/init_devs
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/netreg
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/icmpv6
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/icmpv6/echo
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ipv6
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ipv6/hdr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ipv6/nib
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/ndp
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/ctx
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/frag
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/frag/fb
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/frag/rb
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/iphc
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/network_layer/sixlowpan/nd
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/pkt
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/pktbuf
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/pktbuf_static
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/sock
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/sock/udp
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/transport_layer/udp
"make" -C /home/jeandudey/Dev/RIOT/sys/net/gnrc/application_layer/uhcpc
"make" -C /home/jeandudey/Dev/RIOT/sys/net/link_layer/eui_provider
"make" -C /home/jeandudey/Dev/RIOT/sys/net/link_layer/ieee802154
"make" -C /home/jeandudey/Dev/RIOT/sys/net/link_layer/l2util
"make" -C /home/jeandudey/Dev/RIOT/sys/net/netif
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/icmpv6
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/ipv6/addr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/ipv6/hdr
"make" -C /home/jeandudey/Dev/RIOT/sys/net/network_layer/sixlowpan
"make" -C /home/jeandudey/Dev/RIOT/sys/net/transport_layer/udp
"make" -C /home/jeandudey/Dev/RIOT/sys/posix/inet
"make" -C /home/jeandudey/Dev/RIOT/sys/ps
"make" -C /home/jeandudey/Dev/RIOT/sys/random
"make" -C /home/jeandudey/Dev/RIOT/sys/random/tinymt32
"make" -C /home/jeandudey/Dev/RIOT/sys/shell
"make" -C /home/jeandudey/Dev/RIOT/sys/shell/commands
"make" -C /home/jeandudey/Dev/RIOT/sys/xtimer
   text	   data	    bss	    dec	    hex	filename
 207455	  18921	 113820	 340196	  530e4	/home/jeandudey/Dev/RIOT/examples/gnrc_border_router/bin/native/gnrc_border_router.elf
make -C ethos
cc -O3 -Wall ethos.c -o ethos
make -C uhcpd
mkdir bin
cc -g -O3 -Wall -DUHCP_SERVER -I/home/jeandudey/Dev/RIOT/sys/include -I. /home/jeandudey/Dev/RIOT/sys/net/application_layer/uhcp/uhcp.c uhcpd.c -o bin/uhcpd
make -C sliptty
cc -O3 -Wall -pedantic sliptty.c -o sliptty
make -C zep_dispatch
mkdir bin
cc -g -O3 -Wall -Wextra  -I/home/jeandudey/Dev/RIOT/core/include main.c -o bin/zep_dispatch
sudo /home/jeandudey/Dev/RIOT/dist/tools/zep_dispatch/start_network.sh -z 17754 /home/jeandudey/Dev/RIOT/examples/gnrc_border_router/bin/native/gnrc_border_router.elf 2001:db8::/64 -z [::1]:17754 tap0 
[sudo] password for jeandudey:                 
net.ipv6.conf.tap0.forwarding = 1
net.ipv6.conf.tap0.accept_ra = 0
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

NETOPT_RX_END_IRQ not implemented by driver
NETOPT_RX_END_IRQ not implemented by driver
gnrc_uhcpc: Using 6 as border interface and 7 as wireless interface.
uhcp_client(): sending REQ...
main(): This is RIOT! (Version: 2021.07-devel-226-g9aa0d-examples/gcoap-zep)
RIOT border router example application
All up, running the shell now
> udp_sendto(): sendto(): Cannot assign requested address
uhcp_client(): no reply received
uhcp_client(): sending REQ...
got packet from fe80::f475:89ff:fe4d:1aab port 55311
uhcp: push from fe80::f475:89ff:fe4d:1aab:55311 prefix=2001:db8::/64
gnrc_uhcpc: uhcp_handle_prefix(): add compression context 0 for prefix 2001:db8::e48b:fd:7abf:1361/64
gnrc_uhcpc: uhcp_handle_prefix(): configured new prefix 2001:db8::e48b:fd:7abf:1361/64
help
help
Command              Description
---------------------------------------
reboot               Reboot the node
version              Prints current RIOT_VERSION
pm                   interact with layered PM subsystem
ps                   Prints information about running threads.
ping6                Ping via ICMPv6
ping                 Alias for ping6
random_init          initializes the PRNG
random_get           returns 32 bit of pseudo randomness
nib                  Configure neighbor information base
ifconfig             Configure network interfaces
6ctx                 6LoWPAN context configuration tool
> ifconfig
ifconfig
Iface  7  HWaddr: 13:61  Channel: 26  NID: 0x23 
          Long HWaddr: E6:8B:00:FD:7A:BF:13:61 
          L2-PDU:102  MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::e48b:fd:7abf:1361  scope: link  VAL
          inet6 addr: 2001:db8::e48b:fd:7abf:1361  scope: global  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ffbf:1361
          
Iface  6  HWaddr: F6:75:89:4D:1A:AC 
          L2-PDU:1500  MTU:1500  HL:64  RTR  
          Source address length: 6
          Link type: wired
          inet6 addr: fe80::f475:89ff:fe4d:1aac  scope: link  VAL
          inet6 addr: fe80::2  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff4d:1aac
          inet6 group: ff02::1:ff00:2
          
> uhcp_client(): sending REQ...
got packet from fe80::f475:89ff:fe4d:1aab port 56666
uhcp: push from fe80::f475:89ff:fe4d:1aab:56666 prefix=2001:db8::/64
gnrc_uhcpc: uhcp_handle_prefix(): got same prefix again
gnrc_uhcpc: uhcp_handle_prefix(): add compression context 0 for prefix 2001:db8::e48b:fd:7abf:1361/64
uhcp_client(): sending REQ...
got packet from fe80::f475:89ff:fe4d:1aab port 35208
uhcp: push from fe80::f475:89ff:fe4d:1aab:35208 prefix=2001:db8::/64
gnrc_uhcpc: uhcp_handle_prefix(): got same prefix again
gnrc_uhcpc: uhcp_handle_prefix(): add compression context 0 for prefix 2001:db8::e48b:fd:7abf:1361/64
uhcp_client(): sending REQ...
got packet from fe80::f475:89ff:fe4d:1aab port 57754
uhcp: push from fe80::f475:89ff:fe4d:1aab:57754 prefix=2001:db8::/64
gnrc_uhcpc: uhcp_handle_prefix(): got same prefix again
gnrc_uhcpc: uhcp_handle_prefix(): add compression context 0 for prefix 2001:db8::e48b:fd:7abf:1361/64
uhcp_client(): sending REQ...
got packet from fe80::f475:89ff:fe4d:1aab port 55555
uhcp: push from fe80::f475:89ff:fe4d:1aab:55555 prefix=2001:db8::/64
gnrc_uhcpc: uhcp_handle_prefix(): got same prefix again
gnrc_uhcpc: uhcp_handle_prefix(): add compression context 0 for prefix 2001:db8::e48b:fd:7abf:1361/64
uhcp_client(): sending REQ...
got packet from fe80::f475:89ff:fe4d:1aab port 35061
uhcp: push from fe80::f475:89ff:fe4d:1aab:35061 prefix=2001:db8::/64
gnrc_uhcpc: uhcp_handle_prefix(): got same prefix again
gnrc_uhcpc: uhcp_handle_prefix(): add compression context 0 for prefix 2001:db8::e48b:fd:7abf:1361/64
uhcp_client(): sending REQ...
got packet from fe80::f475:89ff:fe4d:1aab port 36279
uhcp: push from fe80::f475:89ff:fe4d:1aab:36279 prefix=2001:db8::/64
gnrc_uhcpc: uhcp_handle_prefix(): got same prefix again
gnrc_uhcpc: uhcp_handle_prefix(): add compression context 0 for prefix 2001:db8::e48b:fd:7abf:1361/64
```

</details>



-- 
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/16472#pullrequestreview-660094997
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210514/7b97fc35/attachment-0001.htm>


More information about the notifications mailing list