[Contiki-developers] Rest Example using Econotags

138 views
Skip to first unread message

Sana (CESLab)

unread,
Feb 26, 2011, 5:54:25 AM2/26/11
to contiki-d...@lists.sourceforge.net
Hi everybody,

I try to run the Rest example using HTTP, but it doesn't work! so I decided to
run the COAP one!
I was adviced me to use the cooper to ineract with the nodes helping by this
tutorial:
http://mc1322x.devl.org/repos/contiki-mc1322x/cpu/mc1322x/doc/rest-tutorial.md

I am only ineterested on the rest-server-example, so should I use the tutorial
step by step ( from the first one of RPL border rooter)?

Also, I install the contiki-mc1322x from here:
http://git.devl.org/?p=malvira/contiki-mc1322x.git;a=summary
knwing that I have already installed contiki-2.x.
when I write
cd contiki-mc1322x/examples/rest-example
make TARGET=redbee-econotag
this error is printed
"make: arm-none-eabi-gcc: Command not found
make: *** [obj_redbee-econotag/rimeaddr.o] Error 127"

Can I know what's the problem? and how I resolve it?

Regards,
Sana.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Contiki-developers mailing list
Contiki-d...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/contiki-developers

Kovatsch Matthias

unread,
Feb 26, 2011, 6:40:14 AM2/26/11
to Contiki developer mailing list
Hi Sana

> I am only interested on the rest-server-example, so should I use the


> tutorial
> step by step ( from the first one of RPL border rooter)?

To run any 6LoWPAN-based example you have to set up a border router (and run tunslip6) first.

> "make: arm-none-eabi-gcc: Command not found
> make: *** [obj_redbee-econotag/rimeaddr.o] Error 127"
>
> Can I know what's the problem? and how I resolve it?

You still need the toolchain to compile Contiki for the ARM core:
http://mc1322x.devl.org/toolchain.md

To run the REST example start here and check every step:
http://mc1322x.devl.org/repos/contiki-mc1322x/cpu/mc1322x/doc/rpl-tutorial.md

For mc1322x-load.pl in step 4 you will need to install this first:
$ sudo apt-get install libdevice-serialport-perl
$ sudo apt-get install libterm-readkey-perl

bbmc is optional, so you could omit " -c 'bbmc -l redbee-econotag reset'" when programming.

Then continue with:
http://mc1322x.devl.org/repos/contiki-mc1322x/cpu/mc1322x/doc/rest-tutorial.md


Regards
Matthias

Sana (CESLab)

unread,
Feb 26, 2011, 8:40:50 AM2/26/11
to contiki-d...@lists.sourceforge.net
Thnx Matthias
I try the toolchain like the http://mc1322x.devl.org/toolchain.md tutorial,
I blocked in the last steps:
"
$ export PATH=$PATH:$HOME/arm-2008q3/bin

Windows

Download and run:

http://www.codesourcery.com/sgpp/lite/arm/portal/package3689/public/arm-none-eabi/arm-2008q3-66-arm-none-eabi.exe"

How can I export the path? I write the command like it is written in the
tutorial "$ export PATH=$PATH:$HOME/arm-2008q3/bin'?
or I replace $PATH by the mine?

also, i installed the
"http://www.codesourcery.com/sgpp/lite/arm/portal/package3689/public/arm-none-eabi/arm-2008q3-66-arm-none-eabi.exe""
but I can't execute it! what's the problem?

Regards,
Sana

Philip

unread,
Feb 26, 2011, 9:18:30 AM2/26/11
to Contiki developer mailing list
What OS are you using? If it's Windows i think the installer will set your Environment anyways. Check it first. If not you can use the Command:
PATH = %PATH%;PathToARMBin

Philip Phu Nguyen

Kovatsch Matthias

unread,
Feb 26, 2011, 9:27:02 AM2/26/11
to Contiki developer mailing list
Exactly.

For Windows use the "Advanced system settings" -> "Advanced" -> "Environment Variables" under "Control Panel\System and Security\System" or "Start -> Computer -> right mouse button: Properties".

If your are not that familiar with Windows, you should use a virtual Linux machine (e.g., Instant Contiki with VirtualBox), as most tutorials (and the Contiki build system itself) are Linux-based. You probably will also run into some trouble with the Perl upload script under Windows and I even don't know about tunslip6 for Windows...

> -----Ursprüngliche Nachricht-----
> Von: Philip [mailto:png...@informatik.uni-bremen.de]
> Gesendet: Samstag, 26. Februar 2011 15:19
> An: Contiki developer mailing list
> Betreff: Re: [Contiki-developers] Rest Example using Econotags

Sana (CESLab)

unread,
Feb 26, 2011, 10:08:17 AM2/26/11
to contiki-d...@lists.sourceforge.net
In deed, I use a virtual Linux machine : Instant Contiki2.5.

