From owner-freebsd-questions@FreeBSD.ORG Mon May 18 14:53:40 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD0631065678 for ; Mon, 18 May 2009 14:53:40 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swip.net [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 37ED48FC16 for ; Mon, 18 May 2009 14:53:39 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=j+k/Ze5hWUCaCztCgEjzDQ==:17 a=CIEzdh-eAAAA:8 a=KIphsAs2N4UY2EQtaJUA:9 a=w_Vsbb3nMPXF2jfSPfWN3fM1AVEA:4 a=gpo68xK-DQSA77ag:21 a=Mn0Lgkzf7K8vBWp7:21 Received: from [81.191.55.181] (account mc467741@c2i.net HELO laptop) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1071149082; Mon, 18 May 2009 15:53:37 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Mon, 18 May 2009 15:56:12 +0200 User-Agent: KMail/1.9.7 References: <20090518112739.GA97602@ei.bzerk.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905181556.13116.hselasky@c2i.net> Cc: Ruben de Groot , Saifi Khan , freebsd-questions@freebsd.org Subject: Re: USB-to-serial adapter configuration X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2009 14:53:41 -0000 On Monday 18 May 2009, Saifi Khan wrote: > On Mon, 18 May 2009, Ruben de Groot wrote: > > On Mon, May 18, 2009 at 04:07:09PM +0000, Saifi Khan typed: > > > Hi all: > > > > > > How does one configure settings for USB-to-serial adapter in FreeBSD ? > > > > > > The one i have purchased is > > > http://www.usbgear.com/computer_cable_details.cfm?sku=CHEAP-SERIAL&cats > > >=199&catid=482%2C1303%2C199%2C461%2C106%2C1009%2C601 > > > > > > On the Gentoo box, 'lsusb' displays it as: > > > Bus 002 Device 003: ID 067b:2303 > > > Prolific Technology, Inc. PL2303 Serial Port > > > > Your adapter should be recognised by the uplcom driver. put > > uplcom_load="YES" in loader.conf or load manually. Check dmesg for the > > device name. > > Also, I think cu is "good enough" ;) > > > > Ruben > > This is the error shown in 'dmesg' log > > ugen0.2: at usbus0 > uplcom0: 0/0, rev 1.10/3.00, addr 2> on usbus0 uplcom0: init failed! > device_attach: uplcom0 attach returned 6 > uplcom0: 0/0, rev 1.10/3.00, addr 2> on usbus0 uplcom0: init failed! > device_attach: uplcom0 attach returned 6 > > Scenarios: > > 1. kldstat -v | grep uplcom shows > 303 uhub/uplcom > > 2. uplcom_load="YES" in /boot/loader.conf > with a reboot > > In both the scenarios, 'dmesg' shows the same error. > > On re-attaching the device, the following error is shown. Hi, > > usb2_alloc_device:1574: set address 2 failed (USB_ERR_STALLED, ignored) > usb2_alloc_device:1612: getting device descriptor at addr 2 failed, > USB_ERR_STALLED! ugen0.2: <> at usbus0 (disconnected) > uhub_reattach_port:417: could not allocate new device! Looks like the firmware crashed if it does not re-enumrate. > > Any suggestions on how i can get uplcom drive to work ? > Try looking up the USB-ID line for your device and modify the uplcom flags (TYPE_XXX) for your device so that it does not require init for example. /* TrendNet TU-S9 */ {USB_UPL(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, 0x0400, 0xFFFF, TYPE_PL2303X)}, /* ST Lab USB-SERIAL-4 */ {USB_UPL(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, 0x0300, 0x03FF, TYPE_PL2303X)}, /* IOGEAR/ATEN UC-232A (also ST Lab USB-SERIAL-1) */ {USB_UPL(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, 0, 0x02FF, TYPE_PL2303)}, Use: usbconfig dump_device_desc To get the version number for your chip (See "0, 0x02FF" above) Make sure that the TYPE flag is correct. Also see: /sys/dev/usb/serial/uplcom.c Then: make -C /sys/modules/usb/uplcom clean all install kldunload uplcom kldload uplcom --HPS