cp210x.ko hangs on open attempt
Wolfgang S. Rupprecht
wolfgang.rupprecht at gmail.com
Thu Sep 30 00:31:11 UTC 2010
Alan Cox <alan at lxorguk.ukuu.org.uk> writes:
> On Wed, 29 Sep 2010 11:55:21 -0400
> "Roger K. Wells" <ROGER.K.WELLS at saic.com> wrote:
>
>>
>> I have a RS485 serial device (Quatech SSU2-300) that when plugged
>> into a USB (2.0) port appears to be recognized correctly. dmesg yields:
>>
>> cp210x 3-1:1.0: cp210x converter detected
>> usb 3-1: reset full speed USB device using uhci_hcd and address 8
>> usb 3-1: cp210x converter now attached to ttyUSB0
>>
>> A "C" language program attempting to use this port hangs at the
>> open call.
>>
>> This same program with the same device worked on a Centos 5.5
>> install on the same computer.
>>
>> uname -r : 2.6.34.7-56.fc13.x86_64
>>
>> The USB device works in Windows XP so I don't think there is a defect
>> there.
>
> Modern kernels properly handle carrier detect and wait so open it with
> O_NDELAY if you don't want to wait for the carrier line to be asserted
> and/or set the CLOCAL termios bits if you are not using the carrier and
> flow control.
One of my pet peeves is people that wire up 3-wire rs-232 (ground, tx,
rx) and then wonder why they can't open the port. Carrier detect is a
very useful line for detecting if the rs-232 plug fell out of the
computer. People should get in the habit of at least looping RTS->CTS,
DTR->{DSR,DCD}.
-wolfgang
--
Wolfgang S. Rupprecht http://www.wsrcc.com/wolfgang/ (IPv6-only)
More information about the users
mailing list