-
Notifications
You must be signed in to change notification settings - Fork 21
How to build your own Ethernet Zoul Router
An edge or border router is a device sitting between 2 networks, forwarding messages from either side. In a 6LoWPAN network, the border router connects to IPv6 networks, allowing to translate between each other. This is the default topology for any network intended to be connected to an infrastructure network. Interfaces like Ethernet, WiFi or GPRS/2G/3G are used to connect a border router to i.e Internet.
In Contiki and other OS traditionally the border routers are implemented via a tunslip6
script. Tunslip is a tool used to bridge IP traffic between a host and a border router over a serial line. Tunslip creates a virtual network interface (tun) on the host side and uses SLIP (serial line internet protocol) to encapsulate and pass IP traffic to and from the other side of the serial line. The network element sitting on the other side of the line does a similar job with it’s network interface. The tunslip6 script can run on a laptop or PC, Raspberry Pi, BeagleBone, etc.
A drawback about this solution is its requirement of an extra utility running in a system, and for most cases in which only a border router is needed, ending up with a dedicated host solely for this task.
One feasible option is to use a ready to use the ENC28J60, an Ethernet module driven over SPI, bundled with the RE-Mote or the Firefly for instant gratification. One advantage about this setup, is being able to "talk" directly to IPv4 devices as it runs below the hood an IP64 implementation, translating from IPv6 to IPv4.
We are currently developing our own router module, but in the meantime you can build your own!
- A ENC28J60 breakout module, this one is available from OLIMEX.
- A protoboard with wires, or jumper wires.
First connect the ENC28J60 SPI
pins to the Firefly
, we will only need to connect the MISO
, MOSI
, SCK
, CS
, GND
, RST
and 3.3V
. Both the RE-Mote
and Firefly
provides 3.3V so you only need to power up the nodes, and the ENC28J60 module will be powered by the Firefly/RE-Mote
.
Below is the pin-out of the ENC28J60 module from OLIMEX.
The ENC28J60 RST
pin #8 is Active Low
, we pull the pin to 3.3V as well as pin #10 as shown in the photo below.
The RE-Mote and Firefly uses the SPI0
port to communicate with the built-in CC1200
radio transceiver, to communicate with the ENC28J60 module we use the SPI1
instead (in the case of the RE-Mote it is shared with the Micro-SD).
Below is the pin-out of the Firefly:
The RE-Mote pin-out is available in its own wiki page.
The ENC28J60 CS
(chip select) pin #7 pin is connected to the PA7
pin.
Our eth-gw
IoT Ethernet gateway solution based on the Zoul is currently under evaluation and production (stay tuned!)
In the meantime we have pushed the code support in a development branch, available for testing and review. The code is pin compatible with the setup described above.
git clone https://github.com/alignan/contiki
git checkout pull/eth-gw
cd examples/zolertia/zoul/ip64-http-example/ip64-eth-gw
make TARGET=zoul BOARD=eth-gw ip64-router.upload
Read the README file for more instructions.
- Get the Code
- Toolchain and tools
- Getting Started with Zolertia products
- Change to SubGHZ interface
- Program the Zolertia platforms
- Configure Eclipse (IDE)
- Firefly as a Sniffer
- Sensors