No description
  • JavaScript 100%
Find a file
2016-06-16 00:47:33 -04:00
.gitignore Created .gitignore for node module dir 2016-06-12 23:13:12 -04:00
ota-image-sensortag.bin Added OTA images for both sensortag and srf06 board. 2016-06-08 14:51:36 -04:00
ota-image-srf06.bin Added OTA images for both sensortag and srf06 board. 2016-06-08 14:51:36 -04:00
ota-request.js OTA server works with minimal-net Contiki CoAP clients 2016-06-13 23:50:19 -04:00
ota-server.js Removed unnecessary code 2016-06-15 18:10:00 -04:00
package.json Replaced HTTP server with COAP server 2016-06-12 23:13:58 -04:00
README.md Update README for CoAP 2016-06-16 00:47:33 -04:00

OTA Image Server

This is an OTA firmware image server for CC2650-based devices running Contiki. This server is an incredibly simple CoAP server. It reads the OTA image file ota-image-example.bin, and serves it in chunks using CoAP's blockwise data transfer mechanism.

Please note this server will not automatically work with any .bin file. You must specifically compile your Contiki app to be an OTA image, with associated metadata (version number, UUID, CRC checksum).

Dependencies

This server is a Node.JS server so you will need the node binary to run it. For most Debian distros the command to install NodeJS is

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

For more information on other systems see the NodeJS installation page.

Running

To run the server using the provided ota-image-example firmware, just execute:

node ota-server.js ota-image-example.bin

To serve your own firmware over OTA, simple replace ota-image-example.bin with your own OTA image.

Configuration

The CoAP server can be made to listen using IPv6 or IPv4 by changing the following line in ota-server.js:

var server = coap.createServer({ type: 'udp6' });

To use IPv4 hostnames (e.g. 127.0.0.1), just use udp4 in lieu of udp6.