ROSAND R-Idge User manual

R-Idge
6LoWPAN USB router
User Guide
Revision 1.1
!

TABLE OF CONTENTS
1.INTRODUCTION!3
2.INSTALLING R-IDGE ON LINUX!4
3.CONFIGURING R-IDGE ON LINUX!5
3.1.Configurable parameters!5
3.1.1.RF channel!5
3.1.2.RF output power!5
3.1.3.RF 802.15.4 PANID!6
3.1.4.IPv6 Header Compression Shared Context!6
3.2.Configuring R-Idge!6
3.2.1.Set up the configuration program!6
3.2.2.Prepare your user account!6
3.2.3.Change the configurable parameters!6
3.3.Setting up the network!7
3.3.1.Activate IPv6 routing!7
3.3.2.Configure the network!7
3.4.Routing configuration!7
3.4.1.Configure Neighbor Discovery (RA/RS)!7
3.4.2.Configuring RPL!8
4.INSTALLING NEW FIRMWARE!9
4.1.Set up the installation program!9
4.2.Prepare the new firmware!9
4.3.Put the router in bootloader mode!9
4.4.Upload the new firmware!9
!Table of Contents
Technical guide (revision 1.1)!2

1. INTRODUCTION
R-Idge is a 6LoWPAN USB Router. It aggregates 6LoWPAN mesh networks and interconnects
them to the enterprise local and wide-area IPv6 networks. R-Idge eliminates need to dedicated
high-cost 6LoWPAN router and offers a seemless scalability.
This document explains how to run R-Idge on Linux (2.6 and above).
!Introduction
Technical guide (revision 1.1)!3

2. INSTALLING R-IDGE ON LINUX
When plugging R-Idge to an available USB connector, it will automatically:
•create a serial device /dev/ttyACM0.
•configure an IPV6 link-local address fe80::xxxx:xxxx:xxxx:xxxx/64,
xxxx:xxxx:xxxx:xxxx being the router MAC address.
You can check this with the following commands:
ls/dev/ttyACM0
ifconfigusb0
If you have other serial device which might already use /dev/ttyACM0 or a network device
which might already use usb0, you can perform the following process:
•unplug R-Idge
•run the two commands
ls/dev/ttyACM*
ifconfig
•plug R-Idge to the computer
• run again the two commands
ls/dev/ttyACM*
ifconfig
R-Idge corresponds to the added ttyACMx and usbx device.
For the remaining of the document, we assume that R-Idge creates /dev/ttyACM0 and usb0.
!Installing R-Idge on Linux
Technical guide (revision 1.1)!4

3.CONFIGURING R-IDGE ON LINUX
3.1.Configurable parameters
R-Idge is shipped with the following factory default parameters:
•RF channel: 26
•RF output: 37 (-18dBm)
• RF 802.15.4 PAN ID: 0xABCD
• LOWPAN_IPHC shared context: none
3.1.1.RF channel
R-Idge is a IEEE 802.15.4 device working in the ISM 2.4 GHz frequency band. This frequency
band is divided into 16 channels: the lowest channel number is 11, the highest channel number is
26.
All the devices should use the same channel in order to be able to communicate.
RF channel can be chosen between these 16 channels.
3.1.2. RF output power
The RF output parameter controls the power of the RF transmission.
The value of RF output can be chosen between 5 and 255.
The following table shows typical output power settings.
RF output
Typical output power (dBm)
Typical current consumption
(mA)
5
-22
23
37
-18
24
117
-8
25
149
-4
26
181
-1.5
27
197
-0.5
28
213
1
29
229
2.5
31
245
4.5
34
!Configuring R-idge on Linux
Technical guide (revision 1.1)!5

3.1.3. RF 802.15.4 PANID
The PANID identifies the 802.15.4 network. It is 2-byte length and must be unique. All the devices
in the same network should have the same PANID.
3.1.4. IPv6 Header Compression Shared Context
R-Idge can be configured to use the LOWPAN_IPHC encoding format (as specified in RFC 6282).
The LOWPAN_IPHC encoding format relies on shared context to allow compression of arbitrary
prefixes.
Up to five (5) shared contexts can be configured on the router. By default, there is no shared
context defined.
3.2. Configuring R-Idge
If necessary, these factory default parameters can be changed. The configuration program
“cfgtool” is provided for this purpose.
3.2.1. Set up the Configuration program
The Configuration program is available in deb package, rpm package and source code.
It can be downloaded at the following url http://www.rosand-tech.com/downloads.!
See the instructions detailed in the document “Firmware Configuration Manual” if you need to
compile the source code.
3.2.2. Prepare your user account
In order to be able to change the R-Idge configurable parameters, your account must belong to
the group “dialout”.
Run the command:
grepdialout/etc/group
If your account is not listed, add it to the “dialout” group
sudo useradd -G dialout <account>
Log out and login again to activate the account.
3.2.3. Change the configurable parameters
Let's assume that your network uses channel 21 and PANID 1001.
Run the command:
!Configuring R-idge on Linux
Technical guide (revision 1.1)!6

