In the following lines, a demo will be presented in order to test the WSN430v14 UART and radio drivers, for the implementation of OpenWSN on IoT-LAB. |
bsp_uart
Firmwareuser@pc:~/Desktop/openwsn/openwsn-fw$ sudo scons board=wsn430v14 toolchain=mspgcc bsp_uart [sudo] password: scons: Reading SConscript files ... ___ _ _ _ ___ _ _ | . | ___ ___ ._ _ | | | |/ __>| \ | | | || . \/ ._>| ' || | | |\__ \| | `___'| _/\___.|_|_||__/_/ <___/|_\_| |_| openwsn.org scons: done reading SConscript files. scons: Building targets ... Compiling firmware/openos/projects/common/01bsp_uart/01bsp_uart.o Linking firmware/openos/projects/common/01bsp_uart_prog msp430-size firmware/openos/projects/common/01bsp_uart_prog text data bss dec hex filename 3026 16 42 3084 c0c firmware/openos/projects/common/01bsp_uart_prog msp430-objcopy --output-target=ihex firmware/openos/projects/common/01bsp_uart_prog firmware/openos/projects/common/01bsp_uart_prog.ihex msp430-objcopy --output-target=binary firmware/openos/projects/common/01bsp_uart_prog firmware/openos/projects/common/01bsp_uart_prog.bin scons: done building targets. |
|
Following the instructions at https://www.iot-lab.info/tutorials/configure-your-ssh-access/.
On the IoT-LAB web interface, go to "Testbed", and click "New Experiment":
bsp_uart_v14"
Click "Rennes Map" to open the map representation of the motes in the Rennes site
There are motes in each of the 6 sites IoT-LAB is deployed in. We choose Rennes in this tutorial, feel free to pick another one. The only constraint is that they have to be WSN430v14 motes. |
Now that you have selected a mote, you need to upload the binary image you want the IoT-LAB to load on it.
01bsp_uartprog.ihex
file you have built in the step above. It is located at openwsn/openwsn-fw/firmware/openos/projects/common/01bsp_uart_prog.ihex
Click the "Add Association" button to associate the firmware to your mote
You'll see later on that you can associate different firmware images to different motes. |
You are now presented with the details of your experiment.
You might need to refresh the page for "Success" to appear in the "Deployment" column. "Success" indicates your firmware image was successfully loaded, and is now running somewhere in Rennes, France! |
user@pc:~$ ssh user@rennes.iot-lab.info Linux rennes 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 Welcome FIT IoT-LAB users Charter: * FIT IoT-LAB is shared among several users, so do a reasonable use of the platform * Quote FIT IoT-LAB in your scientific papers Post your issues on: * the user mailing-list: users@iot-lab.info * or the bug-tracker: https://github.com/iot-lab/iot-lab/issues Last login: Wed Aug 6 21:51:17 2014 from 213-245-14-123.rev.numericable.fr user@rennes:~$ |
IoT-LAB uses NetCat to create a TCP tunnel with the motes |
user@rennes:~$ nc wsn430-<moteID> 20000 Hello, World! openwsn openwsn Hello, World! Hello, World! c c Hello, World! Hello, World! Hello, World! iotlab iotlab |
In this application, we will use two motes. One of them will run the TX, and the other will run the RX. Each 500ms, the TX sends a packet in the air. The RX listens to these packets and write in its serial interface the length, number, RSSI, LQI and CRC of each packet.
user@pc:~$ cd Desktop/openwsn/openwsn-fw user@pc:~/Desktop/openwsn/openwsn-fw$ sudo scons board=wsn430v14 toolchain=mspgcc bsp_radio_rx [sudo] password for user: scons: Reading SConscript files ... ___ _ _ _ ___ _ _ | . | ___ ___ ._ _ | | | |/ __>| \ | | | || . \/ ._>| ' || | | |\__ \| | `___'| _/\___.|_|_||__/_/ <___/|_\_| |_| openwsn.org scons: done reading SConscript files. scons: Building targets ... msp430-size firmware/openos/projects/common/01bsp_radio_rx_prog text data bss dec hex filename 3198 0 186 3384 d38 firmware/openos/projects/common/01bsp_radio_rx_prog scons: done building targets. user@pc:~/Desktop/openwsn/openwsn-fw$ sudo scons board=wsn430v14 toolchain=mspgcc bsp_radio_tx scons: Reading SConscript files ... ___ _ _ _ ___ _ _ | . | ___ ___ ._ _ | | | |/ __>| \ | | | || . \/ ._>| ' || | | |\__ \| | `___'| _/\___.|_|_||__/_/ <___/|_\_| |_| openwsn.org scons: done reading SConscript files. scons: Building targets ... msp430-size firmware/openos/projects/common/01bsp_radio_tx_prog text data bss dec hex filename 3078 0 172 3250 cb2 firmware/openos/projects/common/01bsp_radio_tx_prog scons: done building targets. |
Load 01bsp_radio_rx_prog.ihex
in a mote and 01bsp_radio_tx_prog.ihex
in the other
user@pc:~$ ssh user@rennes.iot-lab.info Linux rennes 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 Welcome FIT IoT-LAB users Charter: * FIT IoT-LAB is shared among several users, so do a reasonable use of the platform * Quote FIT IoT-LAB in your scientific papers Post your issues on: * the user mailing-list: users@iot-lab.info * or the bug-tracker: https://github.com/iot-lab/iot-lab/issues Last login: Wed Aug 6 21:51:17 2014 from 213-245-14-123.rev.numericable.fr user@rennes:~$ |
The parser script's goal is to parse the packets and show them in a way humans can read. TX transmits arbitrary bytes thru the air, and not all of them have a corresponding character in ASCII table. Without it, the printed line in the terminal cannot be read. It is located at openwsn-fw GitHub repository, so we need to clone it in the server. |
user@rennes:~$ cd ~ user@rennes:~$ git clone https://github.com/openwsn-berkeley/openwsn-fw.git |
01bsp_radio_rx.py
" |
user@rennes:~$ cd openwsn-fw/projects/common/01bsp_radio_rx/ user@rennes:~/openwsn-fw/projects/common/01bsp_radio_rx$ python 01bsp_radio_rx.py ___ _ _ _ ___ _ _ | . | ___ ___ ._ _ | | | |/ __>| \ | | | || . \/ ._>| ' || | | |\__ \| | `___'| _/\___.|_|_||__/_/ <___/|_\_| |_| openwsn.org running IoT-lAB? (Y|N): Y motename? (e.g. wsn430-35): wsn430-<moteID> len=127 num=0 rssi=-56 lqi=107 crc=1 len=127 num=1 rssi=-56 lqi=105 crc=1 len=127 num=2 rssi=-56 lqi=106 crc=1 len=127 num=3 rssi=-56 lqi=107 crc=1 len=127 num=4 rssi=-56 lqi=108 crc=1 len=127 num=5 rssi=-56 lqi=107 crc=1 len=127 num=6 rssi=-56 lqi=107 crc=1 len=127 num=7 rssi=-56 lqi=106 crc=1 len=127 num=8 rssi=-56 lqi=108 crc=1 len=127 num=9 rssi=-56 lqi=107 crc=1 ... |
C:\Users\Thomas\Desktop\openwsn-fw>scons board=wsn430v14 toolchain=mspgcc bsp_eui64 scons: Reading SConscript files ... ___ _ _ _ ___ _ _ | . | ___ ___ ._ _ | | | |/ __>| \ | | | || . \/ ._>| ' || | | |\__ \| | `___'| _/\___.|_|_||__/_/ <___/|_\_| |_| openwsn.org scons: done reading SConscript files. scons: Building targets ... Compiling projects\common\01bsp_eui64\01bsp_eui64.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\board.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\bsp_timer.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\debugpins.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\eui64.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\leds.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\radiotimer.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\spi.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\uart.o Compiling build\wsn430v14_mspgcc\bsp\boards\wsn430v14\cc2420\radio.o Archiving build\wsn430v14_mspgcc\bsp\boards\wsn430v14\libbsp.a Indexing build\wsn430v14_mspgcc\bsp\boards\wsn430v14\libbsp.a Linking projects\common\01bsp_eui64_prog.exe msp430-size projects\common\01bsp_eui64_prog.exe text data bss dec hex filename 3610 16 74 3700 e74 projects\common\01bsp_eui64_prog.exe msp430-objcopy --output-target=ihex projects\common\01bsp_eui64_prog.exe projects\common\01bsp_eui64_prog.ihex msp430-objcopy --output-target=binary projects\common\01bsp_eui64_prog.exe projects\common\01bsp_eui64_prog.bin scons: done building targets. |
name | EUI64 |
---|---|
wsn430-1 | 14-15-92-00-12-91-ca-f5 |
wsn430-2 | 14-15-92-00-12-91-ca-73 |
wsn430-3 | 14-15-92-00-12-91-c8-8c |
wsn430-25 | 14-15-92-00-12-91-b4-bc |
wsn430-27 | 14-15-92-00-12-91-c8-9a |
wsn430-49 |
|
wsn430-50 | 14-15-92-00-12-91-cf-06 |
wsn430-51 | 14-15-92-00-12-91-b1-b6
|