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