Network devices are accessed through netdev
driver API
It has capabilities for receiving and sending data and for getting and setting options or states.
Note inclusion of netdev
modules in the Makefile
USEMODULE += gnrc_netdev_default
USEMODULE += auto_init_gnrc_netif
- Use
tapsetup
script in RIOT repository:
./../RIOT/dist/tools/tapsetup/tapsetup -c 2
- Creates
- Two TAP interfaces
tap0
andtap1
and - A bridge between them (
tapbr0
on Linux,bridge0
on OSX)
- Two TAP interfaces
- Check with
ifconfig
orip link
!
- Run the application on
native
:make all term PORT=tap0
- Type
help
- Run a second instance with
make all term PORT=tap1
- Type
ifconfig
on both to get hardware address and interface number - Use
txtsnd
command to exchange messages between the two instances
- Compile, flash, and run on the board
BOARD=samr21-xpro make all flash term
- Type
ifconfig
to get your hardware addresses - Use
txtsnd
to send one of your neighbors a friendly message