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
tapsetupscript in RIOT repository:
sudo ./../RIOT/dist/tools/tapsetup/tapsetup -c 2- Creates
- Two TAP interfaces
tap0andtap1and - A bridge between them (
tapbr0on Linux,bridge0on OSX)
- Two TAP interfaces
- Check with
ifconfigorip link!
- Run the application on
native:make all term PORT=tap0 - Type
help - Run a second instance with
make all term PORT=tap1 - Type
ifconfigon both to get hardware address and interface number - Use
txtsndcommand to exchange messages between the two instances
- Compile, flash, and run on the board
BOARD=samr21-xpro make all flash term - Type
ifconfigto get your hardware addresses - Use
txtsndto send one of your neighbors a friendly message
