From: Thomas Stewart <thomas@stewarts.org.uk>
To: linux-kernel@vger.kernel.org
Subject: belkin usb serial converter (mct_u232), break not working
Date: Wed, 20 Oct 2004 19:46:35 +0100 [thread overview]
Message-ID: <200410201946.35514.thomas@stewarts.org.uk> (raw)
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]
next reply other threads:[~2004-10-20 18:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-20 18:46 Thomas Stewart [this message]
2004-10-20 20:48 ` belkin usb serial converter (mct_u232), break not working 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200410201946.35514.thomas@stewarts.org.uk \
--to=thomas@stewarts.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox