LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB PL2303 and serial port show a different behavior (https://www.linuxquestions.org/questions/linux-hardware-18/usb-pl2303-and-serial-port-show-a-different-behavior-906184/)

tilman1 10-03-2011 08:28 AM

USB PL2303 and serial port show a different behavior
 
Hello

I wrote a program to control a serial device (power controller). Using it on an standard serial port, the device works fine, and it response properly to the commands sent. The communication relies on a stx-etx protocol (half duplex).

If I use an USB PL2303 usb-to-serial convertor, the serial device seems no longer to understand the commands issued over the serial link.
There is no handshaking mechanism used like CTS/DTS.

Not sure how to debug this. Could be a timeing issue (on the other hand the baud rate is only 9600 -- there is plenty of time and synchronization should not be an issue)

And advice what to look for ?

Thanks

Tilman

michaelk 10-03-2011 09:27 AM

Should not be any difference between the two devices i.e. the real hardware and USB adapter i.e. should behave the same.
Do not take offense but are you using the correct device ID for the USB-serial adapter?
Have you verified that data is actually being transmitted with a loopback device or other computer?

tilman1 10-03-2011 11:55 AM

I verified that I chose the correct USB port (I checked in /var/log/messages and I used gdb to debug). So, yes, I am confident that I am using the correct USB device (ttyUSB0).
Sometimes, the USB adpater correctly transmit a command. Mostly it does not. Maybe a driver issue ? I will search nother USB serial adapter (should be here somewhere :-)) and give this another try . ...


All times are GMT -5. The time now is 11:57 PM.