[opensuse] serial -> USB converter on openSUSE 11.2
I have connected a serial -> USB converter cable between a remote serial port and the local USB. I am trying to set the baud rate and all. See Background: later in the message for more details. Something looks wrong. I do not get any data. Here I have listed the steps for this as I see it: I see the 4 devices from lsusb: Bus 002 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 002 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 002 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 002 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC The kernel modules are loaded automatically (from lsmod): ftdi_sio 52936 4 usbserial 40904 9 ftdi_sio The ftdi_sio module lists the USB IDs as a recognized alias (from modinfo): alias: usb:v0403p6001d*dc*dsc*dp*ic*isc*ip* The four devices show up as: crw-rw---- 1 root dialout 188, 0 2010-04-19 10:27 /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 1 2010-04-19 10:27 /dev/ttyUSB1 crw-rw---- 1 root dialout 188, 2 2010-04-19 10:27 /dev/ttyUSB2 crw-rw---- 1 root dialout 188, 3 2010-04-19 10:27 /dev/ttyUSB3 I am a member of the dialout group. I am running an application that I have used with serial ports to great effect. It is accessing these devices (lsof): wish 5103 rst 4u CHR 188,0 0t0 4838 /dev/ttyUSB0 wish 5108 rst 4u CHR 188,3 0t0 4854 /dev/ttyUSB3 wish 5115 rst 4u CHR 188,2 0t0 4868 /dev/ttyUSB2 wish 5120 rst 4u CHR 188,1 0t0 4882 /dev/ttyUSB1 The program sets the devices to be 38400 baud, no parity, one stop bit. Oddly, nothing is arriving on the port. So, I thought I would check with setserial that the port settings are as expected. setserial -g /dev/ttyUSB* /dev/ttyUSB0, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB1, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB2, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB3, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency Is this what setserial should report for this type of serial port? Maybe it does not work with USB serial ports? Background: I am trying to diagnose a Linux kernel boot problem with a diskless openSUSE 11.2 system at a remote location. I have used the ever popular kernel command line option on the remote: console=ttyS1,38400n8 splash=0 textmode=1 This has always worked for me. The person at the remote tells me that all listing on the console stops just when I would expect it to. So I am fairly certain the kernel is sending the data on the serial port. The serial port is connected to another openSUSE computer next to it. I am logged in to that one from a remote computer and running the serial port monitor (wish). But nothing arrives. The setserial listing is mysterious. Anyone used these sorts of devices? -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi Roger, On 19-04-2010 11:08, Roger Oberholtzer wrote:
I have connected a serial -> USB converter cable between a remote serial port and the local USB. I am trying to set the baud rate and all. See Background: later in the message for more details. Something looks wrong. I do not get any data. Here I have listed the steps for this as I see it:
I see the 4 devices from lsusb:
Bus 002 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 002 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 002 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 002 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
The kernel modules are loaded automatically (from lsmod):
ftdi_sio 52936 4 usbserial 40904 9 ftdi_sio
The ftdi_sio module lists the USB IDs as a recognized alias (from modinfo):
alias: usb:v0403p6001d*dc*dsc*dp*ic*isc*ip*
The four devices show up as:
crw-rw---- 1 root dialout 188, 0 2010-04-19 10:27 /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 1 2010-04-19 10:27 /dev/ttyUSB1 crw-rw---- 1 root dialout 188, 2 2010-04-19 10:27 /dev/ttyUSB2 crw-rw---- 1 root dialout 188, 3 2010-04-19 10:27 /dev/ttyUSB3
I am a member of the dialout group. I am running an application that I have used with serial ports to great effect. It is accessing these devices (lsof):
wish 5103 rst 4u CHR 188,0 0t0 4838 /dev/ttyUSB0 wish 5108 rst 4u CHR 188,3 0t0 4854 /dev/ttyUSB3 wish 5115 rst 4u CHR 188,2 0t0 4868 /dev/ttyUSB2 wish 5120 rst 4u CHR 188,1 0t0 4882 /dev/ttyUSB1
The program sets the devices to be 38400 baud, no parity, one stop bit. Oddly, nothing is arriving on the port. So, I thought I would check with setserial that the port settings are as expected.
setserial -g /dev/ttyUSB*
/dev/ttyUSB0, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB1, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB2, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB3, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency
Is this what setserial should report for this type of serial port? Maybe it does not work with USB serial ports?
Use stty to setup all serial options, like baudrate, handshaking, etc. Something like: stty -F /dev/ttyUSB0 9600 raw -echo This will setup your serial port to 9600 without local echo on a raw state.
Background:
I am trying to diagnose a Linux kernel boot problem with a diskless openSUSE 11.2 system at a remote location. I have used the ever popular kernel command line option on the remote:
console=ttyS1,38400n8 splash=0 textmode=1
This has always worked for me. The person at the remote tells me that all listing on the console stops just when I would expect it to. So I am fairly certain the kernel is sending the data on the serial port. The serial port is connected to another openSUSE computer next to it. I am logged in to that one from a remote computer and running the serial port monitor (wish).
But nothing arrives. The setserial listing is mysterious. Anyone used these sorts of devices?
Also remember that the "usual" serial ports are included in (almost) all kernel images. However USB serial ports do not. You cannot expect the same behavior with both of those ports. You must at least include, in your case, the ftdi_sio driver on your bzImage (kernel). You can also try and log all info through netconsole. Kernel tries to do some extra magic to load all needed drivers and setup the network for you. Of course, you also should have the required drivers not compiled as a module. Regards, -- Rui Santos http://www.ruisantos.com/ Veni, vidi, Linux! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2010-04-19 at 11:38 +0100, Rui Santos wrote:
stty to setup all serial options, like baudrate, handshaking, etc. Something like: stty -F /dev/ttyUSB0 9600 raw -echo
That helped. I see that stty reports that the ports are set as I expect: speed 38400 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke So, setserial is not useful for these devices. Your comments on the drivers is of course correct. However, it does not apply in my case, The drivers only need to be on the computer with the USB end of the cable. The computer on the serial port side just writes to its RS-232 port as always. I have used NULL-modem cables with this kernel before and it works fine. The reason I am trying these new cables is that I need to have more of these than I have serial ports on the server. USB offers this scale. Also, I only need to have one USB cable go from the place with the diskless farm to the server. So, I still wonder where the serial port data is going. There are no messages at all in /var/log/messages with complaints from the USB drivers. But is no news really good news? -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 19-04-2010 11:54, Roger Oberholtzer wrote:
On Mon, 2010-04-19 at 11:38 +0100, Rui Santos wrote:
stty to setup all serial options, like baudrate, handshaking, etc. Something like: stty -F /dev/ttyUSB0 9600 raw -echo
That helped. I see that stty reports that the ports are set as I expect:
speed 38400 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke
So, setserial is not useful for these devices.
Your comments on the drivers is of course correct. However, it does not apply in my case, The drivers only need to be on the computer with the USB end of the cable. The computer on the serial port side just writes to its RS-232 port as always. I have used NULL-modem cables with this kernel before and it works fine. The reason I am trying these new cables is that I need to have more of these than I have serial ports on the server. USB offers this scale. Also, I only need to have one USB cable go from the place with the diskless farm to the server.
You are correct. I assumed you were trying to connect them on the server side.
So, I still wonder where the serial port data is going. There are no messages at all in /var/log/messages with complaints from the USB drivers. But is no news really good news?
Can you still receive data from your server by using the old method ? If so, you can always check you physical COM settings through the method above and try to mimic it on your USB one... -- Rui Santos http://www.ruisantos.com/ Veni, vidi, Linux! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello Roger, Roger Oberholtzer wrote:
On Mon, 2010-04-19 at 11:38 +0100, Rui Santos wrote:
stty to setup all serial options, like baudrate, handshaking, etc. Something like: stty -F /dev/ttyUSB0 9600 raw -echo
That helped. I see that stty reports that the ports are set as I expect:
speed 38400 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke
So, setserial is not useful for these devices.
Your comments on the drivers is of course correct. However, it does not apply in my case, The drivers only need to be on the computer with the USB end of the cable. The computer on the serial port side just writes to its RS-232 port as always. I have used NULL-modem cables with this kernel before and it works fine. The reason I am trying these new cables is that I need to have more of these than I have serial ports on the server. USB offers this scale. Also, I only need to have one USB cable go from the place with the diskless farm to the server.
So, I still wonder where the serial port data is going. There are no messages at all in /var/log/messages with complaints from the USB drivers. But is no news really good news?
I don't know whether you tried this already or not, but I've always had good results using minicom with those devices/cables. I use a TrendNET TU-S9 USB to serial adaptor. HTH Cheers. Bye. Ph. A. -- *Philippe Andersson* Unix System Administrator IBA Particle Therapy | Tel: +32-10-475.983 Fax: +32-10-487.707 eMail: pan@iba-group.com http://www.iba-worldwide.com
I am going to have the guys connecting things start at the beginning (one more time). Something must not be connected as claimed. As it is a remote installation, I cannot verify myself. I really think the Linux part is working. As is quite often the case, there must be a cable issue... -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
setserial -g /dev/ttyUSB*
/dev/ttyUSB0, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB1, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB2, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency /dev/ttyUSB3, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency
Is this what setserial should report for this type of serial port? Maybe it does not work with USB serial ports?
Well, at least this output is normal - I get the same here for a 4-port USB-to-serial box, and it works, talking to two devices...
I am trying to diagnose a Linux kernel boot problem with a diskless openSUSE 11.2 system at a remote location. I have used the ever popular kernel command line option on the remote:
console=ttyS1,38400n8 splash=0 textmode=1
Hmm, bad connection with a too high baudrate? Have you tried with a lower setting? Pit -- Dr. Peter "Pit" Suetterlin http://www.astro.su.se/~pit Institute for Solar Physics Tel.: +34 922 405 590 (Spain) P.Suetterlin@royac.iac.es +46 8 5537 8507 (Sweden) Peter.Suetterlin@astro.su.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2010-04-19 at 13:22 +0100, Peter Suetterlin wrote:
Well, at least this output is normal - I get the same here for a 4-port USB-to-serial box, and it works, talking to two devices...
Try the stty program instead of setserial. It seems to better support these types of devices.
console=ttyS1,38400n8 splash=0 textmode=1
Hmm, bad connection with a too high baudrate? Have you tried with a lower setting?
I think 38400 is slow. With a regular null-modem cable this is no trouble. I can't think the USB would slow it down. I do not know how they implement handshake. I am guessing it is under software control. But that depends on the USB driver for this specific converter. I remember looking at the code to these types of drivers a while back and saw that there was quite a degree of variability in the completeness of the RS-232 emulation between different devices. Investigation continues... -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Peter Suetterlin
-
Philippe Andersson
-
Roger Oberholtzer
-
Rui Santos