Subject: [core] Error running restful server - coap example on real mote. help me!

From: Thanh Ngoc <[email-masked]>
Date: Fri, 14 Jan 2011 14:36:12 +0900

Hello Every one,

I try to run restful server- coap example in real mote. but it can not query
by using coap://...

when i run resr-server-example with COOJA. it is successful for access from
coap client , firefox browser with coap plugin.
coap://[aaaa::0212:7402:0002:0202]:61616/light
--> i can access resources : light, well-know, led....

but when *i deploy in real mote.*
i set up the same as guides in file : readme.txt.

I use mote : telosb and run contiki on Linux
1.* i installed one node as border router, and connect router successful:*
"
********SLIP started on ``/dev/ttyUSB0''
opened tun device ``/dev/tun0''
ifconfig tun0 inet `hostname` up
ifconfig tun0 add aaaa::1/64
ifconfig tun0

tun0      Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.1.1  P-t-P:127.0.1.1  Mask:255.255.255.255
          inet6 addr: aaaa::1/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

*** Address:aaaa::1 => aaaa:0000:0000:0000
SIN: 10
Got configuration message of type P
Setting prefix aaaa::
created a new RPL dag
Server IPv6 addresses:
  *aaaa::212:7400:10d0:42e8
  fe80::212:7400:10d0:42e8*
SIN: 70
slip-bridge: Destination off-link but no route
....
"

2. i connected node with rest-server application deploy and connect
successful.
when i reset mote print:

"
Rime started with address *0.18.116.0.16.197.67.156*
MAC 00:12:74:00:10:c5:43:9c Contiki 2.5 started. Node id is not set.
CSMA ContikiMAC, channel check rate 8 Hz, radio channel 26
Tentative link-local IPv6 address *fe80:0000:0000:0000:0212:7400:10c5:439c*
Starting 'Rest Server Example'
COAP Server

"
and i connect mote successul

"
user@instant-contiki:~/contiki-2.x/examples/rest-example$ make login
TARGET=sky MOTE=2
../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB1
connecting to /dev/ttyUSB1 (115200) [OK]
"

. but i can not ping6 to mote address as it showed when i reset mote.
*ping6 0.18.116.0.16.197.67.156 --> failed
ping6 fe80:0000:0000:0000:0212:7400:10c5:439c --> failed.*

i could ping only the address print when connect border router is: ping6
aaaa::212:7400:10d0:42e8 --> ok.

i try to run coap with some addresses above but it print: Server not
responding.
*coap://[aaaa::0212:7402:0002:0202]:61616/light --> Server not responding.

do you know what was i wrong?
and help me how can i test coap on real mote?

thank you very much,

Ngoc Thanh
*

---

From: dogan yazar <[email-masked]>
Date: Fri, 14 Jan 2011 00:13:28 -0800 (PST)

Hello,

0.18.116.0.16.197.67.156 is NOT an IP address (it is RIME address) so it is 
normal that pinging it fails!

Try this one instead (which accesses a link local address via tun0 interface)
ping6 fe80:0000:0000:0000:0212:7400:10c5:439c%tun0

And from the client, try this one first
coap://[aaaa::0000:0000:0000:0212:7400:10c5:439c]:61616/light

If it does not work, you should again access the link local address via the tun0 
interface.

________________________________
From: Thanh Ngoc <[email-masked]>
To: [email-masked]; [email-masked]
Sent: Fri, January 14, 2011 6:36:12 AM
Subject: [Contiki-developers] Error running restful server - coap example on 
real mote. help me!

Hello Every one,

I try to run restful server- coap example in real mote. but it can not query by 
using coap://...

when i run resr-server-example with COOJA. it is successful for access from coap 
client , firefox browser with coap plugin.
coap://[aaaa::0212:7402:0002:0202]:61616/light
--> i can access resources : light, well-know, led....

but when i deploy in real mote.
i set up the same as guides in file : readme.txt.

1.i installed one node as border router, and connect router successful:

  aaaa::212:7400:10d0:42e8
  fe80::212:7400:10d0:42e8

2. i connected node with rest-server application deploy and connect successful.
when i reset mote print: 

"
Rime started with address 0.18.116.0.16.197.67.156
MAC 00:12:74:00:10:c5:43:9c Contiki 2.5 started. Node id is not set.
CSMA ContikiMAC, channel check rate 8 Hz, radio channel 26
Tentative link-local IPv6 address fe80:0000:0000:0000:0212:7400:10c5:439c
Starting 'Rest Server Example'
COAP Server

"

"
user@instant-contiki:~/contiki-2.x/examples/rest-example$ make login TARGET=sky 
MOTE=2
../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB1
connecting to /dev/ttyUSB1 (115200) [OK]
"

. but i can not ping6 to mote address as it showed when i reset mote.
ping6 0.18.116.0.16.197.67.156 --> failed
ping6 fe80:0000:0000:0000:0212:7400:10c5:439c --> failed.

i try to run coap with some addresses above but it print: Server not responding.
coap://[aaaa::0212:7402:0002:0202]:61616/light --> Server not responding.

thank you very much,

Ngoc Thanh