Hi Rubén, Thank you for your answer.
I have looking for the solution in the different java classes, Listen, Platform, BuildResource (all of them from TinyOS1.x) but I have not be able to get the PlatformSpec.java source file, where it suppose to fix the different names for differents platforms, but in Platform.class , which is used by Listen through other classes,nothing appear related to "telosb", so I can asume that in the source code I should to include the part associated to "telosb" in order to get a good baud rate when I introduce this String in MOTECOM variable. I think I am getting so many problems by using Tinyos1.x instead of using TinyOS2.x, do you know if there is a easy way to update to Tinyos2.x?I am using WindowsXP and Telosb motes I am new working with motes, and I directly installed what Crossbow gave me, which was a easy .exe file in which Tinyos 1.x with Cygwin was installed,and nothing about Tinyos2.x appeared. Thank you very much for your help -----Mensaje original----- De: Rubén Ríos del Pozo [mailto:[email protected]] Enviado el: jueves, 08 de octubre de 2009 11:35 Para: David Conde Asunto: Re: [Tinyos-help] Problem with java net.tinyos.tools.Listen I really don't know why you need to set the variable to "telos" because in my case, I use telosb and I can set it to either "telos" or "telosb" as well as to 115200 $ java net.tinyos.tools.Listen -comm ser...@com5:[telos|telosb|115200] In fact, I have been looking for a solution to your problem and I have found in the java code provided in tinyos.jar and finally I have realized that in the class BaudRate (net.tinyos.packet) both telos and telosb (and tinynode, tmote, intelmote2, shimmer) are defined to use a baudrate of 115200. Maybe you could try to see the code of the Listen implementation you are using in case there is some error. I am not sure if this code comes by default with the tinyos installation because I have downloaded stuff from the cvs, but you can try to have a look at "C:\cygwin\opt\tinyos-2.x\support\sdk\java\". I hope this helps! David Conde escribió: > Hi, but the problem is that I am using Telosb not Telos, so I do not > understand why I have to put "telos" and not "telosb" in the MOTECOM variable. > > I tried with "telos" in MOTECOM and it works fine, I have tried with an > example in which two telosb send information to each other and there is no > problem with the baud rate, so I do not know why there is a problem by using > 115200 as a baud rate in Serial PC communication. > > Thanks > > > > -----Mensaje original----- > De: Michael Schippling [mailto:[email protected]] > Enviado el: miércoles, 07 de octubre de 2009 19:10 > Para: David Conde > CC: [email protected] > Asunto: Re: [Tinyos-help] Problem with java net.tinyos.tools.Listen > > Make sure you have a MOTECOM variable set like this: > export MOTECOM="ser...@com7:telos" > using your COM port number. > > The "telos" field will cause the Java comm code to use the > correct baud rate and will also select a message header format > that matches the AM.h TOS_Msg struct used for the platform. > If the baud and format are incorrect you will get all the > bad packet type messages that you saw. > > If you have no MOTECOM or -comm setting the Java programs > default to tryng to communicate with the SerialForwarder > process on enet port 9001. Note that when starting > SerialForwarder, you need to set motecom=ser...@whatever > because it needs to get to the actual hardware. > > Is it all working now? > MS > > David Conde wrote: >> I have tried with different baud rates in MOTECOM and this problem ("bad >> packet") dissapears, so am I missing anything? I mean, I have typed: >> Export motecom=ser...@com4:115200 (which is the baud rate said in Packet >> sources and TestSerial chapter in Tinyos Tutorial for telosb), but with this >> baud rate I get "bad packet", for example, if I type: Export >> motecom=ser...@com4:telos the problem is solved in Listen tool, and I start >> to get good packet which are shown in screen. >> >> What baud rate do I have to write in motecom var for TElosB? >> >> >> Do I have to change any parameter in oscilloscope component or other in >> order to solve this problem? >> >> Thanks in advance >> >> -----Mensaje original----- >> De: [email protected] >> [mailto:[email protected]] En nombre de David Conde >> Enviado el: miércoles, 07 de octubre de 2009 15:03 >> Para: [email protected] >> Asunto: Re: [Tinyos-help] Problem with java net.tinyos.tools.Listen >> >> Hi again, >> >> I followed the link shown below and I found the problem: >> >> I was missing out win32com.dll in Windows/system32/ folder. >> >> >> Now that I solved the problem I am trying to launch oscilloscope application >> in Telosb mote and java net.tinyos.oscope.oscilloscope so that I can see the >> sensing values from my mote in PC application. >> >> The problem now is that I am getting bad packet error when I launch java >> net.tinyos.oscope.oscilloscope. >> >> As shown below: >> >> ser...@com4:115200: resynchronising >> ser...@com4:115200: bad packet >> serial@ COM4:115200: packet too long >> serial@ COM4:115200: resynchronising >> ser...@com4:115200: bad packet >> ser...@com4:115200: bad packet >> ser...@com4:115200: bad packet >> >> The same is gotten when I launch $java Listen and $java Forwarder >> >> >> Any idea? >> >> I do not have TestSerial as it is said in the documentation so I do not know >> any othe way to try if serial communications is working right. >> >> Thanks in advance >> >> -----Mensaje original----- >> De: [email protected] >> [mailto:[email protected]] En nombre de David Conde >> Enviado el: miércoles, 07 de octubre de 2009 9:31 >> Para: 'Michael Schippling' >> CC: [email protected]; 'Rubén Gmail' >> Asunto: Re: [Tinyos-help] Problem with java net.tinyos.tools.Listen >> >> Hi Michael, >> >> Firstly, thank you very much for your replies. >> >> Listen was not succesful at all, I just solved the JNI Error by including >> getenv.dll in System32 directory, but I am getting the next error when I >> type >> java net.tinyos.tools.Listen: >> >> java.net.ConnectEXception: Connection refused: Connect >> >> It is a problem with the connection, I think it is not able to take the >> right port, because if I try to launch SerialForwarder I get a similar >> Exception: >> >> Java.io.IOException: Invalid port. No comm ports found! >> >> Any idea? >> >> -----Mensaje original----- >> De: Michael Schippling [mailto:[email protected]] >> Enviado el: martes, 06 de octubre de 2009 19:44 >> Para: David Conde >> CC: 'Rubén Gmail'; [email protected] >> Asunto: Re: [Tinyos-help] Problem with java net.tinyos.tools.Listen >> >> Were you finally successful with Listen using the MOTECOM variable? >> If so, SF should use the same port syntax. >> MS >> >> >> David Conde wrote: >>> Hi again, >>> >>> I solved this by placing getenv.dll in Windows/system32 folder. >>> >>> But now I am getting the next Exception: >>> >>> Error on s...@localhost:9001: java.net.ConnectEXception: Connection >>> refused: Connect. >>> >>> I have tried either with SerialForwarder and I am getting something similar: >>> >>> Java.io.IOException: Invalid port. No comm ports found! >>> >>> Any idea? >>> >>> I am typing java net.tinyos.sf.SerialForwarder -comm ser...@com4:telosb >>> >>> Thanks in advance >>> >>> >>> >>> -----Mensaje original----- >>> De: [email protected] >>> [mailto:[email protected]] En nombre de David >>> Conde >>> Enviado el: martes, 06 de octubre de 2009 12:15 >>> Para: 'Rubén Gmail' >>> CC: [email protected] >>> Asunto: Re: [Tinyos-help] Problem with java net.tinyos.tools.Listen >>> >>> Hi, >>> >>> Thank you for your replies. >>> >>> I have tried typing "export motecom=ser...@com4:telosb" after doing >>> motelist in Cygwin command line, where I got COM4 for my telosB mote. >>> >>> I have follow the next link: >>> https://www.millennium.berkeley.edu/pipermail/tinyos-help/2007-January/022165.html >>> >>> So, I installed comm.jar in my ClassPath and put it in JRE/LIB/Ext >>> directories, either I placed win32.dll in Windows/system32 folder: >>> >>> but I am now getting the next Exception when I tried to do: java >>> net.tinyos.tools.Listen: >>> >>> getenv JNI library not found. Env.getenv will not work (please consult >>> installation direction in tinyos-1.x/tolos/java/net/tinyos/útil/Env.INSTALL) >>> Error on s...@localhost:9001: java.net.ConnectException: Connection >>> refused: connect >>> >>> My environment is the next one: >>> >>> I have a telosb mote in USB port which is COM4 according to motelist >>> command, this mota has installed OSCILLOSCOPE application and I tried to >>> see the information received by serial port with java >>> net.tinyos.tools.Listen application , >>> >>> What am I missing? >>> >>> Thanks in advance >>> >>> >>> >>> -----Mensaje original----- >>> De: Rubén Gmail [mailto:[email protected]] >>> Enviado el: lunes, 05 de octubre de 2009 22:05 >>> Para: David Conde >>> CC: <[email protected]> >>> Asunto: Re: [Tinyos-help] Problem with java net.tinyos.tools.Listen >>> >>> Have you tried to use the motelist command to determine where is your >>> device connected? >>> >>> El 05/10/2009, a las 18:54, "David Conde" <[email protected]> escribió: >>> >>>> Hi , I am trying to launch the Lesson 6 example in TinyOS 1.X >>>> tutorial but when I tried to launch >>>> >>>>>> java net.tinyos.tools.Listen –comm ser...@com1:telosb >>>> I do not get any data in the screen, I just get: >>>> >>>> >>>> >>>>>> Usage: java net.tinyos.tools.Listen. >>>> Firstly I installed the oscilloscope application in my Mote, then I >>>> included the Listen path in my ClassPath, and then when I tried to >>>> type: java net.tinyos.tools.Listen –comm ser...@com1:telosb I just >>>> got what I wrote above. >>>> >>>> >>>> >>>> I have tried changing the COM1 to COM2, and COM3 because I am >>>> working in WindowsXP, and I have also tried changing telosb to telos >>>> but I do not know what it is the problem. >>>> >>>> >>>> >>>> I am not working in Cygwin, is this necessary? I am using the MS-DOS >>>> command line >>>> >>>> >>>> >>>> Any tips? >>>> >>>> >>>> >>>> Thanks in advance >>>> >>>> >>>> >>>> David >>>> >>>> _______________________________________________ >>>> Tinyos-help mailing list >>>> [email protected] >>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >>> _______________________________________________ >>> Tinyos-help mailing list >>> [email protected] >>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Tinyos-help mailing list >>> [email protected] >>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Ruben Rios _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
