Date: Sat, 19 Sep 2009 13:13:33 -0500 (CDT) From: Greg Rivers <gcr+freebsd-current@tharned.org> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-current@freebsd.org Subject: Re: USB-to-serial adapter no longer working in 8.0-RC1 Message-ID: <alpine.BSF.2.00.0909191200370.1320@blue.tharned.org> In-Reply-To: <200909191553.12645.hselasky@c2i.net> References: <alpine.BSF.2.00.0909182117210.1423@blue.tharned.org> <200909191553.12645.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 19 Sep 2009, Hans Petter Selasky wrote: > On Saturday 19 September 2009 05:40:28 Greg Rivers wrote: >> Last May, Hans Petter Selasky fixed up the umct driver for 8.0-CURRENT >> (http://lists.freebsd.org/pipermail/freebsd-current/2009-May/007125.html). >> After updating to 8.0-RC1 I find that the driver has a new problem. >> >> Testing with cu(1) and a modem, I can see by watching the lights on the >> modem and on the usb-serial adapter that it still asserts DTR and sends >> and receives characters properly, but no characters reach the terminal. >> That seems to be the only problem: characters from the attached serial >> device seem to disappear before reaching whatever program has the serial >> device open. But strangely enough, power cycling the modem results in a >> few "line noise" characters appearing. Perhaps the driver is no longer >> responding appropriately to DSR? >> >> Any insight or troubleshooting clues would be much appreciated. > > Hi, > > You need to provide debug output from: > > sysctl hw.usb.ucom.debug=15 > > and > > sysctl hw.usb.umct.debug=15 > > If it exists. > hw.usb.umct does not exist, but hw.usb.ucom does. Here's debug output with hw.usb.ucom.debug set to 15. I tested with a modem because it's easy to interact with. Attach USB-serial adapter to USB port: ugen1.2: <Belkin USB PDA Adapter> at usbus1 umct0: <Belkin USB PDA Adapter Belkin Components, class 0/0, rev 1.10/1.02, addr 2> on usbus1 ucom_attach_tty:317: tp = 0xc5644200, unit = 0 ucom_attach_tty:346: ttycreate: U0 Open /dev/cuaU0 via 'cu -l cuaU0 -s 115200 dir': ucom_open:554: tp = 0xc5644200 ucom_dtr:827: onoff = 1 ucom_line_state:799: on=0x01, off=0x00 ucom_rts:838: onoff = 1 ucom_line_state:799: on=0x02, off=0x00 ucom_break:816: onoff = 0 ucom_line_state:799: on=0x00, off=0x04 ucom_status_change:901: ucom_param:950: sc = 0xc5433230 ucom_dtr:827: onoff = 1 ucom_line_state:799: on=0x01, off=0x00 ucom_rts:838: onoff = 1 ucom_line_state:799: on=0x02, off=0x00 ucom_cfg_open:520: ucom_ioctl:653: cmd = 0x402c7413 ucom_ioctl:653: cmd = 0x802c7416 ucom_ioctl:653: cmd = 0x2000740d ucom_ioctl:653: cmd = 0x402c7413 ucom_ioctl:653: cmd = 0x802c7416 ucom_param:950: sc = 0xc5433230 ucom_ioctl:653: cmd = 0x8004667e ucom_ioctl:653: cmd = 0x8004667d ucom_get_data:1064: cnt=0 Type "atz<enter>" (modem resets, responds with "OK"): ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_status_change:901: Type "atdt<enter>" (modem goes off hook, finds no dial tone, prints "NO DIALTONE", hangs up): ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_status_change:901: last message repeated 2 times Type "atz<enter>" (modem resets, responds with "OK"): ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_status_change:901: Type "~." to exit cu: ucom_ioctl:653: cmd = 0x2000740e ucom_ioctl:653: cmd = 0x2000740e ucom_close:623: tp=0xc5644200 ucom_shutdown:446: ucom_dtr:827: onoff = 0 ucom_line_state:799: on=0x00, off=0x01 ucom_rts:838: onoff = 1 ucom_line_state:799: on=0x02, off=0x00 ucom_cfg_close:605: Detach USB-serial adapter from USB port: ugen1.2: <Belkin USB PDA Adapter> at usbus1 (disconnected) umct0: at uhub0, port 1, addr 2 (disconnected) ucom_detach_tty:358: sc = 0xc5433230, tp = 0xc5644200 ucom_close:623: tp=0xc5644200 ucom_close:626: tp=0xc5644200 already closed Note that none of the characters output by the modem made it to cu. Each sequence of ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 corresponds to me typing a character. There are no debug lines corresponding to characters output by the modem, so they must be getting dropped prior to reaching the ucom driver. I also tested with a 8.0-BETA2 system from July 18; it has the same problem. But I know that it was working on 8.0-CURRENT as recently as the first week of June. It still works fine on recent 7.2-STABLE. -- Greg Rivers
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0909191200370.1320>