cfgtool -c serial -p ridge -U channel:w:21: -U panid:w:1001:
You can run man cfgtool to know about all the options of cfgtool.
The document “Firmware Configuration Manual” gives more detailed information. It can be
downloaded at the url http://www.rosand-tech.com/products/r-idge/doc.html.
3.3. Setting up the network
3.3.1. Activate IPv6 routing
Edit the file “/etc/sysctl.conf” by setting to 1 ipv6 forwarding:
net.ipv6.conf.all.forwarding=1
Run the command:
sudo echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
3.3.2. Configure the network
Configure the IPV6 address on usb0:
ip -6 address add 2001:db8:1::1/64 dev usb0
3.4. Routing configuration
R-Idge can work with different routing protocols. In this section, we will show how to configure two
routing protocols:
- Neighbor Discovery (RA/RS)
- RPL
Choose the most suited routing protocol for your Wireless Sensor Network.
3.4.1. Configure Neighbor Discovery (RA/RS)
radvd is the Linux IPv6 Router Advertisement daemon.
Install the radvd daemon.
In order to run radvd on the interface usb0 and to advertise the prefix 2001:db8:1::/64 for
address autoconfiguration, add the following section to the radvd configuration file
(usually /etc/radvd.conf):
!Configuring R-idge on Linux
Technical guide (revision 1.1)!7

Interface usb0
{
IgnoreIfMissing on;
AdvSendAdvert on;
AdvLinkMTU 1280;
AdvCurHopLimit 128;
AdvReachableTime 360000;
MinRtrAdvInterval 100;
MaxRtrAdvInterval 150;
AdvDefaultLifetime 200;
prefix 2001:db8:1::/64
{
AdvOnLink on;
AdvAutonomous on;
};
};
Activate radvd
sudoserviceradvdstart
or
sudo/etc/init.d/radvdstart
3.4.2. Configuring RPL
If you want to use the RPL protocol within your WSN, a Linux RPL Edge Router daemon is
provided. The rpld daemon is available in deb package, rpm package and source code.
It can be downloaded at the following url http://www.rosand-tech.com/downloads.!
In order to activate rpl on usb0 in daemon mode (background), run the following command:
rpld-iusb0-D
You can run man rpld to know about all the options of rpld.
!Configuring R-idge on Linux
Technical guide (revision 1.1)!8

4. INSTALLING NEW FIRMWARE
The firmware loaded in the R-Idge router is modifiable. New firmware can be uploaded to the
router through the USB interface.
4.1. Set up the Installation program
The Installation program is available in deb package, rpm package and source code.
It can be downloaded at the following url http://www.rosand-tech.com/downloads.!
See the instructions detailed in the document “Firmware Installation Manual” if you need to
compile the source code.
4.2. Prepare the new firmware
Download the new firmware from http://www.rosand-tech.com/products/r-idge/doc.html
Uncompress the downloaded file
unzip <filename>.zip
It will produce an Intel HEX file:<filename>-<version>.hex
4.3. Put the router in bootloader mode
Before uploading the firmware, the router must be in bootloader mode.
Please follow the below instructions:
• Press the reset button, the led RED will switch on.
• Maintain the reset button pressed until the led RED is off.
• The led GREEN will blink.
The router is now in bootloader mode.
4.4. Upload the new firmware
Run the command
bltool -c swra327 -p CC2531F128 -P /dev/ttyACM0 -U flash:w:<filename>-<version>.hex
You can run man bltool to know about all the options of bltool.
The document “Firmware Installation Manual” gives more detailed information. It can be
downloaded at the url http://www.rosand-tech.com/products/r-idge/doc.html.
!Installing new firmware
Technical guide (revision 1.1)!9
Reset button

Revision History
Revision number
Date
Description
1.0
15/04/2012
Initial version
1.1
01/08/2012
Add:
- Configuring RPL
- Installing new firmware
!Revision history
Technical guide (revision 1.1)!10
Table of contents