Clone this wiki locally
Once we can get data from nodes, now we want to control them, perhaps to put a node on our sprinklers and tell it to go soak the lawn from the comfort of the couch.
Because the shell has been so handy sofar, we'll use it again. This time, the 'sendcmd' command will let us send a particular command to a particular remote node. For this test, put the shell on two nodes.
$ cd tests/shell<br/> $ make upload login AVRDUDE_PORT=/dev/ttyUSB0<br/> $ make upload login AVRDUDE_PORT=/dev/ttyUSB1<br/>
This brings up the usual preamble. At the prompt, type "sendcmd fdfd::3 blink 20", and replace fdfd::3 by the IP address of the target node.
You'll see this on the sender:
68.1: Contiki> sendcmd fdfd::3 blink 10<br/> Sending command to fdfd::3<br/>
And this on the receiver, along with the requisite blinking of LED's
UDP Command Server received: 'blink 10' from fdfd::1<br/>