public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* belkin usb serial converter (mct_u232), break not working
@ 2004-10-20 18:46 Thomas Stewart
  2004-10-20 20:48 ` Paul Fulghum
  2004-10-20 21:22 ` Paul Fulghum
  0 siblings, 2 replies; 14+ messages in thread
From: Thomas Stewart @ 2004-10-20 18:46 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm having trouble with a Belkin USB serial adapter, I can't get it to send a 
break down the serial cable to a console.

I made a quick program to send a break to a port (mostly ripped off from 
minicom). 

porttest.c:
#include <sys/fcntl.h>
#include <sys/ioctl.h>
main () {
        int fd = open("/dev/ttyS0", O_RDWR|O_NOCTTY);
        ioctl(fd, TCSBRK, 0);
        close(fd);
}

Both minicom and my program send a break fine to a regular pc serial port (eg 
ttyS0). In this case it drops my sun box to an "ok" prompt.

However if I use the usb serial adapter both minicom and my program are unable 
to send breaks, they just seem to get ignored.

I loaded the modules with debugging information turned on:-
modprobe usbserial debug=1
modprobe mct_u232 debug=1

$ sudo tail -f /var/log/syslog &
$ ./porttest
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/usb-serial.c: serial_open
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: mct_u232_open 
port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: set_modem_ctrl: 
state=0x6 ==> mcr=0xb
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: set_line_ctrl: 
0x3
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: get_modem_stat: 
0x30
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: msr_to_state: 
msr=0x30 ==> state=0x126
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/usb-serial.c: 
serial_chars_in_buffer = port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/generic.c: 
usb_serial_generic_chars_in_buffer - port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/generic.c: 
usb_serial_generic_chars_in_buffer - returns 0
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/usb-serial.c: serial_break - 
port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: 
mct_u232_break_ctlstate=-1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: set_line_ctrl: 
0x43
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/usb-serial.c: serial_break - 
port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: 
mct_u232_break_ctlstate=0
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: set_line_ctrl: 
0x3
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/usb-serial.c: serial_close - 
port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: mct_u232_close 
port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: 
mct_u232_read_int_callback - port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: 
mct_u232_read_int_callback - urb shutting down with status: -2
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: 
mct_u232_read_int_callback - port 1
Oct 20 15:45:42 hydra kernel: drivers/usb/serial/mct_u232.c: 
mct_u232_read_int_callback - urb shutting down with status: -2

set_line_ctrl gets changed from 0x3 to 0x43 and back to 0x3. According to 
mct_u232.h the 6th bit of the line control register is the "set break" bit. 
So It looks like it thinks its sending a break, but as far as I can tell it 
is not actually sending it (because my sun box is not dropped to an ok 
prompt)

Anyone got any ideas about how to get it to work? (Or an alternative?)

(Can replies be CC'ed to me as I'm not subscribed. Thanks)

Regards
-- 
Tom

PGP Fingerprint [DCCD 7DCB A74A 3E3B 60D5  DF4C FC1D 1ECA 68A7 0C48]
PGP Publickey   [http://www.stewarts.org.uk/public-key.asc]
PGP ID  [0x68A70C48]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-11-04 19:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-20 18:46 belkin usb serial converter (mct_u232), break not working Thomas Stewart
2004-10-20 20:48 ` Paul Fulghum
2004-10-20 21:22 ` Paul Fulghum
2004-10-20 22:08   ` Thomas Stewart
2004-10-20 22:15     ` Paul Fulghum
2004-10-20 22:21     ` Paul Fulghum
2004-10-20 22:27     ` Paul Fulghum
2004-10-20 23:04       ` Thomas Stewart
2004-10-21  2:37         ` Paul Fulghum
2004-10-21 10:06           ` Thomas Stewart
2004-10-21 12:41             ` Paul Fulghum
2004-10-21 19:44               ` Paul Fulghum
2004-11-04 18:20                 ` Thomas Stewart
2004-11-04 19:21                   ` Paul Fulghum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox