From owner-freebsd-usb@FreeBSD.ORG Sun Mar 18 19:25:39 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 2ACBB106564A for ; Sun, 18 Mar 2012 19:25:39 +0000 (UTC) (envelope-from fabiodive@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id D48348FC24 for ; Sun, 18 Mar 2012 19:25:38 +0000 (UTC) Received: by qao25 with SMTP id 25so500982qao.13 for ; Sun, 18 Mar 2012 12:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=pGQKf45CT1bahj8B4VewUchwrmk+cQ98WLSeZM5IG2E=; b=dw53M9KX6lbSySITTZK7wa3+Ayn89NiPwJ2dZkERFMd8sqa9Lv3DQMLiEKjUlYijHy OJgjuRLncqBBVCv4Hv8pUfRMUzTMi3lT3sszbL+Tvgaf9R/Wdv8Hj5/2/XPmQsWgS7xF fdcc0OrZ5HrqT9KGFsiZPRxuw4LjCWlwk+mDpPUPYPuReR+5BdW7rE5HA0dOMS92EPAG 5N2H9GIPdJaqkUNlO+tnysrKrxaaJd1hN/dH33eqggvHiQounzatHw57IIwt9iBelFKG oicPTLXUo51z/6ozJpoxGecvcTkioKnb8pqATVdMa/iXX7eMCTCsqVozpxTlyqea4foU RCAQ== MIME-Version: 1.0 Received: by 10.229.114.220 with SMTP id f28mr3563420qcq.151.1332098738093; Sun, 18 Mar 2012 12:25:38 -0700 (PDT) Received: by 10.229.163.204 with HTTP; Sun, 18 Mar 2012 12:25:38 -0700 (PDT) In-Reply-To: References: Date: Sun, 18 Mar 2012 19:25:38 +0000 Message-ID: From: Fabio Dive To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: 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 19:25:39 -0000 dear Warren, I did everything you write me but even using devfs.rules or by hand modify the ownership or write permission, or using the root user, it doesn't work. These are the rules activated by rc.conf with: devfs_system_ruleset=3D"usb_devices" cat /etc/devfs.rules [usb_devices=3D10] add path 'ugen*' mode 0777 user seaman group dialer add path 'ttyU*' mode 0777 user seaman group dialer add path 'usb/*' mode 0777 user seaman group dialer add path 'ums*' mode 0777 user seaman group usb add path 'cuaU*' mode 0777 user seaman group dialer add path 'da*s*' mode 0660 group usb I put 7 just to be sure to try everything.. normally I just need "rw" permissions. Thank you FabioDive On Sun, Mar 18, 2012 at 18:32, Fabio Dive wrote: > 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=3D0 md=3DHOST spd=3DFULL (12Mbps) pwr=3DON > ugen1.2.0: uplcom0: class 0/0, rev 1.10/3.00, addr 2> > > > * usbconfig -d ugen1.2 dump_device_desc > ugen1.2: at usbus1, > cfg=3D0 md=3DHOST spd=3DFULL (12Mbps) pwr=3DON > > =C2=A0bLength =3D 0x0012 > =C2=A0bDescriptorType =3D 0x0001 > =C2=A0bcdUSB =3D 0x0110 > =C2=A0bDeviceClass =3D 0x0000 > =C2=A0bDeviceSubClass =3D 0x0000 > =C2=A0bDeviceProtocol =3D 0x0000 > =C2=A0bMaxPacketSize0 =3D 0x0040 > =C2=A0idVendor =3D 0x067b > =C2=A0idProduct =3D 0x2303 > =C2=A0bcdDevice =3D 0x0300 > =C2=A0iManufacturer =3D 0x0001 =C2=A0 > =C2=A0iProduct =3D 0x0002 =C2=A0 > =C2=A0iSerialNumber =3D 0x0000 =C2=A0 > =C2=A0bNumConfigurations =3D 0x0001 > > > * dmesg when I connect the cable: > ugen1.2: at usbus1 > uplcom0: rev 1.10/3.00, addr 2> on usbus1 > > * KLDSTAT > Id Refs Address =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Size =C2=A0 =C2= =A0 Name > =C2=A01 =C2=A0 36 0xffffffff80200000 d58c20 =C2=A0 kernel > =C2=A03 =C2=A0 =C2=A01 0xffffffff80f6c000 104ab40 =C2=A0nvidia.ko > =C2=A04 =C2=A0 =C2=A04 0xffffffff81fb7000 45218 =C2=A0 =C2=A0linux.ko > =C2=A05 =C2=A0 =C2=A01 0xffffffff82212000 13300f =C2=A0 zfs.ko > =C2=A06 =C2=A0 =C2=A01 0xffffffff82346000 2fb5 =C2=A0 =C2=A0 opensolaris.= ko > =C2=A07 =C2=A0 =C2=A01 0xffffffff82349000 3d5d =C2=A0 =C2=A0 linprocfs.ko > =C2=A08 =C2=A0 =C2=A01 0xffffffff8234d000 24c19 =C2=A0 =C2=A0wpifw.ko > 10 =C2=A0 =C2=A01 0xffffffff82374000 2a4c1 =C2=A0 =C2=A0pf.ko > 11 =C2=A0 =C2=A01 0xffffffff8239f000 762 =C2=A0 =C2=A0 =C2=A0rtc.ko > 12 =C2=A0 =C2=A01 0xffffffff82372000 1fd5 =C2=A0 =C2=A0 uplcom.ko > > * stty -a -f /dev/cuaU0 > speed 9600 baud; 0 rows; 0 columns; > lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl > =C2=A0 =C2=A0 =C2=A0 -echoprt -altwerase -noflsh -tostop -flusho -pendin = -nokerninfo > =C2=A0 =C2=A0 =C2=A0 -extproc > iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk > =C2=A0 =C2=A0 =C2=A0 brkint -inpck -ignpar -parmrk > oflags: opost onlcr -ocrnl tab0 -onocr -onlret > cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow > =C2=A0 =C2=A0 =C2=A0 -dtrflow -mdmbuf > cchars: discard =3D ^O; dsusp =3D ^Y; eof =3D ^D; eol =3D ; > =C2=A0 =C2=A0 =C2=A0 eol2 =3D ; erase =3D ^?; erase2 =3D ^H; intr = =3D ^C; kill =3D ^U; > =C2=A0 =C2=A0 =C2=A0 lnext =3D ^V; min =3D 1; quit =3D ^\; reprint =3D ^R= ; start =3D ^Q; > =C2=A0 =C2=A0 =C2=A0 status =3D ^T; stop =3D ^S; susp =3D ^Z; time =3D 0;= werase =3D ^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=3D15 > > I see in dmesg after "cu -t -s 19200 -l /dev/cuaU0": > > ucom_attach_tty: ttycreate: U0 > ucom_attach: tp =3D 0xfffffe0005e08800, unit =3D 0, subunits =3D 1 > ucom_open: tp =3D 0xfffffe0005e08800 > ucom_dtr: onoff =3D 1 > ucom_line_state: on=3D0x01, off=3D0x00 > ucom_rts: onoff =3D 1 > ucom_line_state: on=3D0x02, off=3D0x00 > ucom_ring: onoff =3D 0 > ucom_line_state: on=3D0x00, off=3D0x08 > ucom_break: onoff =3D 0 > ucom_line_state: on=3D0x00, off=3D0x04 > ucom_status_change: > ucom_param: sc =3D 0xfffffe0005106880 > ucom_dtr: onoff =3D 1 > ucom_line_state: on=3D0x01, off=3D0x00 > ucom_rts: onoff =3D 1 > ucom_line_state: on=3D0x02, off=3D0x00 > ucom_cfg_open: > ucom_ioctl: cmd =3D 0x402c7413 > ucom_ioctl: cmd =3D 0x802c7416 > ucom_ioctl: cmd =3D 0x2000740d > ucom_ioctl: cmd =3D 0x402c7413 > ucom_ioctl: cmd =3D 0x802c7416 > ucom_param: sc =3D 0xfffffe0005106880 > ucom_ioctl: cmd =3D 0x8004667e > ucom_ioctl: cmd =3D 0x8004667d > ucom_status_change: > ucom_status_change: > ucom_get_data: cnt=3D0 > ucom_outwakeup: sc =3D 0xfffffe0005106880 > ucom_get_data: cnt=3D1 > ucom_outwakeup: sc =3D 0xfffffe0005106880 > ucom_outwakeup: sc =3D 0xfffffe0005106880 > uplcom0: at uhub1, port 1, addr 2 (disconnected) > ucom_detach_tty: sc =3D 0xfffffe0005106880, tp =3D 0xfffffe0005e08800 > ucom_close: tp=3D0xfffffe0005e08800 > ucom_close: tp=3D0xfffffe0005e08800 already closed > uplcom0: rev 1.10/3.00, addr 2> on usbus1 > ucom_attach_tty: ttycreate: U0 > ucom_attach: tp =3D 0xfffffe0007953400, unit =3D 0, subunits =3D 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