Introduction to Over The Air Reprogramming under Windows
[The ESB Embedded Sensor Board]

Author:
Joakim Eriksson, Niclas Finne

Introduction

This is a brief introduction how to program ESB sensor nodes over radio under Windows. It is assumed that you already have the environment setup for programming ESB sensor nodes using JTAG cable.

Configuring SLIP under Windows XP

This section describes how to setup a SLIP connection under Windows. A SLIP connection forwards TCP/IP traffic to/from the sensor nodes and lets you communicate with them using standard network tools such as ping.

  1. Click start button and choose 'My Computer'. Right-click 'My Network Places' and choose 'Properties'.
    slip01.jpg
  2. Click 'Create a new connection'.
    slip02.jpg
  3. Select 'Set up an advanced connection'.
    slip03.jpg
  4. Select 'Connect directly to another computer'.
    slip04.jpg
  5. Select 'Guest'.
    slip05.jpg
  6. Select a name for the slip connection (for example 'ESB').
    slip06.jpg
  7. Select the serial port to use when communicating with the sensor node.
    slip07.jpg
  8. Add the connection by clicking 'Finish'.
    slip08.jpg
  9. A connection window will open. Choose 'Properties'.
    slip09.jpg
    slip10.jpg
  10. Click on 'Configure...' and deselect all selected buttons. Choose the speed 57600 bps.
    slip11.jpg
  11. Close the modem configuration window, and go to the 'Options' tab in the ESB properties. Deselect all except 'Display progress...'.
    slip12.jpg
  12. Go to the 'Networking' tab. Change to 'SLIP: Unix Connection' and deselect all except the first two items in the connection item list.
    slip13.jpg
  13. Select 'Internet Protocol (TCP/IP)' and click 'Properties'. Enter the IP address '172.16.0.1'.
    slip14b.jpg
  14. Click 'Advanced' and deselect all checkboxes in the 'Advanced TCP/IP Settings'. Go to the 'WINS' tab and deselect 'Enable LMHOSTS lookup' if it is selected. Also select 'Disable NetBIOS over TCP/IP'.
    slip15.jpg
    slip16.jpg

Setup ESB for over the air programming

Make sure you have the latest version of Contiki (older versions of Contiki might not work with SLIP under Windows).

  1. Each node needs an IP address for OTA to work. The node id is used to construct an IP address for the node. If you specify 2 as node id, the node will have the IP address 172.16.1.2. Each node should have its own unique node id. To set the node id move to the directory 'contiki-2.x/examples/esb' and run
    make burn-nodeid.u nodeid=X
    
    Use the number 1, 2, 3, etc, as the node id (X) for the nodes. This will give the nodes the IP addresses 172.16.1.1, 172.16.1.2, etc. The node id only needs to be set once for each node and it will remain even when new applications are uploaded onto the node.
  2. You need to compile a core and upload it onto the nodes. All nodes must run the same core. Move to the directory 'contiki-2.x/examples/esb' and run
    make WITH_CODEPROP=1 core
    make WITH_CODEPROP=1 core.u
    
    to upload the core to your nodes.
  3. Attach the ESB node to the serial port and make sure it is turned on. Select your ESB SLIP connection in your 'Network Connections' and choose 'Connect' (or double click on it). If everything works Windows should say that you have a new connection.
  4. Set the IP address for the node by pinging it (it will claim the IP address of the first ping it hears). Note that the slip interface has IP address 172.16.0.1 but the node will have the IP address 172.16.1.1.
    ping 172.16.1.1
    

If everything works the node should click and reply to the pings.

You also need a program to send the application to connected nodes. Compile it by running

make send

Send programs over the air

Contiki applications to be installed via radio are compiled somewhat different compared to normal applications.

Make sure you have a node with IP address 172.16.1.1 connected to your serial port and have SLIP activated. Then compile and send a testprogram by running

make beeper.ce
./send 172.16.1.1 beeper.ce

Generated on Mon Apr 11 14:23:55 2011 for Contiki 2.5 by  doxygen 1.6.1