Hi again guys, I was trying to do this patch on an Xubuntu 11.10 of one of my group members and after I do the ant jar command it says that cannot find the Listen class and so on for the other java programs.
I think is a nesC problem, but i can't find what. The output of the ant jar command is in this file http://db.tt/BAKvtmgE. Thanks for your help. Luís Pereira 2011/10/27 András Bíró <bband...@gmail.com> > Yes, it worked for me (I also tried all the combinations, only this one > worked). > > ant jar: It regenerates the tinyos.jar file. Apache ant is similar to > GNU Make, but it's designed for java. You will need ant and javac to > regenerate the jar file (and mig and ncg, which are part of nesc and > tinyos-tools). > > Andris > > 2011/10/27 Luís Pereira <luispereira....@gmail.com>: > > Hi András, > > I tried out your patch but it didn't work. I test a few combinations of > the > > RTS DTS state and none of them work. Did it work for you? > > What do you mean with ant jar? I don't understand that line. > > Thanks for your help > > Luís Pereira > > > > > > On Thu, Oct 27, 2011 at 16:10, András Bíró <bband...@gmail.com> wrote: > >> > >> Hi Guys, > >> > >> Urs, it's not always working in c, I couldn't use it with cutecom. > >> But since I worked with the JNI libraries recently, I checked what > >> should be changed, and it was really easy, check the attached patch (I > >> did the change on the svn version). You can try it with: > >> > >> cd $TOSROOT/sdk/java > >> patch -p1 < telosa.patch > >> ant jar > >> > >> It sets the RTS line and clears the DTR before connecting, it seems > >> eigther the telosa needs the opposite I thought, or both lines are > >> inverted. > >> > >> Andris > >> > >> 2011/10/27 Urs Hunkeler <urs.hunke...@epfl.ch>: > >> > Hi Luís, > >> > Hi Andris, > >> > > >> > As Andris pointed out, if you could control the RTS/DTS lines, you > >> > should be > >> > able to solve this. Actually, this is not a Java problem, as Java > >> > doesn't > >> > have support for the serial port. Java uses a JNI (Java Native > >> > Interface) > >> > library written in C and provided by TinyOS to access the serial port. > >> > Accessing the handshake lines could be fixed there. Or one could tell > >> > the > >> > JNI library after the connection is made to release the reset (by > >> > manually > >> > overwriting the RTS/DTS lines using the API provided by the JNI > >> > library). > >> > > >> > If it works in C, maybe a simpler solution would be to use the serial > >> > forwarder written in C (I think there is one) and connect to this > serial > >> > forwarder from the Java programs. > >> > > >> > Cheers, > >> > Urs > >> > > >> > > >> > On 10/27/11 4:14 PM, Luís Pereira wrote: > >> >> > >> >> Hi Urs, > >> >> > >> >> Thanks for your aswer. So if Java programs work that way, there is > >> >> nothing > >> >> I can do to make it work do I? > >> >> Well I could make some C/C++ program to do what I want. > >> >> > >> >> Luís Pereira > >> >> > >> >> > >> >> On Thu, Oct 27, 2011 at 07:39, Urs Hunkeler <urs.hunke...@epfl.ch > >> >> <mailto:urs.hunke...@epfl.ch>> wrote: > >> >> > >> >> Hi Luís, > >> >> > >> >> These are interesting findings. I don't think it is a problem > >> >> related to > >> >> Java as a language. It appears to me that the microcontroller is > >> >> reset > >> >> as soon as the serial port is opened. Maybe the Java programs that > >> >> you > >> >> have tried set some handshaking lines that cause a reset. > >> >> > >> >> If you look at the schematics: > >> >> http://www.tinyos.net/scoop/special/hardware > >> >> > >> >> You can see (on the last page) that the reset handling differs > >> >> between > >> >> TelosA and TelosB. If I understand this correctly, a certain > >> >> combination > >> >> of RTS and DTR causes a reset on the TelosA, while on the TelosB > one > >> >> needs to send a special sequence RTS and DTR (and possibly other > >> >> handshaking signals). > >> >> > >> >> Cheers, > >> >> Urs > >> >> > >> >> > >> >> On 10/26/11 11:27 PM, Luís Pereira wrote: > >> >> > Hi guys, > >> >> > > >> >> > Following that tip Bíró gave, i found a little program that uses > >> >> rxtx to > >> >> > find and open the usb port. When I run the program it find the > >> >> door and > >> >> > my mote stop blink again. I'm starting to think that the problem > >> >> is with > >> >> > java and usb ports. > >> >> > > >> >> > I have a little program in C that reads data from a serial port. > >> >> When I > >> >> > try to read from the mote it works and I have the following > >> >> output: > >> >> > > >> >> > Transmission 1: > >> >> > 0x0 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 0x30 0x31 0x65 0x2C > >> >> 0x20 0x6C > >> >> > 0x65 0x64 0x3D 0x30 0x30 0x30 > >> >> > > >> >> > count=001e, led=000 > >> >> > > >> >> > Transmission 2: > >> >> > 0x36 0xD 0xA 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 0x30 0x31 > >> >> 0x66 0x2C > >> >> > 0x20 0x6C 0x65 0x64 0x3D 0x30 > >> >> > > >> >> > 6 > >> >> > count=001f, led=0 > >> >> > > >> >> > Transmission 3: > >> >> > 0x30 0x30 0x37 0xD 0xA 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x30 > >> >> 0x30 0x32 > >> >> > 0x30 0x2C 0x20 0x6C 0x65 0x64 > >> >> > > >> >> > 007 > >> >> > count=0020, led > >> >> > > >> >> > Transmission 4: > >> >> > 0x3D 0x30 0x30 0x0 0x30 0x30 0xD 0xA 0x63 0x6F 0x75 0x6E > >> >> 0x74 0x3D > >> >> > 0x30 0x30 0x32 0x31 0x2C 0x20 > >> >> > > >> >> > =0000 > >> >> > count=0021, > >> >> > > >> >> > > >> >> > I'm not synchronizing, only reading data. The first line after > >> >> > "Transmission X:" is the hexadecimal code i read, and the second > >> >> is > >> >> > converted to text, and as you can see I'm receiving what I'm > >> >> suppose to, > >> >> > so it's something related to java programs right? > >> >> > > >> >> > > >> >> > Luís Pereira > >> >> > > >> >> > > >> >> > > >> >> > _______________________________________________ > >> >> > Tinyos-help mailing list > >> >> > Tinyos-help@millennium.berkeley.edu > >> >> <mailto:Tinyos-help@millennium.berkeley.edu> > >> >> > > >> >> > >> >> > >> >> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > >> >> > >> >> _______________________________________________ > >> >> Tinyos-help mailing list > >> >> Tinyos-help@millennium.berkeley.edu > >> >> <mailto:Tinyos-help@millennium.berkeley.edu> > >> >> > >> >> > >> >> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > >> >> > >> >> > >> > > >> > > > > > >
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help