From owner-freebsd-usb@FreeBSD.ORG Sun Mar 18 18:32:12 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00A22106564A for ; Sun, 18 Mar 2012 18:32:12 +0000 (UTC) (envelope-from fabiodive@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id B388E8FC12 for ; Sun, 18 Mar 2012 18:32:11 +0000 (UTC) Received: by qcsg15 with SMTP id g15so1055940qcs.13 for ; Sun, 18 Mar 2012 11:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=uU0Xs7Dnia6sdiTjacZZxV0ICQCmLTI8bpYCeSXg3dI=; b=0Y0uqBmuklwv5/lpnPRf6N3jv9hbqO0sWQudKFi5oc/YWvcuZzcRbGd2yvWLZUvqiY I/UjFLF46hMpwshVazBsiw23lYcVAsP6LUUY3r21Ih2GMapj1MyBn4qZTLU7+3H9XJcG gIKLQYOVemCWf9mgespLlu53qAetdOwHFSf+bjtyrl0eAKOCO3BINeyWndMemf5RUE2I I0XWGkA4PeaMc4w2xguqBnkYBk2oJDXALmIzKN1uqqYrfjmSDjf4Zu9OATlR4Y2O/DUJ s9YZVcMM5cvuGTOShT9YArWHMkT8RigtNeJeyufz0dpG1QGvxNtEHbCUcT84JrBXFOF5 cJzA== MIME-Version: 1.0 Received: by 10.224.32.12 with SMTP id a12mr11973406qad.66.1332095525287; Sun, 18 Mar 2012 11:32:05 -0700 (PDT) Received: by 10.229.163.204 with HTTP; Sun, 18 Mar 2012 11:32:05 -0700 (PDT) Date: Sun, 18 Mar 2012 18:32:05 +0000 Message-ID: From: Fabio Dive To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: USB serial adapter, cu write: Device not configured X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2012 18:32:12 -0000 Hello people! I write you because I have got a problem with the uplcom driver on FreeBSD 9.0, I tried a lot of different things, read all I found, manpages, forums, irc, google but still not able to solve my problem. I need to connect to my remote Alix board, the remote console setup is 19200 8N1. I am using a short USB Prolific Tec.. serial cable adapter with a NULL modem cable, the last one plugged one side to the Alix board, the other side to the adapter cable. Under Linux Debian everything is fine, so the hardware and cables should be ok, under Linux I used minicom and cu and tip without problems. With FreeBSD and NetBSD, big problems..the result is always the same, I can receive but I cannot transmit. (working as root) *cu -t -s 19200 -l /dev/cuaU0 write: Device not configured (I can't transmit but I can receive the output if I reboot the remote alix board) *minicom test1 ----> Cannot open /dev/ttyU0! test2 ----> Cannot open /dev/cuaU0! (in a popup box) #---- A bit of my enviroment and some command output (commands by root): I am using FreeBSD 9.0 with kernel and world compiled today with the last source updated with csup. The laptop is a Lenovo IBM Thinkpad T61. 4Gbyte of RAM, HD 40% used. Shell bash, X graphical enviroment with Fluxbox, the problem exist even within the shell without load Xorg. * usbconfig -d ugen1.2 show_ifdrv ugen1.2: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen1.2.0: uplcom0: * usbconfig -d ugen1.2 dump_device_desc ugen1.2: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x067b idProduct = 0x2303 bcdDevice = 0x0300 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 * dmesg when I connect the cable: ugen1.2: at usbus1 uplcom0: on usbus1 * KLDSTAT Id Refs Address Size Name 1 36 0xffffffff80200000 d58c20 kernel 3 1 0xffffffff80f6c000 104ab40 nvidia.ko 4 4 0xffffffff81fb7000 45218 linux.ko 5 1 0xffffffff82212000 13300f zfs.ko 6 1 0xffffffff82346000 2fb5 opensolaris.ko 7 1 0xffffffff82349000 3d5d linprocfs.ko 8 1 0xffffffff8234d000 24c19 wpifw.ko 10 1 0xffffffff82374000 2a4c1 pf.ko 11 1 0xffffffff8239f000 762 rtc.ko 12 1 0xffffffff82372000 1fd5 uplcom.ko * stty -a -f /dev/cuaU0 speed 9600 baud; 0 rows; 0 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab0 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; eol2 = ; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; I tried to change the above parameters with "stty" by hand using cuaU0, cuaU0.init and cuaU0.lock before using cu, tip and minicom. I tried different combinations to the parameters of the connections but still the problem persist. My problem is exactly the same to that reported here: http://lists.freebsd.org/pipermail/freebsd-usb/2011-July/010443.html If I try to do: sysctl hw.usb.ucom.debug=15 I see in dmesg after "cu -t -s 19200 -l /dev/cuaU0": ucom_attach_tty: ttycreate: U0 ucom_attach: tp = 0xfffffe0005e08800, unit = 0, subunits = 1 ucom_open: tp = 0xfffffe0005e08800 ucom_dtr: onoff = 1 ucom_line_state: on=0x01, off=0x00 ucom_rts: onoff = 1 ucom_line_state: on=0x02, off=0x00 ucom_ring: onoff = 0 ucom_line_state: on=0x00, off=0x08 ucom_break: onoff = 0 ucom_line_state: on=0x00, off=0x04 ucom_status_change: ucom_param: sc = 0xfffffe0005106880 ucom_dtr: onoff = 1 ucom_line_state: on=0x01, off=0x00 ucom_rts: onoff = 1 ucom_line_state: on=0x02, off=0x00 ucom_cfg_open: ucom_ioctl: cmd = 0x402c7413 ucom_ioctl: cmd = 0x802c7416 ucom_ioctl: cmd = 0x2000740d ucom_ioctl: cmd = 0x402c7413 ucom_ioctl: cmd = 0x802c7416 ucom_param: sc = 0xfffffe0005106880 ucom_ioctl: cmd = 0x8004667e ucom_ioctl: cmd = 0x8004667d ucom_status_change: ucom_status_change: ucom_get_data: cnt=0 ucom_outwakeup: sc = 0xfffffe0005106880 ucom_get_data: cnt=1 ucom_outwakeup: sc = 0xfffffe0005106880 ucom_outwakeup: sc = 0xfffffe0005106880 uplcom0: at uhub1, port 1, addr 2 (disconnected) ucom_detach_tty: sc = 0xfffffe0005106880, tp = 0xfffffe0005e08800 ucom_close: tp=0xfffffe0005e08800 ucom_close: tp=0xfffffe0005e08800 already closed uplcom0: on usbus1 ucom_attach_tty: ttycreate: U0 ucom_attach: tp = 0xfffffe0007953400, unit = 0, subunits = 1 Do you have any idea where to give a look to fix my problem? Do you need other information? I suspect that the device is continuously disconnecting and reconnecting in background...but it is just a suspect. I run out of resources and brain but I still need to solve my problem and connect with my remote Alix board using FreeBSD or NetBSD. Thank you, best regards Fabio Balzano