https://github.com/kb2ma/riot-builder
https://github.com/kb2ma/riot-builder
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kb2ma/riot-builder
- Owner: kb2ma
- Created: 2020-03-07T23:46:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-07T23:48:47.000Z (about 5 years ago)
- Last Synced: 2025-01-28T21:46:43.438Z (4 months ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup for Networking Apps
RIOT supports several IP networking environments for running an app -- native (on workstation), USB via ethos, Wi-Fi on ESP platforms, etc. The setup for an environment is essentially the same regardless of the particular application to run. So, this document is a guide to building and running a RIOT application in various environments.## Environments
This document describes the setup for these environments:| Name | Description |
| ---- | ----------- |
| native | development workstation, Linux |
| usb | Uses the RIOT ethos tool (in `./dist/tools/ethos`) for Ethernet over USB serial |
| 6lo | 6LowPAN over 802.15.4 |
| inet | IPv6 over WiFi, using RIOT's GNRC library |
| inet.lwip | IPv6 over WiFi, using lwIP library |
| inet4.lwip | IPv4 over WiFi, using lwIP library |The setup instructions below for individual environments assume a client/server based networking application like gcoap.
## native
Setup for a single Linux native node connecting via TAP to a node on the workstation.```
RIOT native process
fd00:bbbb::2/64
|
TAP
|
Workstation (Linux)
fd00:bbbb::1/64
```Must manually run '`setup_tap.sh start`' to setup TAP, and '`setup_tap.sh stop`' to tear it down. The start script sets the address for the workstation.
After running the `term` target to start the RIOT instance, set the network address in its terminal:
```
> ifconfig 6 add fd00:bbbb::2/64
```## usb
Setup for a single physical board node connecting via USB/TAP to a node on the workstation. I use a samr21-xpro. Build with `Makefile.ula`.
```
RIOT board (samr21-xpro)
fd00:bbbb::2/64
|
USB/TAP
|
Workstation (Linux)
fd00:bbbb::1/64
````start_network_kb.sh` executes automatically when running the `term` target for the board, to setup and teardown the TAP interface.
After running the `term` target on the board, do the following:
**board**
```
> ifconfig 6 add fd00:bbbb::2/64
> nib neigh add 6 fd00:bbbb::1
```
where is the 6 hexadecimal colon separated MAC address of the TAP interface on the workstation.**workstation**
```
$ sudo ip route add fd00:bbbb::/64 via dev tap0
```
where is the link local address of the samr21-xpro## 6lo
Setup for a physical board that connects to a node on the workstation via an intermediate border router also on a physical board. The border router is built with `examples/gnrc_border_router`. It has a USB interface to the workstation.```
RIOT board (6lo on samr21-xpro)
fd00:aaaa::xxxx/64
|
6LoWPAN 802.15.4
|
fd00:aaaa::xxxx/64
RIOT board (border router "br" on samr21-xpro)
(no routable address on fd00:bbbb)
|
USB/TAP
|
workstation (Linux)
uhcpd generates fd00:aaaa::/64 addresses
fd00:bbbb::1/64
````start_network_kb.sh` executes automatically when running the `term` target for the board, to setup and teardown the TAP interface. Also, uhcpd generates fd00:aaaa::/64 addresses and installs them on both RIOT boards. So there is no additional setup.
## inet
Setup for a single physical board client node connected via WiFi to a server node in the cloud. I use ESP-12x (8266) Adafruit Feather board because it has WiFi on board, and so does not require a USB connection to an Internet gateway, like the samr21-xpro. This approach means we expect the WiFi access point to provide IPv6 Internet connectivity. Build with `Makefile.inet`.
```
RIOT board (esp-12x)
routeable IPv6 addr (auto-assigned)
|
WiFi/Internet
|
cloud instance (Linux)
routeable cloud address (see SERVER_ADDR below)
```Must define environment variables for `Makefile.inet`:
```
export RIOT_WIFI_SSID=""
export RIOT_WIFI_PASS=""
export SERVER_ADDR=\\\"\\\"