RIOT networking example for M3 nodes
Duration: 30 minutes
Description: The aim of this tutorial is to run an experiment on the M3 nodes using the gnrc_networking example provided in the RIOT repository. It illustrates a ping echo request and echo reply between two M3 nodes.
- Connect to the SSH frontend of Saclay :
my_computer:~$ ssh <login>@saclay.iot-lab.info
- Compile the firmware
<login>@<site>:~$ cd iot-lab/parts/RIOT/examples/gnrc_networking/ <login>@<site>:~$ BOARD=iotlab-m3 make all
- Retrieve the generated binary firmware file on your computer (execute this scp command on your computer!)
my_computer:$ scp <login>@saclay.iot-lab.info:iot-lab/parts/RIOT/examples/gnrc_networking/bin/iotlab-m3/gnrc_networking.elf gnrc_networking.elf
- Log into the Web portal with your account credentials
- Submit a new experiment:
- Set an experiment name (no spaces nor funny chars in the experiment name)
- Duration: 20 minutes and starting “As soon as possible“
- Choose nodes with Architecture m3 (at86rf231) / Site = saclay / Number = 2 and click “Add to experiment”
- Add your binary firmware gnrc_networking.elf with nodes selected
- Wait experiment state Running in dashboard list. After click on experiment details and visualize which nodes you are booked and verify that you have Success in the deployment result
- In our example we have two nodes m3-9 and m3-14. You can interact with a node on the SSH frontend and type help to explore the available commands
<login>@<site>:~$ nc m3-9 20000 > help Command Description --------------------------------------- udp send data over UDP and listen on UDP ports reboot Reboot the node ps Prints information about running threads. ping6 Ping via ICMPv6 random_init initializes the PRNG random_get returns 32 bit of pseudo randomness ifconfig Configure network interfaces txtsnd send raw data fibroute Manipulate the FIB (info: 'fibroute [add|del]') ncache manage neighbor cache by hand routers IPv6 default router list rpl rpl configuration tool [help|init|rm|root|show]
- For instance, on a node, type ifconfig to get all configured addresses of the device
<login>@<site>:~$ nc m3-9 20000 > ifconfig Iface 7 HWaddr: 1d:12 Channel: 26 NID: 0x23 TX-Power: 0dBm State: IDLE CSMA Retries: 4 Long HWaddr: 36:32:48:33:46:d5:9d:12 AUTOACK CSMA MTU:1280 HL:64 6LO RTR IPHC Source address length: 8 Link type: wireless inet6 addr: ff02::1/128 scope: local [multicast] inet6 addr: fe80::3432:4833:46d5:9d12/64 scope: local inet6 addr: ff02::1:ffd5:9d12/128 scope: local [multicast]
- This node has the link-local IPv6 address fe80::3432:4833:46d5:9d12.Running the same command for node m3-14 reveals a link-local IPv6 address of fe80::3432:4833:46d9:962a.
- Now, we can perform pings between the two nodes. On one node, use the ping6 command to initiate the ping echo requests.
<login>@<site>:~$ nc m3-9 20000 > ping6 fe80::3432:4833:46d9:962a 12 bytes from fe80::3432:4833:46d9:962a: id=84 seq=1 hop limit=64 time = 7.109 ms 12 bytes from fe80::3432:4833:46d9:962a: id=84 seq=2 hop limit=64 time = 4.595 ms 12 bytes from fe80::3432:4833:46d9:962a: id=84 seq=3 hop limit=64 time = 5.215 ms --- fe80::3432:4833:46d9:962a ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2.0622373 s rtt min/avg/max = 4.595/5.639/7.109 ms