Re: Mote crashes when sending
2009-09-01 09:03:06 GMT
<div>I fear the formatting of the source code will be broken when coming out of the mail-list. The actual code is this:<div><br></div>
<div>
<div>error_t dsrRouteRequest(am_addr_t destination) {</div>
<div>
<span class="Apple-tab-span"> </span>message_t rrMessage; <span>// The message we will use</span>
</div>
<div>
<span class="Apple-tab-span"> </span>nx_struct dsrPacket* rrPayload; <span>// A pointer to the messages payload</span>
</div>
<div>
<span class="Apple-tab-span"> </span>nx_struct dsrOptionsHeader* header; <span>// A pointer to the DSR Header</span>
</div>
<div>
<span class="Apple-tab-span"> </span>nx_struct dsrRouteRequestOption* rrOption; <span>// A pointer to the DSR Route Request Option</span>
</div>
<div>
<span><span class="Apple-tab-span"> </span>uint8_t requestPacketLength = </span>// Keeps the length of the Route Request Payload which is</div>
<div>
<span><span class="Apple-tab-span"> </span> </span><span>sizeof</span><span>(nx_struct dsrOptionsHeader) </span>// The length of the DSR Options Header +</div>
<div>
<span><span class="Apple-tab-span"> </span> + </span><span>sizeof</span><span>(nx_struct dsrRouteRequestOption) </span>// The length of the DSR Route Request Option -</div>
<div>
<span><span class="Apple-tab-span"> </span> - </span><span>sizeof</span><span>(am_addr_t)*MAX_ROUTE_LENGTH; </span>// The number of addresses we do not use. Since we initiate this Route Request we only need to attach this nodes address to the Request</div>
<p><span class="Apple-tab-span"> </span><br class="webkit-block-placeholder"></p>
<div>
<span class="Apple-tab-span"> </span>error_t err; <span>// Space to store returned error messages</span>
</div>
<p><span class="Apple-tab-span"> </span></p>
<div>
<span><span class="Apple-tab-span"> </span></span>/*********************************************************************************</div>
<div>
<span class="Apple-tab-span"> </span> * Create a Route Request Packet *</div>
<div>
<span class="Apple-tab-span"> </span> ********************************************************************************/</div>
<div>
<span class="Apple-tab-span"> </span>rrPayload = (nx_struct dsrPacket*) (call Packet.getPayload(&rrMessage, requestPacketLength));<span> // Get a pointer to the Packets payload</span>
</div>
<div>
<span><span class="Apple-tab-span"> </span></span><span>if</span><span>(rrPayload==</span><span>NULL</span><span>) </span><span>return</span><span> FAIL; </span>// If getPayload fails return FAIL, happens when the payload length exceeds the maximum length</div>
<p><span class="Apple-tab-span"> </span><br class="webkit-block-placeholder"></p>
<div>
<span class="Apple-tab-span"> </span>header = (nx_struct dsrOptionsHeader*) rrPayload; <span>// Header points to the first element of the packet's payload</span>
</div>
<div>
<span class="Apple-tab-span"> </span>rrOption = (nx_struct dsrRouteRequestOption*) (((nx_uint8_t*) rrPayload ) + <span>sizeof</span>(nx_struct dsrOptionsHeader)); <span>// RrOption points to the first element in the buffer after the header</span>
</div>
<p><span class="Apple-tab-span"> </span><br class="webkit-block-placeholder"></p>
<div>
<span class="Apple-tab-span"> </span>header->nextHeader = <span>59</span>; <span>// 59 == No Next Header</span>
</div>
<div>
<span class="Apple-tab-span"> </span>header->flagF = <span>0</span>; <span>// Flow State Flag must be 0</span>
</div>
<div>
<span class="Apple-tab-span"> </span>header->reserved = <span>0</span>; <span>// Reserved bits must be 0</span>
</div>
<div>
<span><span class="Apple-tab-span"> </span>header->payloadLength = </span><span>sizeof</span><span>(nx_struct dsrRouteRequestOption) - </span><span>sizeof</span><span>(am_addr_t)*MAX_ROUTE_LENGTH; </span>// Length of carried options, which is only the Route Request Option with a single address appended</div>
<div><br></div>
<div>
<span class="Apple-tab-span"> </span>rrOption->optionType = OPTION_TYPE_ROUTE_REQUEST;</div>
<div>
<span><span class="Apple-tab-span"> </span>rrOption->optDataLength = </span><span>sizeof</span><span>(nx_uint16_t) + </span><span>sizeof</span><span>(am_addr_t)*</span><span>2</span><span>; </span>// OptionType and OptDataLength are not taken into account (RFC4728 p. 41)</div>
<div>
<span class="Apple-tab-span"> </span>rrOption->identification = routeRequestId++; <span>// Take the routeRequestId value as the ID and increment the variable</span>
</div>
<div>
<span class="Apple-tab-span"> </span>rrOption->targetAddress = destination; <span>// Add the address to which we want to find a route</span>
</div>
<div>
<span class="Apple-tab-span"> </span>rrOption->address[<span>0</span>] = call AMPacket.address(); <span>// Add this nodes address to the Route Request Option</span>
</div>
<p><br></p>
<div>
<span><span class="Apple-tab-span"> </span></span>/*********************************************************************************</div>
<div>
<span class="Apple-tab-span"> </span> * Send the Route Request Packet *</div>
<div>
<span class="Apple-tab-span"> </span> ********************************************************************************/</div>
<div>
<span class="Apple-tab-span"> </span>err = call AMSend.send(AM_BROADCAST_ADDR, &rrMessage, requestPacketLength);</div>
<div>
<span class="Apple-tab-span"> </span><span>if</span>(err != SUCCESS) <span>return</span> FAIL;</div>
<p><span class="Apple-tab-span"> </span><br class="webkit-block-placeholder"></p>
<div>
<span class="Apple-tab-span"> </span><span>return</span> SUCCESS;</div>
<div>
<span class="Apple-tab-span"> </span>}</div>
<div><br></div>
<div>The sending node sends its message a couple of times and then crashes and reboots. The crashes do occur even if I out-comment everything between the "Create a Route..." and "Send the Route..." comments (except the getPayload line of course) and set a fixed requestPacketLength. Since there is not really that much code I start wondering whether I'm trying to do something that simply doesn't work this way with TinyOS. I had a lot of debugging messages in this code so I know that the packet is build as expected and send. </div>
<div><br></div>
<div>I've also programmed a little network sniffer node which prints the packets caught onto the pc screen. So I know that the packets are sent correctly since everything arrives as expected at the sniffer node and can be decoded.</div>
<div><br></div>
<div>Thanks David.</div>
</div>
</div>
Tutorial / Lesson 4 : Mote-PC serial communication and SerialForwarder ; not compiling
2009-09-01 10:36:03 GMT
Hello everybody,
I am following the tutorial 4 : Mote-PC serial communication and SerialForwarder and I can not compile the program TestSerial. I didn't have any problem with the previous tutorials, but in this one I have an error like this:
:/opt/tinyos-2.1.0/apps/tests/TestSerial$ make tinynode install,1 bsl,/dev/ttyUSB0
mkdir -p build/tinynode
mig java -target=null -I/opt/tinyos-2.1.0/tos/lib/T2Hack -DIDENT_APPNAME=\"TestSerialAppC\" -DIDENT_USERNAME=\"david\" -DIDENT_HOSTNAME=\"ATeNeA\" -DIDENT_USERHASH=0xa4d71615L -DIDENT_TIMESTAMP=0x4a9cef7fL -DIDENT_UIDHASH=0xe89c97adL -java-classname=TestSerialMsg TestSerial.h test_serial_msg -o TestSerialMsg.java
/usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or directory
/usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or directory
/usr/lib/ncc/nesc_nx.h:235: syntax error before `__nesc_ntoh_uint8'
/usr/lib/ncc/nesc_nx.h:240: syntax error before `__nesc_hton_uint8'
/usr/lib/ncc/nesc_nx.h:242: `value' undeclared here (not in a function)
/usr/lib/ncc/nesc_nx.h:242: warning: data definition has no type or storage class
/usr/lib/ncc/nesc_nx.h:243: syntax error before `return'
/usr/lib/ncc/nesc_nx.h:246: syntax error before `__nesc_ntoh_leuint8'
/usr/lib/ncc/nesc_nx.h:251: syntax error before `__nesc_hton_leuint8'
...................................
................................... (continues)
It seems that it doesn't find some files (stddef.h and inttypes.h). I tried to copy them to the right folders but I am asked for more (ctype.h, math.h, stdlib.h, string.h). I copy them and I am asked again. At this moment if I try to compile another example, eg. 'Blink' it doesn't work either 'Blink' example or 'TestSerial' because of compilation errors.
I use Ubuntu 8.10 and my .bashrc has the following line:
source /opt/tinyos-2.1.0/tinyos.sh
that links to tinyos.sh:
#! /usr/bin/env bash
# Here we setup the environment
# variables needed by the tinyos
# make system
echo "Setting up for TinyOS 2.1.0"
export TOSROOT=
export TOSDIR=
export MAKERULES=
TOSROOT="/opt/tinyos-2.1.0"
TOSDIR="$TOSROOT/tos"
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
MAKERULES="$TOSROOT/support/make/Makerules"
export TOSROOT
export TOSDIR
export CLASSPATH
export MAKERULES
The 'mote' I'm using is tinynode (ShockFish).
Any help or experiences you could provide would be great. Thank you very much in advance,
David
<div> <div><span lang="ES-MODERN"> <p>Hello everybody,</p> <p>I am following the tutorial 4 : Mote-PC serial communication and SerialForwarder and I can not compile the program TestSerial. I didn't have any problem with the previous tutorials, but in this one I have an error like this:</p> <p>:/opt/tinyos-2.1.0/apps/tests/TestSerial$ make tinynode install,1 bsl,/dev/ttyUSB0</p> <p>mkdir -p build/tinynode</p> <p>mig java -target=null -I/opt/tinyos-2.1.0/tos/lib/T2Hack -DIDENT_APPNAME=\"TestSerialAppC\" -DIDENT_USERNAME=\"david\" -DIDENT_HOSTNAME=\"ATeNeA\" -DIDENT_USERHASH=0xa4d71615L -DIDENT_TIMESTAMP=0x4a9cef7fL -DIDENT_UIDHASH=0xe89c97adL -java-classname=TestSerialMsg TestSerial.h test_serial_msg -o TestSerialMsg.java</p> <p>/usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or directory</p> <p>/usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or directory</p> <p>/usr/lib/ncc/nesc_nx.h:235: syntax error before `__nesc_ntoh_uint8'</p> <p>/usr/lib/ncc/nesc_nx.h:240: syntax error before `__nesc_hton_uint8'</p> <p>/usr/lib/ncc/nesc_nx.h:242: `value' undeclared here (not in a function)</p> <p>/usr/lib/ncc/nesc_nx.h:242: warning: data definition has no type or storage class</p> <p>/usr/lib/ncc/nesc_nx.h:243: syntax error before `return'</p> <p>/usr/lib/ncc/nesc_nx.h:246: syntax error before `__nesc_ntoh_leuint8'</p> <p>/usr/lib/ncc/nesc_nx.h:251: syntax error before `__nesc_hton_leuint8'</p> <p>...................................</p> <p>................................... (continues)</p> <p> </p> <p>It seems that it doesn't find some files (stddef.h and inttypes.h). I tried to copy them to the right folders but I am asked for more (ctype.h, math.h, stdlib.h, string.h). I copy them and I am asked again. At this moment if I try to compile another example, eg. 'Blink' it doesn't work either 'Blink' example or 'TestSerial' because of compilation errors.</p> <p>I use Ubuntu 8.10 and my .bashrc has the following line:</p> <p>source /opt/tinyos-2.1.0/tinyos.sh</p> <p>that links to tinyos.sh:</p> <p>#! /usr/bin/env bash</p> <p># Here we setup the environment</p> <p># variables needed by the tinyos</p> <p># make system</p> <p>echo "Setting up for TinyOS 2.1.0"</p> <p>export TOSROOT=</p> <p>export TOSDIR=</p> <p>export MAKERULES=</p> <p>TOSROOT="/opt/tinyos-2.1.0"</p> <p>TOSDIR="$TOSROOT/tos"</p> <p>CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java</p> <p>MAKERULES="$TOSROOT/support/make/Makerules"</p> <p>export TOSROOT</p> <p>export TOSDIR</p> <p>export CLASSPATH</p> <p>export MAKERULES</p> <p> </p> <p>The 'mote' I'm using is tinynode (ShockFish).</p> <p>Any help or experiences you could provide would be great. Thank you very much in advance,</p> <p>David</p> <p> </p></span></div> </div>
Re: Mote crashes when sending
2009-09-01 11:11:50 GMT
I'm getting the impression that it is not my code's fault but the crashes have something to do with the printf() function. If I do less output via printf() more messages can be sent in a row before the crash occurs. I've decreased PRINTF_BUFFER_SIZE to 256 now (have tried 1024, 2048 and 4096 before) and out-commented all the printf() and printfflush() calls except for a message at boot and another one when sending a message.After that the node crashes less frequently. I even had a test-run with about two hundred packets sent without crash before aborting. I could not reproduce this though. I did not change anything and restarted the node and net.tinyos.tools.PrintfClient but now the node crashes every 11 packets sent. I think I remember having had strange results before when using printf(). Increasing the PRINTF_BUFFER_SIZE to 512 does not double the number of successful sent packets before crash. Still 11 packets before crash. I decreased the length of the message that printf() prints out to less than the half and now the crashes do not appear regularly anymore. The number of packages successfully sent before crash vary between 3 and 11 now but most of the time there are 3 or 4. I have decreased the length of the message printed for every send() to 3 and had several hundred successful sent packages in the first run again. The following runs produced crashes again with an unregular number of successfully sent packets before the crash. The number of successfully sent packets is higher though than before. Now varying from 10 to several dozens. Once in a while the node wont even crash at all until resetting the node. I wonder if the node crashes at all when I wont use printf() anymore. David.
Re: Tutorial / Lesson 4 : Mote-PC serial communication and SerialForwarder ; not compiling
2009-09-01 11:23:22 GMT
Dear David, Please try sudo apt-get install build-essential and see if the problem is solved. -- best regards, Faisal Aslam Ph.D. Candidate University of Freiburg, Germany http://cone.informatik.uni-freiburg.de/people/aslam/ David Guillen Jimenez wrote: > > Hello everybody, > > I am following the tutorial 4 : Mote-PC serial communication and > SerialForwarder and I can not compile the program TestSerial. I didn't > have any problem with the previous tutorials, but in this one _I have > an error like this_: > > *:/opt/tinyos-2.1.0/apps/tests/TestSerial$ make tinynode install,1 > bsl,/dev/ttyUSB0* > > mkdir -p build/tinynode > > mig java -target=null -I/opt/tinyos-2.1.0/tos/lib/T2Hack > -DIDENT_APPNAME=\"TestSerialAppC\" -DIDENT_USERNAME=\"david\" > -DIDENT_HOSTNAME=\"ATeNeA\" -DIDENT_USERHASH=0xa4d71615L > -DIDENT_TIMESTAMP=0x4a9cef7fL -DIDENT_UIDHASH=0xe89c97adL > -java-classname=TestSerialMsg TestSerial.h test_serial_msg -o > TestSerialMsg.java > > /usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or > directory > > /usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or directory > > /usr/lib/ncc/nesc_nx.h:235: syntax error before `__nesc_ntoh_uint8' > > /usr/lib/ncc/nesc_nx.h:240: syntax error before `__nesc_hton_uint8' > > /usr/lib/ncc/nesc_nx.h:242: `value' undeclared here (not in a function) > > /usr/lib/ncc/nesc_nx.h:242: warning: data definition has no type or > storage class > > /usr/lib/ncc/nesc_nx.h:243: syntax error before `return' > > /usr/lib/ncc/nesc_nx.h:246: syntax error before `__nesc_ntoh_leuint8' > > /usr/lib/ncc/nesc_nx.h:251: syntax error before `__nesc_hton_leuint8' > > ................................... > > ................................... (continues) > > > > It seems that it doesn't find some files (stddef.h and inttypes.h). I > tried to copy them to the right folders but I am asked for more > (ctype.h, math.h, stdlib.h, string.h). I copy them and I am asked > again. At this moment if I try to compile another example, eg. 'Blink' > it doesn't work either 'Blink' example or 'TestSerial' because of > compilation errors. > > I use Ubuntu 8.10 and my *.bashrc* has the following line: > > source /opt/tinyos-2.1.0/tinyos.sh > > *that links to tinyos.sh:* > > #! /usr/bin/env bash > > # Here we setup the _environment_ > > _# variables_ needed by the tinyos > > # make system > > echo "Setting up for TinyOS 2.1.0" > > export TOSROOT= > > export TOSDIR= > > export MAKERULES= > > TOSROOT="/opt/tinyos-2.1.0" > > TOSDIR="$TOSROOT/tos" > > CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java > > MAKERULES="$TOSROOT/support/make/Makerules" > > export TOSROOT > > export TOSDIR > > export CLASSPATH > > export MAKERULES > > > > The 'mote' I'm using is *tinynode* (ShockFish). > > Any help or experiences you could provide would be great. Thank you > very much in advance, > > David > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > Tinyos-help <at> millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list Tinyos-help <at> millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Fw: Tutorial / Lesson 4 : Mote-PC serial communication and SerialForwarder ; not compiling
2009-09-01 13:22:27 GMT
Dear Faisal, I tried with "sudo apt-get install build-essential", but I have the same error. I was already using the last version. If you have more ideas do not hesitate to tell me. Thank you anyway, David > Dear David, > > Please try > > sudo apt-get install build-essential > > and see if the problem is solved. > > -- > best regards, > > Faisal Aslam > Ph.D. Candidate > University of Freiburg, Germany > http://cone.informatik.uni-freiburg.de/people/aslam/ > > > > David Guillen Jimenez wrote: >> >> Hello everybody, >> >> I am following the tutorial 4 : Mote-PC serial communication and >> SerialForwarder and I can not compile the program TestSerial. I didn't >> have any problem with the previous tutorials, but in this one _I have an >> error like this_: >> >> *:/opt/tinyos-2.1.0/apps/tests/TestSerial$ make tinynode install,1 >> bsl,/dev/ttyUSB0* >> >> mkdir -p build/tinynode >> >> mig >> java -target=null -I/opt/tinyos-2.1.0/tos/lib/T2Hack -DIDENT_APPNAME=\"TestSerialAppC\" >> -DIDENT_USERNAME=\"david\" -DIDENT_HOSTNAME=\"ATeNeA\" -DIDENT_USERHASH=0xa4d71615L >> -DIDENT_TIMESTAMP=0x4a9cef7fL -DIDENT_UIDHASH=0xe89c97adL -java-classname=TestSerialMsg >> TestSerial.h test_serial_msg -o TestSerialMsg.java >> >> /usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or >> directory >> >> /usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or >> directory >> >> /usr/lib/ncc/nesc_nx.h:235: syntax error before `__nesc_ntoh_uint8' >> >> /usr/lib/ncc/nesc_nx.h:240: syntax error before `__nesc_hton_uint8' >> >> /usr/lib/ncc/nesc_nx.h:242: `value' undeclared here (not in a function) >> >> /usr/lib/ncc/nesc_nx.h:242: warning: data definition has no type or >> storage class >> >> /usr/lib/ncc/nesc_nx.h:243: syntax error before `return' >> >> /usr/lib/ncc/nesc_nx.h:246: syntax error before `__nesc_ntoh_leuint8' >> >> /usr/lib/ncc/nesc_nx.h:251: syntax error before `__nesc_hton_leuint8' >> >> ................................... >> >> ................................... (continues) >> >> >> >> It seems that it doesn't find some files (stddef.h and inttypes.h). I >> tried to copy them to the right folders but I am asked for more (ctype.h, >> math.h, stdlib.h, string.h). I copy them and I am asked again. At this >> moment if I try to compile another example, eg. 'Blink' it doesn't work >> either 'Blink' example or 'TestSerial' because of compilation errors. >> >> I use Ubuntu 8.10 and my *.bashrc* has the following line: >> >> source /opt/tinyos-2.1.0/tinyos.sh >> >> *that links to tinyos.sh:* >> >> #! /usr/bin/env bash >> >> # Here we setup the _environment_ >> >> _# variables_ needed by the tinyos >> >> # make system >> >> echo "Setting up for TinyOS 2.1.0" >> >> export TOSROOT= >> >> export TOSDIR= >> >> export MAKERULES= >> >> TOSROOT="/opt/tinyos-2.1.0" >> >> TOSDIR="$TOSROOT/tos" >> >> CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java >> >> MAKERULES="$TOSROOT/support/make/Makerules" >> >> export TOSROOT >> >> export TOSDIR >> >> export CLASSPATH >> >> export MAKERULES >> >> >> >> The 'mote' I'm using is *tinynode* (ShockFish). >> >> Any help or experiences you could provide would be great. Thank you very >> much in advance, >> >> David >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Tinyos-help mailing list >> Tinyos-help <at> millennium.berkeley.edu >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > > _______________________________________________ Tinyos-help mailing list Tinyos-help <at> millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Fw: Fw: Tutorial / Lesson 4 : Mote-PC serialcommunication and SerialForwarder ; not compiling
2009-09-01 14:45:04 GMT
Hi, I am going ot leave you here some additional information, in case you could identify the problem easly. If a execute: tos-check-env : Path: /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games Classpath: /opt/tinyos-2.1.0/support/sdk/java --> WARNING: CLASSPATH may not include /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar. Please ensure that /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar is in your CLASSPATH or you may experience configuration problems --> WARNING: CLASSPATH may not include '.' (that is, the symbol for the current working directory). Please add '.' to your CLASSPATH or you may experience configuration problems. rpms: nesc: /usr/bin/nescc Version: nescc: 1.3.0 perl: /usr/bin/perl Version: v5.10.0 built for i486-linux-gnu-thread-multi flex: bison: java: /usr/bin/java java version "1.5.0_16" graphviz: /usr/bin/dot dot - Graphviz version 2.18 (Wed Aug 6 10:29:47 UTC 2008) --> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator. tos-check-env completed with errors: --> WARNING: CLASSPATH may not include /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar. Please ensure that /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar is in your CLASSPATH or you may experience configuration problems --> WARNING: CLASSPATH may not include '.' (that is, the symbol for the current working directory). Please add '.' to your CLASSPATH or you may experience configuration problems. --> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator. This is what I have in the folder /opt/tinyos-2.1.0/support/sdk/java/: $ ls -la /opt/tinyos-2.1.0/support/sdk/java/ total 256 drwxr-xr-x 3 david david 4096 2009-08-31 18:23 . drwxr-xr-x 6 david david 4096 2009-08-31 18:23 .. -rw-r--r-- 1 david david 565 2007-08-15 20:06 build.xml -rw-r--r-- 1 david david 432 2007-08-31 00:29 Makefile -rw-r--r-- 1 david david 2750 2006-07-12 18:59 Makefile.include drwxr-xr-x 3 david david 4096 2009-08-31 18:23 net -rw-r--r-- 1 david david 230272 2008-08-06 18:31 tinyos.jar And this is what happens when I try: $ java net.tinyos.tools.Listen -comm serial <at> /dev/ttyS0:tinynode Exception in thread "main" java.lang.NoClassDefFoundError: net/tinyos/tools/Listen or /opt/tinyos-2.1.0/apps/tests/TestSerial$ java net.tinyos.tools.Listen -comm <at> serial/dev/ttyUSB0:tinynode Exception in thread "main" java.lang.NoClassDefFoundError: net/tinyos/tools/Listen I hope this could be useful. Thank you very much for your time, Regards, David > Dear Faisal, > > I tried with "sudo apt-get install build-essential", but I have the same > error. I was already using the last version. If you have more ideas do not > hesitate to tell me. > > Thank you anyway, > > David > > > > >> Dear David, >> >> Please try >> >> sudo apt-get install build-essential >> >> and see if the problem is solved. >> >> -- >> best regards, >> >> Faisal Aslam >> Ph.D. Candidate >> University of Freiburg, Germany >> http://cone.informatik.uni-freiburg.de/people/aslam/ >> >> >> >> David Guillen Jimenez wrote: >>> >>> Hello everybody, >>> >>> I am following the tutorial 4 : Mote-PC serial communication and >>> SerialForwarder and I can not compile the program TestSerial. I didn't >>> have any problem with the previous tutorials, but in this one _I have an >>> error like this_: >>> >>> *:/opt/tinyos-2.1.0/apps/tests/TestSerial$ make tinynode install,1 >>> bsl,/dev/ttyUSB0* >>> >>> mkdir -p build/tinynode >>> >>> mig >>> java -target=null -I/opt/tinyos-2.1.0/tos/lib/T2Hack -DIDENT_APPNAME=\"TestSerialAppC\" >>> -DIDENT_USERNAME=\"david\" -DIDENT_HOSTNAME=\"ATeNeA\" -DIDENT_USERHASH=0xa4d71615L >>> -DIDENT_TIMESTAMP=0x4a9cef7fL -DIDENT_UIDHASH=0xe89c97adL -java-classname=TestSerialMsg >>> TestSerial.h test_serial_msg -o TestSerialMsg.java >>> >>> /usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or >>> directory >>> >>> /usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or >>> directory >>> >>> /usr/lib/ncc/nesc_nx.h:235: syntax error before `__nesc_ntoh_uint8' >>> >>> /usr/lib/ncc/nesc_nx.h:240: syntax error before `__nesc_hton_uint8' >>> >>> /usr/lib/ncc/nesc_nx.h:242: `value' undeclared here (not in a function) >>> >>> /usr/lib/ncc/nesc_nx.h:242: warning: data definition has no type or >>> storage class >>> >>> /usr/lib/ncc/nesc_nx.h:243: syntax error before `return' >>> >>> /usr/lib/ncc/nesc_nx.h:246: syntax error before `__nesc_ntoh_leuint8' >>> >>> /usr/lib/ncc/nesc_nx.h:251: syntax error before `__nesc_hton_leuint8' >>> >>> ................................... >>> >>> ................................... (continues) >>> >>> >>> >>> It seems that it doesn't find some files (stddef.h and inttypes.h). I >>> tried to copy them to the right folders but I am asked for more >>> (ctype.h, >>> math.h, stdlib.h, string.h). I copy them and I am asked again. At this >>> moment if I try to compile another example, eg. 'Blink' it doesn't work >>> either 'Blink' example or 'TestSerial' because of compilation errors. >>> >>> I use Ubuntu 8.10 and my *.bashrc* has the following line: >>> >>> source /opt/tinyos-2.1.0/tinyos.sh >>> >>> *that links to tinyos.sh:* >>> >>> #! /usr/bin/env bash >>> >>> # Here we setup the _environment_ >>> >>> _# variables_ needed by the tinyos >>> >>> # make system >>> >>> echo "Setting up for TinyOS 2.1.0" >>> >>> export TOSROOT= >>> >>> export TOSDIR= >>> >>> export MAKERULES= >>> >>> TOSROOT="/opt/tinyos-2.1.0" >>> >>> TOSDIR="$TOSROOT/tos" >>> >>> CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java >>> >>> MAKERULES="$TOSROOT/support/make/Makerules" >>> >>> export TOSROOT >>> >>> export TOSDIR >>> >>> export CLASSPATH >>> >>> export MAKERULES >>> >>> >>> >>> The 'mote' I'm using is *tinynode* (ShockFish). >>> >>> Any help or experiences you could provide would be great. Thank you very >>> much in advance, >>> >>> David >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Tinyos-help mailing list >>> Tinyos-help <at> millennium.berkeley.edu >>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> >> > > _______________________________________________ > Tinyos-help mailing list > Tinyos-help <at> millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list Tinyos-help <at> millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: Fw: Fw: Tutorial / Lesson 4 : Mote-PC serialcommunication and SerialForwarder ; not compiling
2009-09-01 15:22:30 GMT
If you do have a CLASSPATH environment variable make sure you have followed the instructions in the error messages you included here, and also that the directories and files that it references are indeed the correct ones. MS David Guillen Jimenez wrote: > Hi, > > I am going ot leave you here some additional information, in case you could > identify the problem easly. > > If a execute: tos-check-env : > > Path: > > /usr/local/sbin > > /usr/local/bin > > /usr/sbin > > /usr/bin > > /sbin > > /bin > > /usr/games > > Classpath: > > > /opt/tinyos-2.1.0/support/sdk/java > > --> WARNING: CLASSPATH may not include > /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar. Please ensure that > /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar is in your CLASSPATH or you > may experience configuration problems > > --> WARNING: CLASSPATH may not include '.' (that is, the symbol for the > current working directory). Please add '.' to your CLASSPATH or you may > experience configuration problems. > > > > rpms: > > > > nesc: > > /usr/bin/nescc > > Version: nescc: 1.3.0 > > > > perl: > > /usr/bin/perl > > Version: v5.10.0 built for i486-linux-gnu-thread-multi > > flex: > > bison: > > java: > > /usr/bin/java > > java version "1.5.0_16" > > graphviz: > > /usr/bin/dot > > dot - Graphviz version 2.18 (Wed Aug 6 10:29:47 UTC 2008) > > --> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. > Please update your graphviz version if you'd like to use the nescdoc > documentation generator. > > > > tos-check-env completed with errors: > > --> WARNING: CLASSPATH may not include > /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar. Please ensure that > /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar is in your CLASSPATH or you > may experience configuration problems > > --> WARNING: CLASSPATH may not include '.' (that is, the symbol for the > current working directory). Please add '.' to your CLASSPATH or you may > experience configuration problems. > > --> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. > Please update your graphviz version if you'd like to use the nescdoc > documentation generator. > > > > This is what I have in the folder /opt/tinyos-2.1.0/support/sdk/java/: > > $ ls -la /opt/tinyos-2.1.0/support/sdk/java/ > > total 256 > > drwxr-xr-x 3 david david 4096 2009-08-31 18:23 . > > drwxr-xr-x 6 david david 4096 2009-08-31 18:23 .. > > -rw-r--r-- 1 david david 565 2007-08-15 20:06 build.xml > > -rw-r--r-- 1 david david 432 2007-08-31 00:29 Makefile > > -rw-r--r-- 1 david david 2750 2006-07-12 18:59 Makefile.include > > drwxr-xr-x 3 david david 4096 2009-08-31 18:23 net > > -rw-r--r-- 1 david david 230272 2008-08-06 18:31 tinyos.jar > > > > And this is what happens when I try: > > $ java net.tinyos.tools.Listen -comm serial <at> /dev/ttyS0:tinynode > > Exception in thread "main" java.lang.NoClassDefFoundError: > net/tinyos/tools/Listen > > or > > /opt/tinyos-2.1.0/apps/tests/TestSerial$ java net.tinyos.tools.Listen -comm > <at> serial/dev/ttyUSB0:tinynode > > Exception in thread "main" java.lang.NoClassDefFoundError: > net/tinyos/tools/Listen > > I hope this could be useful. Thank you very much for your time, > > Regards, > > David > > > > >> Dear Faisal, >> >> I tried with "sudo apt-get install build-essential", but I have the same >> error. I was already using the last version. If you have more ideas do not >> hesitate to tell me. >> >> Thank you anyway, >> >> David >> >> >> >> >>> Dear David, >>> >>> Please try >>> >>> sudo apt-get install build-essential >>> >>> and see if the problem is solved. >>> >>> -- >>> best regards, >>> >>> Faisal Aslam >>> Ph.D. Candidate >>> University of Freiburg, Germany >>> http://cone.informatik.uni-freiburg.de/people/aslam/ >>> >>> >>> >>> David Guillen Jimenez wrote: >>>> Hello everybody, >>>> >>>> I am following the tutorial 4 : Mote-PC serial communication and >>>> SerialForwarder and I can not compile the program TestSerial. I didn't >>>> have any problem with the previous tutorials, but in this one _I have an >>>> error like this_: >>>> >>>> *:/opt/tinyos-2.1.0/apps/tests/TestSerial$ make tinynode install,1 >>>> bsl,/dev/ttyUSB0* >>>> >>>> mkdir -p build/tinynode >>>> >>>> mig >>>> java -target=null -I/opt/tinyos-2.1.0/tos/lib/T2Hack -DIDENT_APPNAME=\"TestSerialAppC\" >>>> -DIDENT_USERNAME=\"david\" -DIDENT_HOSTNAME=\"ATeNeA\" -DIDENT_USERHASH=0xa4d71615L >>>> -DIDENT_TIMESTAMP=0x4a9cef7fL -DIDENT_UIDHASH=0xe89c97adL -java-classname=TestSerialMsg >>>> TestSerial.h test_serial_msg -o TestSerialMsg.java >>>> >>>> /usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or >>>> directory >>>> >>>> /usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or >>>> directory >>>> >>>> /usr/lib/ncc/nesc_nx.h:235: syntax error before `__nesc_ntoh_uint8' >>>> >>>> /usr/lib/ncc/nesc_nx.h:240: syntax error before `__nesc_hton_uint8' >>>> >>>> /usr/lib/ncc/nesc_nx.h:242: `value' undeclared here (not in a function) >>>> >>>> /usr/lib/ncc/nesc_nx.h:242: warning: data definition has no type or >>>> storage class >>>> >>>> /usr/lib/ncc/nesc_nx.h:243: syntax error before `return' >>>> >>>> /usr/lib/ncc/nesc_nx.h:246: syntax error before `__nesc_ntoh_leuint8' >>>> >>>> /usr/lib/ncc/nesc_nx.h:251: syntax error before `__nesc_hton_leuint8' >>>> >>>> ................................... >>>> >>>> ................................... (continues) >>>> >>>> >>>> >>>> It seems that it doesn't find some files (stddef.h and inttypes.h). I >>>> tried to copy them to the right folders but I am asked for more >>>> (ctype.h, >>>> math.h, stdlib.h, string.h). I copy them and I am asked again. At this >>>> moment if I try to compile another example, eg. 'Blink' it doesn't work >>>> either 'Blink' example or 'TestSerial' because of compilation errors. >>>> >>>> I use Ubuntu 8.10 and my *.bashrc* has the following line: >>>> >>>> source /opt/tinyos-2.1.0/tinyos.sh >>>> >>>> *that links to tinyos.sh:* >>>> >>>> #! /usr/bin/env bash >>>> >>>> # Here we setup the _environment_ >>>> >>>> _# variables_ needed by the tinyos >>>> >>>> # make system >>>> >>>> echo "Setting up for TinyOS 2.1.0" >>>> >>>> export TOSROOT= >>>> >>>> export TOSDIR= >>>> >>>> export MAKERULES= >>>> >>>> TOSROOT="/opt/tinyos-2.1.0" >>>> >>>> TOSDIR="$TOSROOT/tos" >>>> >>>> CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java >>>> >>>> MAKERULES="$TOSROOT/support/make/Makerules" >>>> >>>> export TOSROOT >>>> >>>> export TOSDIR >>>> >>>> export CLASSPATH >>>> >>>> export MAKERULES >>>> >>>> >>>> >>>> The 'mote' I'm using is *tinynode* (ShockFish). >>>> >>>> Any help or experiences you could provide would be great. Thank you very >>>> much in advance, >>>> >>>> David >>>> >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Tinyos-help mailing list >>>> Tinyos-help <at> millennium.berkeley.edu >>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >>> >>> >> _______________________________________________ >> Tinyos-help mailing list >> Tinyos-help <at> millennium.berkeley.edu >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > _______________________________________________ > Tinyos-help mailing list > Tinyos-help <at> millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list Tinyos-help <at> millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
David.
RSS Feed