Skip to content

Using:Troubleshooting

maniacbug edited this page Aug 15, 2011 · 21 revisions

Navigation: Home | Scenarios | Installing | Using | Future

Using:Setup | Using:Troubleshooting | Using:Shell | Using:Sensors | Using:Actuation | Using:SLIP | Using:Webserver | Using:HTTP | Using:RPL

Hello World

From a terminal, type...

$ cd tests/hello-world <br/> $ make upload <br/> $ make login <br/>

Working correctly, you should see this:

connecting to /dev/ttyUSB0 (57600) [OK] <br/> Power-on reset. <br/> External reset! <br/> <br/> *******Booting Contiki 2.5******* <br/> MAC address 2:11:22:ff:fe:33:44:3 <br/> nullmac sicslowmac, channel 26 <br/> <br/> IP addresses [4 max] <br/> fdfd::3 <br/> fe80::11:22ff:fe33:4403 <br/> Hello, world <br/>

Ping

Now that we know the node itself is working and printing OK, we want to make sure two nodes can talk. The best way to do this is with a ping.

This requires two nodes. If you already have hello-world on one node, the easiest thing to do is to put ping-ipv6 on a second node, and ping the other. So for this example, say we already have hello-world working on node 3 on /dev/ttyUSB0.

$ cd tests/ping-ipv6 <br/> $ make upload AVRDUDE_PORT=/dev/ttyUSB1 NODE=3 <br/> $ make login AVRDUDE_PORT=/dev/ttyUSB1 <br/>

Working correctly, you will see this:

connecting to /dev/ttyUSB1 (57600) [OK] <br/> Power-on reset. <br/> External reset! <br/> <br/> *******Booting Contiki 2.5******* <br/> MAC address 2:11:22:ff:fe:33:44:1 <br/> nullmac sicslowmac, channel 26 <br/> In Process PING6 <br/> Wait for DAD <br/> <br/> IP addresses [4 max] <br/> fdfd::1 <br/> fe80::11:22ff:fe33:4401 <br/> Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 <br/> Echo reply received. <br/> Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 <br/> Echo reply received. <br/> Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 <br/> Echo reply received. <br/> Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 <br/> Echo reply received. <br/> Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 <br/> Echo reply received. <br/> END PING6 <br/>




UDP



Finally, we will want to be sure that two nodes can exchange real application data between them. We can do so with the UDP client/server test. Again, this requires two nodes. One node contains the server program, the other contains the client. When making the client, we need to tell it where to find the server by specifying NODE= the Node# of the server.



$ cd tests/udp-ipv6 <br/> $ make udp-server.avr-zigduino.u AVRDUDE_PORT=/dev/ttyUSB0 <br/> $ make udp-client.avr-zigduino.u AVRDUDE_PORT=/dev/ttyUSB1 NODE=3 <br/> $ make login AVRDUDE_PORT=/dev/ttyUSB0 <br/>

Working correctly, you'll see something like the following. The exact numbers will depend on the timing of when you do the 'make login'.

connecting to /dev/ttyUSB0 (57600) [OK] <br/> <br/> Power-on reset. <br/> External reset! <br/> <br/> *******Booting Contiki 2.5******* <br/> MAC address 2:11:22:ff:fe:33:44:3 <br/> nullmac sicslowmac, channel 26 <br/> <br/> IP addresses [4 max] <br/> fdfd::3 <br/> fe80::11:22ff:fe33:4403 <br/> UDP server started <br/> Server IPv6 addresses: fdfd::3 <br/> fe80::11:22ff:fe33:4403 <br/> <br/> +READY <br/> Server received: 'Hello 2 from the client' from fdfd::1 <br/> Responding with message: Hello from the server! (1) <br/> Server received: 'Hello 3 from the client' from fdfd::1 <br/> Responding with message: Hello from the server! (2) <br/> Server received: 'Hello 4 from the client' from fdfd::1 <br/> Responding with message: Hello from the server! (3) <br/> Server received: 'Hello 5 from the client' from fdfd::1 <br/> Responding with message: Hello from the server! (4) <br/> Server received: 'Hello 6 from the client' from fdfd::1 <br/> Responding with message: Hello from the server! (5) <br/> Server received: 'Hello 7 from the client' from fdfd::1 <br/> +OK PASS <br/>

Clone this wiki locally