Contiki Sky cheat sheet - goofcode/UR GitHub Wiki

build

make example                # basic compilation
make example.upload         # compilation + upload
make login                  # serial login
make savetarget             # save current target

make example.upload login   # at once

# options
MOTES=/dev/tty...           # designate mote device
TARGET=sky                  # designate target device
DEFINES=MYTRACE,MYVALUE=4711 # make defines

tx power ์กฐ์ ˆ

NETSTACK_RADIO.set_value(RADIO_PARAM_TXPOWER, -25);      // set
NETSTACK_RADIO.get_value(RADIO_PARAM_TXPOWER, &result);  // get

h/w ACK setting

project-conf.h ์—

#undef CC2420_CONF_AUTOACK
#define CC2420_CONF_AUTOACK   1     // set (default in platform/sky/contiki-conf.h)
// #define CC2420_CONF_AUTOACK   0  // unset

node id setting

#include "sys/node-id.h"   // Include this library in order to be able to set node's ID.

node_id_burn(id);          // Call this function to burn the defined id
// node_id_restore();      // Call this function to restore the default id