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

$ cd tests/hello-world
$ make upload
$ make login

Working correctly, you should see this:

connecting to /dev/ttyUSB0 (57600) [OK]
Power-on reset.
External reset!

*******Booting Contiki 2.5*******
MAC address 2:11:22:ff:fe:33:44:3
nullmac sicslowmac, channel 26

IP addresses [4 max]
fdfd::3
fe80::11:22ff:fe33:4403
Hello, world

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
$ make upload AVRDUDE_PORT=/dev/ttyUSB1 NODE=3
$ make login AVRDUDE_PORT=/dev/ttyUSB1

Working correctly, you will see this:

connecting to /dev/ttyUSB1 (57600) [OK]
Power-on reset.
External reset!

*******Booting Contiki 2.5*******
MAC address 2:11:22:ff:fe:33:44:1
nullmac sicslowmac, channel 26
In Process PING6
Wait for DAD

IP addresses [4 max]
fdfd::1
fe80::11:22ff:fe33:4401
Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 
Echo reply received.
Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 
Echo reply received.
Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 
Echo reply received.
Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 
Echo reply received.
Sending Echo Request to fdfd:0000:0000:0000:0000:0000:0000:0003 from fdfd:0000:0000:0000:0000:0000:0000:0001 
Echo reply received.
END PING6

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
$ make udp-server.avr-zigduino.u AVRDUDE_PORT=/dev/ttyUSB0
$ make udp-client.avr-zigduino.u AVRDUDE_PORT=/dev/ttyUSB1 NODE=3
$ make login AVRDUDE_PORT=/dev/ttyUSB0

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]

Power-on reset.
External reset!

*******Booting Contiki 2.5*******
MAC address 2:11:22:ff:fe:33:44:3
nullmac sicslowmac, channel 26

IP addresses [4 max]
fdfd::3
fe80::11:22ff:fe33:4403
UDP server started
Server IPv6 addresses: fdfd::3
fe80::11:22ff:fe33:4403

+READY
Server received: 'Hello 2 from the client' from fdfd::1
Responding with message: Hello from the server! (1)
Server received: 'Hello 3 from the client' from fdfd::1
Responding with message: Hello from the server! (2)
Server received: 'Hello 4 from the client' from fdfd::1
Responding with message: Hello from the server! (3)
Server received: 'Hello 5 from the client' from fdfd::1
Responding with message: Hello from the server! (4)
Server received: 'Hello 6 from the client' from fdfd::1
Responding with message: Hello from the server! (5)
Server received: 'Hello 7 from the client' from fdfd::1
+OK PASS
Clone this wiki locally