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

benpicco notifications at github.com
Fri May 14 14:56:50 CEST 2021


### Contribution description

To simulate gcoap on a 802.15.4 node we can use the `socket_zep` network interface for `native`.
This adds a convenient make variable to enable this with a single command line option.

### Testing procedure

 - create tap interface

        sudo dist/tools/tapsetup/tapsetup

  - start ZEP border router

        make -C examples/gnrc_border_router BOARD=native all term

 - run gcoap example with a simulated 802.15.4 interface with custom MAC address
 
        make -C examples/gcoap BOARD=native USE_ZEP=1 ZEP_MAC=\"E6:CB:21:BF:9B:F8:72:62\" all term

```
main(): This is RIOT! (Version: 2021.07-devel-225-gc21097)
gcoap example app
All up, running the shell now
> 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
```

### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16472

-- Commit Summary --

  * examples/gcoap: add support for socket ZEP

-- File Changes --

    M examples/gcoap/Makefile (15)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16472.patch
https://github.com/RIOT-OS/RIOT/pull/16472.diff

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


More information about the notifications mailing list