Hi Urs, You're right. I mesaurd the voltage on the reset button: it's about 3.3V when it's unpressed, and 0V if pressed. But after I connect to the mote with Listen, the voltage is always 0V, which means, it's in reset state. The mote only exit the reset state if I unplug/replug it, or reset it with tos-bsl (tos-bsl -c /dev/ttyUSB0 -r --telos). I also measured the RTS/DTR outputs on the FT232, and it seems the problem is that RTS goes to logical low when I connect to the port.
By the way, that shouldn't happen: default: RTS=1, DTR=0 -> RTSn=0, DTRn=1 -> preRESET=1 (flip-flop in PRESET function) serial connected: RTS=0, DTR=0 -> RTSn=1, DTRn=1 -> flip-flop in flip-flop function, so it shouldn't change preRESET until a rising edge on CK, but CK is connected to GND (and even after the edge on CK, preRESET=0, since D=0). It should only reset the MCU when RTS=0, DTR=1 (flip-flop in CLEAR function). Luis, you could probably resolve this issue if you could control the RTS/DTR lines in java by hand. Andris On Thu, Oct 27, 2011 at 8:39 AM, Urs Hunkeler <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 >> 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 > _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help