Hi,
I'am running Openwrt (0.9) on a ASUS WL500gP and have some problems
with the pl2303 usb serial adapter. Normal serial port access works without
problems, but setting rts/dtr does not work.
rts/dtr setting is required to get access to a ws2300 weather station,
the weather station uses the rts/dtr level to generate high/low signals.
The same software runs without problems on my laptop with 2.6.15 with
the same pl2303 adapter.
The following code snippet includes the handling of the rts/dtr lines,
the dmesg output shows the debug output from the pl2303 kernel
module (loaded mit debug=1)
Do I have a problem with my cross compiling enviromnet
(but all other serial port access functions work) or is there
a bug in the pl2303 driver ?
Micha
code snippet
========
// Set DTR low and RTS high and leave other ctrl lines untouched
ioctl(ws2300, TIOCMGET, &portstatus); // get current port status
portstatus &= ~TIOCM_DTR;
portstatus |= TIOCM_RTS;
ioctl(ws2300, TIOCMSET, &portstatus); // set current port status
dmesg
====
usbserial.c: USB Serial support registered for PL-2303
usbserial.c: PL-2303 converter detected
pl2303.c: device type: 2
usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.11
pl2303.c: pl2303_open - port 0
pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
pl2303.c: 0x40:0x1:0x404:0x0 0
pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
pl2303.c: 0xc0:0x1:0x8383:0x0 1 - 0
pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
pl2303.c: 0x40:0x1:0x404:0x1 0
pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
pl2303.c: 0xc0:0x1:0x8383:0x0 1 - 0
pl2303.c: 0x40:0x1:0x0:0x1 0
pl2303.c: 0x40:0x1:0x1:0x0 0
pl2303.c: 0x40:0x1:0x2:0x44 0
pl2303.c: 0x40:0x1:0x8:0x0 0
pl2303.c: 0x40:0x1:0x9:0x0 0
pl2303.c: pl2303_set_termios - port 0
pl2303.c: 0xa1:0x21:0:0 7 - 80 25 0 0 0 0 8
pl2303.c: pl2303_set_termios - data bits = 8
pl2303.c: pl2303_set_termios - baud = 9600
pl2303.c: pl2303_set_termios - stop bits = 1
pl2303.c: pl2303_set_termios - parity = none
pl2303.c: 0x21:0x20:0:0 7
pl2303.c: set_control_lines - value = 3, retval = 0
pl2303.c: 0xa1:0x21:0:0 7 - 80 25 0 0 0 0 8
pl2303.c: pl2303_open - submitting read urb
pl2303.c: pl2303_open - submitting interrupt urb
pl2303.c: pl2303_ioctl (0) cmd = 0x540e
pl2303.c: pl2303_ioctl not supported = 0x540e
pl2303.c: pl2303_set_termios - port 0
pl2303.c: 0xa1:0x21:0:0 7 - 80 25 0 0 0 0 8
pl2303.c: pl2303_set_termios - data bits = 8
pl2303.c: pl2303_set_termios - baud = 2400
pl2303.c: pl2303_set_termios - stop bits = 1
pl2303.c: pl2303_set_termios - parity = none
pl2303.c: 0x21:0x20:0:0 7
pl2303.c: 0xa1:0x21:0:0 7 - 60 9 0 0 0 0 8
pl2303.c: pl2303_ioctl (0) cmd = 0x540d
pl2303.c: pl2303_ioctl not supported = 0x540d
pl2303.c: pl2303_ioctl (0) cmd = 0x5407
pl2303.c: pl2303_ioctl not supported = 0x5407
pl2303.c: pl2303_ioctl (0) cmd = 0x741d
pl2303.c: pl2303_ioctl not supported = 0x741d
pl2303.c: pl2303_ioctl (0) cmd = 0x741a
pl2303.c: pl2303_ioctl not supported = 0x741a
pl2303.c: pl2303_ioctl (0) cmd = 0x5407
pl2303.c: pl2303_ioctl not supported = 0x5407
pl2303.c: pl2303_write - port 0, 1 bytes
pl2303.c: pl2303_write - length = 1, data = 06
pl2303.c: pl2303_write_bulk_callback - port 0
pl2303.c: pl2303_ioctl (0) cmd = 0x5407
pl2303.c: pl2303_ioctl not supported = 0x5407
pl2303.c: pl2303_write - port 0, 1 bytes
pl2303.c: pl2303_read_int_callback - usb_submit_urb failed with result -19