USB, Serial, and Vista (FTDI chip)

astyler

Gawd
Joined
Mar 7, 2007
Messages
921
I got a new laptop (Dell M1330) for development and it's running on Vista.

I'm working on software for a device that uses FTDI's FT232R chip and I ran into some trouble. When I first installed the drivers, I was able to communicate with the device fine, but after waking from sleep I was unable to, with an error claiming: No RXTXSerial in java.library.path while loading gnu.io.RXTXCommDriver.

I restarted and was able to communicate with the device right away, but later in the day I was again unable to. Upon restart a few times I still was not able to.

The device uses some drivers that basically install a USB to Serial Converter and expose it as COM3 or something, I'm not too sure on the specifics.

Anyways, anyone have any idea what is going on? Does Vista have some fancy power management and sleeps USB controllers when it doesn't detect activity? I can see this driver circumventing that making Vista not realize something's connected, but I'm not sure.

(And wtf, no hyperterminal in Vista, and apparently it used to be free for download but now isn't)

Any ideas are appreciated, thanks.
 
I got a new laptop (Dell M1330) for development and it's running on Vista.

I'm working on software for a device that uses FTDI's FT232R chip and I ran into some trouble. When I first installed the drivers, I was able to communicate with the device fine, but after waking from sleep I was unable to, with an error claiming: No RXTXSerial in java.library.path while loading gnu.io.RXTXCommDriver.

I restarted and was able to communicate with the device right away, but later in the day I was again unable to. Upon restart a few times I still was not able to.

The device uses some drivers that basically install a USB to Serial Converter and expose it as COM3 or something, I'm not too sure on the specifics.

Anyways, anyone have any idea what is going on? Does Vista have some fancy power management and sleeps USB controllers when it doesn't detect activity? I can see this driver circumventing that making Vista not realize something's connected, but I'm not sure.

(And wtf, no hyperterminal in Vista, and apparently it used to be free for download but now isn't)

Any ideas are appreciated, thanks.

Yes, Vista can/will power down USB ports during sleep by default.

Get putty to replace hyper terminal:
http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe
 
Well I figured it out. The rxtxSerial.dll was in the directory with the program, and it would fail when I ran it as:

C:\terk\> dist\hummingbrid\Hummingbird.bat

but would succeed when run as:

C:\terk\dist\hummingbird\> Hummingbird.bat

I guess it would only see that path and that was my current working directory "C:\terk\" and not also the directory I was running from "C:\terk\dist\hummingbird\".

Oh well, the behavior seems strange to me, like both should be included in the path, but I suppose there are cases when that is not desirable.
 
Oh well, the behavior seems strange to me, like both should be included in the path, but I suppose there are cases when that is not desirable.


Code:
C:\terk\> dist\hummingbrid\Hummingbird.bat

Unless your batch file calls something with the full path, it will assume everything is in the current directory. In this case, it's C:\Terk, unless the batch file changes it. I'm assuming the files you are referencing in the batch file are not in this directory, hence the failure.

Code:
C:\terk\dist\hummingbird\> Hummingbird.bat
Again, any call to a file in that batch script is going to assume it's in the same directory you're calling it in. It most likely worked because the files were in C:\Terk\dist\hummingbird.


If you want to be able to call it from anywhere, you could add the following line to your hummingbird.bat script (put it near the top!)

Code:
cd /d c:\terk\dist\hummingbird
 
Yeah I edited ant to include the final build directory in the path for all our software, so they can be run from any directory (yeah I'm a little lazy, but sitting in the build directories always stops my cleans)
 
Back
Top