I recently bought a TrendNet TU-S9 USB to RS232 converter. I need to talk to microcontrollers that use RS232 at 9600 baud. The code I have for a Linux box works fine. I installed the drivers according to the instructions on my laptop and a Mac Mini both running OS X 10.6.7. I changed the device to /dev/cu.usbserial.
Here's what happens. It sure does look like communication will work the first time I try it. But if I exit the process I can't write to the serial device anymore. If I unplug the USB connection and plug it in again, then I can go one more time. I.e. it looks like plugging in the USB connector is what is necessary to get things reset to a usable state.
When I get the error the second time I try to start the process, I can open the device, but the error happens the first time I try to send a byte over the serial interface. The error from perror is "Serial: No such file or directory".
I can get around this problem by writing a second program that merely opens the cu.usbserial device and then loops forever. This doesn't seem like the best way to fix it, though.
Has any one seen this behavior? Can anyone replicate it? Does anyone know how to fix it?
Note: this might be related to a previous post Programmatically talking to a Serial Port in OS X or Linux, or it might not.
Eric
I don't really have an answer to you're exact problem, but I had a problem getting the TU-S9 working with my MacBook Pro today. I have the new 2011 MBP running 10.6.7. I installed the drivers from TrendNet and the device showed up in my System Profiler as a Prolific USB serial adapter, but the device wasn't available from either of my terminal programs (zterm and goSerial).
I later discovered that I needed to actually download the latest drivers from Prolific directly http://prolificusa.com/pl-2303hx-drivers/ (md_PL2303_MacOSX10.6_dmg_v1.4.0.zip). As soon as I installed the latest drivers and rebooted it worked perfectly.
In /dev I had cu.usbserial and tty.usbserial. I was able to get terminal access using either of them by using command "screen tty.usbserial 9600" (it also worked from zTerm)
Hope this helps somebody!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With