Hi Héberte, Which motes do you use? How are they connected to the computer (in case of the Mica type motes, which programming board do you use)? What version of TinyOS do you use? What software do you use? If it is a proprietary application, do you have the source code (so that you could insert debugging statements)? What is the exact error message? Does your code run on other machines, e.g. that have the TinyOS environment installed?
For normal TinyOS you just need the libtoscomm.so and libgetenv.so libraries. If I consider your other posts, you seem to also try to use javacomm. This is normally not necessary as libtoscomm.so was developed as a replacement of javacomm. If the TinyOS Java libraries (in tinyos.jar, not the native modules like libtoscomm.so) cannot load the native library, they give an exception saying so an abort the program. Since this is not happening for you, I assume the libraries get loaded. If the libraries cannot open the serial port (for whatever reason), they throw an error that clearly says so. Apparently, this is not happening for you either, so this must be working. If the underlying message is really about a bad packet, then the packet format is not what was expected. In my opinion, this could be caused by the following situations: - if the motes run TinyOS 1.x code and the TinyOS APIs (tinyos.jar) are for TinyOS 2.x - if the motes run TinyOS 2.x code and the TinyOS APIs are for TinyOS 1.x - if the motes run TinyOS 1.x code and the TinyOS APIs are for TinyOS 1.x, but in the connection string the wrong mote type is used (if you suspect this case, try to get the exact connection string used, maybe by inserting debugging statements in your code) - Maybe that MIG and the binary mote code have different ideas about the packet structure (e.g. the packet keyword, which you should not use, is not supported by the compiler but MIG ignores this). I think that in this case you should not get a bad packet error, but rather the parsing of the packet should just give wrong results. Anyways, if this is the case, it would also be a problem on other machines, eg. your development machines. Cheers, Urs Héberte Fernandes de Moraes wrote: > Hi > > Good guess, but I tried and failed! Thanks for the tip, have some hunch? > > Hugs > > Héberte > > On Wed, Mar 11, 2009 at 10:06, Urs Hunkeler <[email protected]> wrote: > >> Hi, >> >> Just a guess: you could be using differing versions of TinyOS for the API >> and the mote binaries. E.g. you compiled the mote binaries with TinyOS 1.x >> but are using the APIs (tinyos.jar) from a TinyOS 2.x installation. If I >> remember correctly, the packet format has slightly changed to make messages >> platform independent. >> >> Cheers, >> Urs >> >> >> >> Héberte Fernandes de Moraes wrote: >> >>> Hi >>> >>> Someone has run a Java application on a Linux platform without the tiny >>> installed? >>> Why I am having problems with the implementation of the java application. >>> Most of the messages I send via motto and he is receiving such as: bad >>> packet >>> >>> Any idea what can this occur? >>> >>> I am running jar in ubuntu 8.10, I tried running in Fedora 9 and the same >>> thing occurs. Use sun JVM 1.6, I tried the 1.5 and not working (according >>> to >>> the Internet, the 1.5 still has problems). I put the libraries in the >>> corresponding folders $ JAVA_HOME / jre / lib / ext (, i386). >>> >>> Any guess are welcome. _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
