Skip to content

Running on hardware

André Samuelsson edited this page Feb 28, 2018 · 2 revisions

Don't forget to make clean if something misbehaves.

Compile for hardware

The make motes command compiles the application for uploading on hardware. If you're not using our cluster implementation you can remove the "cluster" flag at the end of the command.

make motes log=0 printf=1 tx=31 mch=1 pch=0 sec=0 src=2 sync=0 failure=0 dynamic=1 initiator=1 interval=29 cluster=1

Uploading to msp430 motes.

As an example, let us say we want to upload the max-app located in /a2-synchrotron/a2-synchrotron-contiki/apps/chaos/max. Use the following command from that directory.

make TARGET=sky MOTES=/dev/ttyUSB0 max-app.upload

Note that this targets a specific mote. When multiple motes are plugged in you will see /dev/ttyUSB0, /dev/ttyUSB1 etc. When only one device is plugged in it will automatically be targeted and the MOTES argument can be omitted.

Setting the id of a mote.

The following command will set the mote id to 1. Use the MOTES argument to target a specific mote.

make TARGET=sky burn-nodeid.upload nodeid=1

However, there exists some dependency issue when running this from the max app. It works when running from another app, such as /a2-synchrotron-contiki/examples/hello-world.

View list of connected motes

make motelist

View output from running applications

make login MOTES=/dev/ttyUSB0

Stuff I don't know what it does

Since i run python3 i had to edit the hashbang of the msp430-bsl-linux file to use python2.7. ../../../tools/sky/msp430-bsl-linux --telosb -c /dev/ttyUSB0