From owner-freebsd-usb@FreeBSD.ORG Sat Apr 26 07:51:22 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC284106566C for ; Sat, 26 Apr 2008 07:51:22 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by mx1.freebsd.org (Postfix) with ESMTP id 9A1658FC0C for ; Sat, 26 Apr 2008 07:51:22 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so6044476waf.3 for ; Sat, 26 Apr 2008 00:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=vorLcAQ0TxU1/UlO2woNyTS8zLZt9Q1ozlzarcG+MhI=; b=v2BapE7MrR+Ol1+pN4Rw82P2avo9bqAkIaGa93Jv/dvp0f3A8U8ZB1ffdHKqD6Y6LTVkZE97XAnvlswexWsk5qx5WrUwzDU2YYX5ln3/nnH5ob5D8bF5XoLy3ECJR0ejflCgLEBY+si/9eRybeBYxithO57gsuRmPH4ttQvjw7w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=IsxpfyULg294pe7wH8i3n6IpMtCpLJtk1ESpjkp9J1sQhTTeZAMY84mCsfyepaKEflUPt0xy1AKlPCZwbR4pvs5pWz1g+PrKS1ebynckJLAZOq9xmUR1/+Ysl+Y7iYXvQbWIykKsTw3+jvTmESFAEIp6p9AGXijCJm3nyypVKMA= Received: by 10.114.126.1 with SMTP id y1mr4167971wac.108.1209196282303; Sat, 26 Apr 2008 00:51:22 -0700 (PDT) Received: by 10.114.39.14 with HTTP; Sat, 26 Apr 2008 00:51:22 -0700 (PDT) Message-ID: Date: Sat, 26 Apr 2008 15:51:22 +0800 From: "Xiaofan Chen" To: freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: USB CDC-ACM device under FreeBSD and HPS stack 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: Sat, 26 Apr 2008 07:51:22 -0000 Today is my FreeBSD USB day. :-) So I am attaching various USB device to FreeBSD and see if they work or not. I have two USB to serial converter (one based on FTDI and one based on Prolific). I have also two demo boards who poses as USB CDC-ACM device. One is the Olimex LPC-P2148 demo board with the lpcusb open source stack. The other is a Infineon U-Light stick based on Silicon Labs CP2101. Somehow they are all recognized as ugen device and not usb serial device. [mcuee@freebsd7 ~]$ lsusb Bus /dev/usb0 Device /dev/ugen3: ID ffff:0005 Bus /dev/usb1 Device /dev/ugen0: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus /dev/usb1 Device /dev/ugen1: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port Bus /dev/usb1 Device /dev/ugen2: ID 10c4:ea60 Cygnal Integrated Products, Inc. [mcuee@freebsd7 ~]$ sudo usbdevs addr 1: OHCI root HUB, nVidia addr 2: USBSerial, LPCUSB addr 1: OHCI root HUB, nVidia addr 2: usb serial converter, ftdi addr 3: USB-Serial Controller D, Prolific Technology Inc. addr 4: U-Light, Silicon Labs addr 1: EHCI root HUB, nVidia After loading ucom/uplcom/ufdti and unplug/plug the two real USB-Serial converter, they seems to work fine. [mcuee@freebsd7 ~]$ sudo kldload uftdi [mcuee@freebsd7 ~]$ sudo kldload uplcom [mcuee@freebsd7 ~]$ kldstat Id Refs Address Size Name 1 20 0xc0400000 9263b0 kernel 2 1 0xc0d27000 6f88 snd_ich.ko 3 2 0xc0d2e000 4a5ac sound.ko 4 1 0xc0d79000 6a32c acpi.ko 5 1 0xc4490000 22000 linux.ko 6 1 0xc4704000 21000 radeon.ko 7 1 0xc4725000 f000 drm.ko 8 3 0xc4e70000 4000 ucom.ko 9 1 0xc4f6b000 4000 uftdi.ko 10 1 0xc4f71000 4000 uplcom.ko [mcuee@freebsd7 ~]$ dmesg ... ugen0: at uhub1, port 1, addr 2 (disconnected) ugen0: detached ugen1: at uhub1, port 2, addr 3 (disconnected) ugen1: detached uplcom0: on usb1 uftdi0: on usb1 How do I automated this process? But loading ucycom failed. [mcuee@freebsd7 ~]$ ls -la /boot/kernel/uc* -r-xr-xr-x 1 root wheel 15649 Apr 26 10:58 /boot/kernel/ucom.ko -r-xr-xr-x 1 root wheel 50744 Apr 26 10:58 /boot/kernel/ucom.ko.symbols -r-xr-xr-x 1 root wheel 10646 Apr 26 10:58 /boot/kernel/ucycom.ko -r-xr-xr-x 1 root wheel 40343 Apr 26 10:58 /boot/kernel/ucycom.ko.symbols [mcuee@freebsd7 ~]$ sudo kldload ucycom kldload: can't load ucycom: No such file or directory As for the generic CDC-ACM device (the Olimex LPC-P2148), I do not know how to load the necessary kernel module to get it work as a usb-serial device. Under Linux, there is a generic cdc-acm device support. Any tips? Thanks in advance. Xiaofan