OTAPCommunicator

Introduction

OTAPCommunicator is a tool for loading firmware onto motes via Over-the-Air Programming (OTAP).

The OTAP process sends software updates or files through the wireless network so that software upgrades can be distributed in a network without requiring physical access to each mote.  The OTAP process reliably sends the file data in small chunks, querying the mote for completeness and resending chunks that a mote did not receive. The OTAP process generally takes a long time (the duration can be measured in hours) to load a complete mote image over the network.

The OTAP Communicator is provided as part of the SmartMesh SDK as a command line executable for Windows and as Python source code.  

The OTAP Communicator requires the Serial Mux to be connected with the SmartMesh IP Manager.  

Command line arguments

The OTAP Communicator is run from the Windows command line prompt.  The program takes as input the path to the file(s) to load and optionally a list of destination motes.  Files are treated as normal files to be loaded into the mote's file system unless the file has an .otap or .otap2 extension (SmartMesh IP Motes require the .otap2 file format).  

OTAPCommunicator.exe [-v] [-p port] [-m MAC]... <file>...
Option 
-vEnable verbose output for debugging.

-p

Specify the TCP port of the Serial Mux.
-mSpecify the MAC address of the destination mote(s). This option can be provided multiple times. If the -m option is not specified, the file (or image) will be distributed to all motes.

Example

When the OTAP Communicator runs, it prints some helpful messages.

$ OTAPCommunicator.exe -m 00-17-0d-00-00-38-01-8d mote_ip_1_1_0_36_oski.otap2
Welcome to the OTAP communicator console
Loading mote_ip_1_1_0_36_oski.otap2
Starting OTAP for mote_ip_1_1_0_36_oski.otap2
Starting handshake with 1 motes
Handshake completed, 1 motes accepted
Starting data transmission of 2798 blocks, 1 motes left
...<long wait>...
Starting status query to 1 motes
Data complete. No motes left on incomplete list
Starting commit for 'mote_ip_1_1_0_36_oski.otap2' to 1 motes
00-17-0D-00-00-38-01-8D committed mote_ip_1_1_0_36_oski.otap2 [FCS=0x6ca0]
Successful OTAP to:
00-17-0D-00-00-38-01-8D

This output shows:

  • The OTAP Communicator loaded the mote_ip_1_1_0_36_oski.otap2 file. 
  • The OTAP Communicator initiated an OTAP session with 1 mote (because one mote was listed on the command line). 
  • 1 mote accepted the OTAP Handshake, which means the OTAP Communicator will start sending the file to the mote. 
  • The file data was transmitted successfully. 
  • Each successful commit shows the MAC address and FCS. 
  • A list of all successes and failures. 

Detailed output is logged to the otap_communicator.log log file in the directory from which the OTAP Communicator was run.

Neither OTAPCommunicator nor the motes themselves validate that the .otap2 files are appropriate for a particular mote. It is critical therefore that where there are motes that require different software, that the user carefully OTAP specific software onto a known subset of motes.