So what should I do? Can I jump these steps?

Sana.

sylvain Cherrier

unread,
Feb 26, 2011, 10:23:42 AM2/26/11
to contiki-d...@lists.sourceforge.net
Le 26/02/2011 16:08, Sana (CESLab) a écrit :
> In deed, I use a virtual Linux machine : Instant Contiki2.5.
>
> So what should I do? Can I jump these steps?
>
> Sana.
>
>
> -

I think that everything is already configured in Instant Contiki


So, you need to open a terminal
cd in the right directory (contiki-2.5/examples/rest-example)

then modify the MakeFile (WITH_COAP=0)

then
make target=cooja rest-example.csc


in facts, you can go have a file manager to make it easier to change
data, to find where are files, to read the README files...
and you need two terminals (one for running CooJA, and another one to
run the router...

and then, run firefox (on curl in another terminal) to talk with your
nodes inside Cooja

Philip

unread,
Feb 26, 2011, 10:28:14 AM2/26/11
to Contiki developer mailing list
Just install via bin or download the binary just as described on http://mc1322x.devl.org/toolchain.md. Do you have experience with Ubuntu?
Good Luck :-)

Philip Phu Nguyen

Sana (CESLab)

unread,
Feb 26, 2011, 10:53:06 AM2/26/11
to contiki-d...@lists.sourceforge.net
Hi,
@Sylvian: I did all these steps taht you told (as the tutorial)and it is running
sucessfully, but When i use:
curl -H "User-Agent: curl" aaaa::0212:7402:0002:0202:8080/helloworld #get
it told me :"Client: curl (7): "couldn't connect to host"!!!
I don't know where is the problem?!

@Philip: hhh, yeah Ihave a tooo little experience in ubunto and this makes any
problems in implementation using it! :$
for the http://mc1322x.devl.org/toolchain.md, I run what's recommanded to do in
this tutorial but I'm blocked in the step of setupping the PATH:

$ export PATH=$PATH:$HOME/arm-2008q3/bin!

I write in the console the same command "$ export PATH=$PATH:$HOME/arm-
2008q3/bin"? or I should change the "$path" by the mine?

and Can I stop in the step of binary package? or I shouled continue
Download and run:

http://www.codesourcery.com/sgpp/lite/arm/portal/package3689/public/arm-none-
eabi/arm-2008q3-66-arm-none-eabi.exe
?

Thnx for your help which i really need,

sylvain Cherrier

unread,
Feb 26, 2011, 11:10:48 AM2/26/11
to contiki-d...@lists.sourceforge.net
Le 26/02/2011 16:53, Sana (CESLab) a écrit :
> Hi,
> @Sylvian: I did all these steps taht you told (as the tutorial)and it is running
> sucessfully, but When i use:
> curl -H "User-Agent: curl" aaaa::0212:7402:0002:0202:8080/helloworld #get
> it told me :"Client: curl (7): "couldn't connect to host"!!!
> I don't know where is the problem?!
>

i think that curl can't perform coap request..
you need to use cooper instead.

so, in firefox inside your ubuntu (i mean, inside Instant contiki), just
add cooper plugin...
https://addons.mozilla.org/en-US/firefox/addon/copper-270430/
then, in firefox, you can use this url ;
coap://[aaaa::0212:7402:0002:0202]:61616


(of course, you need to have cooja running, AND the router ! (in another
term))
(if it ask you for a password, i think that it is blank, or user, i
don't really remember... "user" maybe, i'm quite sure)

Philip

unread,
Feb 26, 2011, 11:21:13 AM2/26/11
to Contiki developer mailing list
 I run what's recommanded to do in
this tutorial but I'm blocked in the step of setupping the PATH:

$ export PATH=$PATH:$HOME/arm-2008q3/bin!


If you used the bin: 
PATH=$PATH:$HOME/CodeSourcery/Sourcery_G++_Lite/bin

Should be correct, when its installed there. No don't change PATH because
its the name of your PATH env. variable. Its the same like on Windows.


and Can I stop in the step of binary package? or I shouled continue
Download and run:

http://www.codesourcery.com/sgpp/lite/arm/portal/package3689/public/arm-none-
eabi/arm-2008q3-66-arm-none-eabi.exe
?

Yes you can stop.

Philip

Kovatsch Matthias

unread,
Feb 26, 2011, 11:49:18 AM2/26/11
to Contiki developer mailing list
> curl -H "User-Agent: curl" aaaa::0212:7402:0002:0202:8080/helloworld

I don't use curl, but IPv6 addresses are usually put in square parentheses []:

[aaaa::0212:7402:0002:0202]:8080/helloworld

Also see http://curl.haxx.se/docs/manual.html :
curl -g "http://[2001:1890:1112:1::20]/"


Btw: The CoAP Firefox plugin is called Copper, not Cooper :P

Reply all
Reply to author
Forward
0 new messages