From owner-freebsd-usb@freebsd.org Sun Nov 8 09:40:50 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5206EA22027 for ; Sun, 8 Nov 2015 09:40:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B4DF1913 for ; Sun, 8 Nov 2015 09:40:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E3A361FE023; Sun, 8 Nov 2015 10:40:47 +0100 (CET) Subject: Re: PC Engines APU2B4 betatest: usb install fails To: Noth , freebsd-usb@freebsd.org References: <563E2039.9090004@citycable.ch> From: Hans Petter Selasky Message-ID: <563F1905.1050602@selasky.org> Date: Sun, 8 Nov 2015 10:42:29 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <563E2039.9090004@citycable.ch> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2015 09:40:50 -0000 On 11/07/15 17:00, Noth wrote: > Hi all, > > I've been directed here by the good folk of #freebsd on Freenode. I'm > betatesting the upcoming PC Engines APU2B4 ( > http://pcengines.ch/apu2b4.htm ) on various OSes. I tried the memstick > installers of both 10.2-RELEASE and the 2nd of November snapshot of > 11-CURRENT, and neither work, because the kernel can't mount the miniroot: > > Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]... > Root mount waiting for: usbus1 usbus0 > uhub0: 4 ports with 4 removable, self powered > uhub1: 2 ports with 2 removable, self powered > Root mount waiting for: usbus1 usbus0 > ugen1.2: at usbus1 > uhub2: > on usbus1 > uhub2: 4 ports with 4 removable, self powered > ugen0.2: at usbus0 > umass0: > on usbus0 > umass0: SCSI over Bulk-Only; quirks = 0x8100 > umass0:2:0: Attached to scbus2 > mountroot: waiting for device /dev/ufs/FreeBSD_Install... > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Retrying command > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Retrying command > Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19. > Hi, SCSI command #12 is: #define INQUIRY 0x12 That means you might need to set the UQ_MSC_NO_INQUIRY quirk for your device, before it works. In recent 11-current images, this can be done from the loader. See usb_quirk manual page in 11-current. --HPS From owner-freebsd-usb@freebsd.org Sun Nov 8 09:43:46 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 852DFA22099 for ; Sun, 8 Nov 2015 09:43:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 467011B13 for ; Sun, 8 Nov 2015 09:43:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 808CB1FE023; Sun, 8 Nov 2015 10:43:44 +0100 (CET) Subject: Re: [PATCH] dwc_otg: Reduce interrupt load To: Sebastian Huber , freebsd-usb@freebsd.org References: <1446212307-4660-1-git-send-email-sebastian.huber@embedded-brains.de> <56338480.3090607@selasky.org> <5637557A.1070007@embedded-brains.de> <56375A12.9060000@selasky.org> From: Hans Petter Selasky Message-ID: <563F19B6.1010506@selasky.org> Date: Sun, 8 Nov 2015 10:45:26 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <56375A12.9060000@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2015 09:43:46 -0000 On 11/02/15 13:41, Hans Petter Selasky wrote: > On 11/02/15 13:22, Sebastian Huber wrote: >> >> >> On 30/10/15 15:53, Hans Petter Selasky wrote: >>> On 10/30/15 14:38, Sebastian Huber wrote: >>>> Tested on an Altera Cyclone V development kit. Here the controller has >>>> 16 host channels. This change significantly reduced the time spent in >>>> the dwc_otg_interrupt_poll_locked() function. >>> >>> Hi, >>> >>> Thank you for your optimisation patch: >>> >>> https://svnweb.freebsd.org/changeset/base/290195 >> Hi Sebastian, You maybe also want to port these two patches, and measure the CPU load again: https://svnweb.freebsd.org/changeset/base/290489 https://svnweb.freebsd.org/changeset/base/290542 --HPS From owner-freebsd-usb@freebsd.org Sun Nov 8 16:14:44 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6771A29131 for ; Sun, 8 Nov 2015 16:14:44 +0000 (UTC) (envelope-from callum@aitchison.org) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40D291BBD for ; Sun, 8 Nov 2015 16:14:44 +0000 (UTC) (envelope-from callum@aitchison.org) Received: by wmnn186 with SMTP id n186so79606344wmn.1 for ; Sun, 08 Nov 2015 08:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aitchison_org.20150623.gappssmtp.com; s=20150623; h=from:content-type:subject:message-id:date:to:mime-version; bh=WLxuzZSD9OfSquv5wFKGV1qgfmkRXNlufdPRqjxILRw=; b=zLQm/gpkyVLhY3Y+JkR0qD71wiF9wxUei2aQFQBUT6WiueZIXzFexa884sDZLDbLl5 bCkGMphVzwK5QZBI57aaRQ9Zz506KJgWg3908LummjSpArEJuMiIPCxa/MUnNRd/zC9h 7KIMS+JC23APlaA7yDnf49nTYjmrRKsITRb/ViMstgReuU/TB/WoXjrwAjQpu5I+SKwz Th6+PDCN1jKuCRAqe4WNiblaURkTARO+GZdXeSHCqd+tmaG3Va1nqRXMTxQpRoSfxyLS qSXA/jlBYIL5q56LctsaznxWpPlRenJbncVD4qdgbA2bmGA9Rwg+IoU+YoEapKx5oiyz SpAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:subject:message-id:date:to :mime-version; bh=WLxuzZSD9OfSquv5wFKGV1qgfmkRXNlufdPRqjxILRw=; b=QnnCAiuhHf59mDe5PQ4/QsGih9LDs2HdVz37awsWi+25Ssl2UyP9DujnU4jbWWIyZ6 WyRsG7UB4YK/AuRPp1UB+Q0YlZuTEk2QEjPzOy8gowaUtrrR9Gz4uZEfhpTGsaq3nRd3 AxErgHIMFRRtPsB5t11pbI/h7Jy6Owl39MEh4Cq/rD9dt12UEw+RhnZ/mj+SF3QIOocw 0ZYEjJvWxcoJJBX++gEUteZNEC+jsf/Ob0WPv2uyKaVupeJu6JRR6k8VDGunFvVXCrlm N4KJnqMsqnYF+eI6DMNOiIK9rQeKtNRaNaX/NfF+ckvYs4UG4B5Ix7ElxvCO4ID3HNtW X/7Q== X-Gm-Message-State: ALoCoQkNEp1veROUfe4CSrWy1prug3TdYRZBAfAJ7XDDDoOcfFSMs75wTfBUmYdbOf8iYIWur+dP X-Received: by 10.28.135.206 with SMTP id j197mr22771432wmd.14.1446999282554; Sun, 08 Nov 2015 08:14:42 -0800 (PST) Received: from ?IPv6:2001:470:6d0e::2:a949? ([2001:470:6d0e::2:a949]) by smtp.gmail.com with ESMTPSA id e9sm10638862wjw.8.2015.11.08.08.14.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Nov 2015 08:14:41 -0800 (PST) From: Callum Aitchison Subject: usbfs (usbdevfs) in Linux Emulation Message-Id: <7558FEE0-F0EF-440B-98C2-9EE428C352E1@aitchison.org> Date: Sun, 8 Nov 2015 16:14:39 +0000 To: freebsd-usb@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) X-Mailer: Apple Mail (2.3096.5) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2015 16:14:44 -0000 Hi, I posted on the forum about this issue and was directed here as a better = place to ask. My question is about usbfs (AKA usbdevfs) emulation within Linux = compatibility - it doesn=E2=80=99t get created in the Linuxulator but = some binary Linux software (Altera Quartus) I=E2=80=99m using requires = it instead of libusb. The system is documented here: = https://www.kernel.org/doc/Documentation/usb/proc_usb_info.txt I have tried unmounting linprocfs and creating my own /compat/linux/proc = directory with bus/usb/devices copied from a Linux machine for the USB = device listed and then the device location in bus/usb/002/007 symlinked = to the FreeBSD USB device in /dev/ugen0.2. This, unsurprisingly, = didn=E2=80=99t work since the Linux nodes are obviously different from = the FreeBSD nodes. Worth a try. When I tried that dmesg printed the errors: linux: pid 4640 (jtagd): ioctl fd=3D6, cmd=3D0x550f ('U',15) is not = implemented linux: pid 4640 (jtagd): ioctl fd=3D6, cmd=3D0x5510 ('U',16) is not = implemented Looking these up in the Linux headers in linux/usbdevice_fs.h I found: #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) Obviously the software was trying to claim and then release the USB = interface but the ioctl must differ between FreeBSD and Linux so it = doesn=E2=80=99t work, makes sense. Unfortunately I don=E2=80=99t understand the FreeBSD or Linux USB = systems enough to work out a solution myself but I hope that there is = either a pre-existing solution or a solution that could be worked out. I thought perhaps a translation layer between the Linux /proc/bus/usb/ = and FreeBSD /dev/ugen* but have no idea where to start implementing that = myself. Hopefully it can be sorted, it=E2=80=99d be nice to have all the USB = stuff working in Linux emulation, especially to be able to do my FPGA = development entirely in FreeBSD. Thanks in advance. Callum= From owner-freebsd-usb@freebsd.org Sun Nov 8 20:38:42 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96C38A29470 for ; Sun, 8 Nov 2015 20:38:42 +0000 (UTC) (envelope-from nothingness@citycable.ch) Received: from emailfrontal1-new.citycable.ch (emailfrontal1-new.citycable.ch [85.218.0.103]) by mx1.freebsd.org (Postfix) with ESMTP id 1EE7013D1 for ; Sun, 8 Nov 2015 20:38:41 +0000 (UTC) (envelope-from nothingness@citycable.ch) Received: from localhost (localhost [127.0.0.1]) by emailfrontal1-new.citycable.ch (Postfix) with ESMTP id 3nv6jj12bnzNq6Q; Sun, 8 Nov 2015 21:38:33 +0100 (CET) X-Virus-Scanned: amavisd-new at localdomain Received: from emailfrontal1-new.citycable.ch ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10050) with LMTP id J2FdIggZNmm7; Sun, 8 Nov 2015 21:38:25 +0100 (CET) Received: from [192.168.50.9] (85-218-8-184.dclient.lsne.ch [85.218.8.184]) (Authenticated sender: nothingness@citycable.ch) by emailfrontal1-new.citycable.ch (Postfix) with ESMTPA id 3nv6jW5k2DzNq5p; Sun, 8 Nov 2015 21:38:23 +0100 (CET) Subject: Re: PC Engines APU2B4 betatest: usb install fails To: freebsd-usb@freebsd.org References: <563E2039.9090004@citycable.ch> <563F1905.1050602@selasky.org> From: Noth Message-ID: <563FB2BF.7050803@citycable.ch> Date: Sun, 8 Nov 2015 21:38:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563F1905.1050602@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2015 20:38:42 -0000 Hi again, I added the following to /boot/loader.conf on the 11-CURRENT usb memstick : usb_quirk_load="YES" boot_multicons="YES" boot_serial="YES" comconsole_speed="115200" console="comconsole,vidconsole" usbconfig -d ugen0.2 add_quirk NO_6_BYTE and that seems to let the kernel mount the miniroot: Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]... Root mount waiting for: usbus1 usbus0 uhub0: 4 ports with 4 removable, self powered uhub1: 2 ports with 2 removable, self powered Root mount waiting for: usbus1 usbus0 ugen1.2: at usbus1 uhub2: on usbus1 uhub2: 4 ports with 4 removable, self powered ugen0.2: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0xc100 umass0:2:0: Attached to scbus2 mountroot: waiting for device /dev/ufs/FreeBSD_Install... (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (probe0:umass-sim0:0:0:0): Retrying command da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SPC-4 SCSI device da0: 40.000MB/s transfers da0: 7384MB (15122432 512 byte sectors) da0: quirks=0x2 GEOM: da0: the secondary GPT header is not in the last LBA. No suitable dump device was found. Starting file system checks: /dev/ufs/FreeBSD_Install: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ufs/FreeBSD_Install: clean, 52158 free (174 frags, 6498 blocks, 0.0% fragmentation) Thanks for the suggestions! Cheers, Noth On 08/11/15 10:42, Hans Petter Selasky wrote: > On 11/07/15 17:00, Noth wrote: >> Hi all, >> >> I've been directed here by the good folk of #freebsd on Freenode. I'm >> betatesting the upcoming PC Engines APU2B4 ( >> http://pcengines.ch/apu2b4.htm ) on various OSes. I tried the memstick >> installers of both 10.2-RELEASE and the 2nd of November snapshot of >> 11-CURRENT, and neither work, because the kernel can't mount the >> miniroot: >> >> Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]... >> Root mount waiting for: usbus1 usbus0 >> uhub0: 4 ports with 4 removable, self powered >> uhub1: 2 ports with 2 removable, self powered >> Root mount waiting for: usbus1 usbus0 >> ugen1.2: at usbus1 >> uhub2: >> on usbus1 >> uhub2: 4 ports with 4 removable, self powered >> ugen0.2: at usbus0 >> umass0: >> on usbus0 >> umass0: SCSI over Bulk-Only; quirks = 0x8100 >> umass0:2:0: Attached to scbus2 >> mountroot: waiting for device /dev/ufs/FreeBSD_Install... >> (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 >> (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an >> error >> (probe0:umass-sim0:0:0:0): Retrying command >> (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 >> (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an >> error >> (probe0:umass-sim0:0:0:0): Retrying command >> Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19. >> > > Hi, > > SCSI command #12 is: > > #define INQUIRY 0x12 > > That means you might need to set the UQ_MSC_NO_INQUIRY quirk for your > device, before it works. In recent 11-current images, this can be done > from the loader. See usb_quirk manual page in 11-current. > > --HPS From owner-freebsd-usb@freebsd.org Mon Nov 9 08:29:32 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA984A2614E for ; Mon, 9 Nov 2015 08:29:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9248E1C6B for ; Mon, 9 Nov 2015 08:29:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EFFD21FE023; Mon, 9 Nov 2015 09:29:28 +0100 (CET) Subject: Re: usbfs (usbdevfs) in Linux Emulation To: Callum Aitchison , freebsd-usb@freebsd.org References: <7558FEE0-F0EF-440B-98C2-9EE428C352E1@aitchison.org> From: Hans Petter Selasky Message-ID: <564059D0.8000400@selasky.org> Date: Mon, 9 Nov 2015 09:31:12 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <7558FEE0-F0EF-440B-98C2-9EE428C352E1@aitchison.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2015 08:29:32 -0000 On 11/08/15 17:14, Callum Aitchison wrote: > Hi, > I posted on the forum about this issue and was directed here as a better place to ask. > > My question is about usbfs (AKA usbdevfs) emulation within Linux compatibility - it doesn’t get created in the Linuxulator but some binary Linux software (Altera Quartus) I’m using requires it instead of libusb. > > The system is documented here: https://www.kernel.org/doc/Documentation/usb/proc_usb_info.txt > > I have tried unmounting linprocfs and creating my own /compat/linux/proc directory with bus/usb/devices copied from a Linux machine for the USB device listed and then the device location in bus/usb/002/007 symlinked to the FreeBSD USB device in /dev/ugen0.2. This, unsurprisingly, didn’t work since the Linux nodes are obviously different from the FreeBSD nodes. Worth a try. > > When I tried that dmesg printed the errors: > linux: pid 4640 (jtagd): ioctl fd=6, cmd=0x550f ('U',15) is not implemented > linux: pid 4640 (jtagd): ioctl fd=6, cmd=0x5510 ('U',16) is not implemented > > Looking these up in the Linux headers in linux/usbdevice_fs.h I found: > #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) > #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) > > Obviously the software was trying to claim and then release the USB interface but the ioctl must differ between FreeBSD and Linux so it doesn’t work, makes sense. > > Unfortunately I don’t understand the FreeBSD or Linux USB systems enough to work out a solution myself but I hope that there is either a pre-existing solution or a solution that could be worked out. > I thought perhaps a translation layer between the Linux /proc/bus/usb/ and FreeBSD /dev/ugen* but have no idea where to start implementing that myself. > > Hopefully it can be sorted, it’d be nice to have all the USB stuff working in Linux emulation, especially to be able to do my FPGA development entirely in FreeBSD. > Hi, The FreeBSD's /dev/ugenX.Y don't support Linux's USBFS. It might be you can build Linux's USBFS support into /usr/ports/multimedia/webcamd, which already emulate the Linux USB stack in user-space. Latest version of webcamd from SVN: http://www.selasky.org/hans_petter/video4bsd --HPS From owner-freebsd-usb@freebsd.org Mon Nov 9 08:30:23 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9DE8A26181 for ; Mon, 9 Nov 2015 08:30:23 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E6CE1CB5 for ; Mon, 9 Nov 2015 08:30:23 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5A19C1FE023; Mon, 9 Nov 2015 09:30:21 +0100 (CET) Subject: Re: PC Engines APU2B4 betatest: usb install fails To: Noth , freebsd-usb@freebsd.org References: <563E2039.9090004@citycable.ch> <563F1905.1050602@selasky.org> <563FB2BF.7050803@citycable.ch> From: Hans Petter Selasky Message-ID: <56405A05.9050201@selasky.org> Date: Mon, 9 Nov 2015 09:32:05 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <563FB2BF.7050803@citycable.ch> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2015 08:30:23 -0000 On 11/08/15 21:38, Noth wrote: > Hi again, > > I added the following to /boot/loader.conf on the 11-CURRENT usb > memstick : > > usb_quirk_load="YES" > boot_multicons="YES" > boot_serial="YES" > comconsole_speed="115200" > console="comconsole,vidconsole" > usbconfig -d ugen0.2 add_quirk NO_6_BYTE > > and that seems to let the kernel mount the miniroot: > If you make a patch for sys/dev/usb/quirk/usb_quirk.c I can submit it. --HPS From owner-freebsd-usb@freebsd.org Tue Nov 10 01:32:10 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A99F4A2BB95 for ; Tue, 10 Nov 2015 01:32:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96CCB1796 for ; Tue, 10 Nov 2015 01:32:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tAA1WAIB095436 for ; Tue, 10 Nov 2015 01:32:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 204378] xhci fails on Cavium ThunderX Date: Tue, 10 Nov 2015 01:32:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 01:32:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204378 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Component|kern |usb Assignee|freebsd-bugs@FreeBSD.org |freebsd-usb@FreeBSD.org -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Tue Nov 10 07:25:03 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B65EA2B81B for ; Tue, 10 Nov 2015 07:25:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED0891D82 for ; Tue, 10 Nov 2015 07:25:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tAA7P267096793 for ; Tue, 10 Nov 2015 07:25:02 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 204420] Update wsp driver for Force Touch Date: Tue, 10 Nov 2015 07:25:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: huanghwh@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 07:25:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204420 Bug ID: 204420 Summary: Update wsp driver for Force Touch Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: freebsd-usb@FreeBSD.org Reporter: huanghwh@gmail.com Created attachment 162948 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=162948&action=edit wsp patch In new MacBookPro11,4 and MacBook12,1, force touch pad is used. The patch works on these touch pad. Only test on MacBookPro11,4 and MacBookPro11,3. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Tue Nov 10 07:25:35 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51F4AA2B845 for ; Tue, 10 Nov 2015 07:25:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F44F1DCA for ; Tue, 10 Nov 2015 07:25:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tAA7PZVV097649 for ; Tue, 10 Nov 2015 07:25:35 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 204420] Update wsp driver for Force Touch Date: Tue, 10 Nov 2015 07:25:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: huanghwh@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 07:25:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204420 --- Comment #1 from huanghwh@gmail.com --- Created attachment 162949 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=162949&action=edit usbdevs patch -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Tue Nov 10 07:38:17 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA3BA2BD98 for ; Tue, 10 Nov 2015 07:38:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D542618D7 for ; Tue, 10 Nov 2015 07:38:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tAA7cHJd020394 for ; Tue, 10 Nov 2015 07:38:17 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 204420] Update wsp driver for Force Touch Date: Tue, 10 Nov 2015 07:38:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hselasky@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 07:38:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204420 Hans Petter Selasky changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |In Progress CC| |hselasky@FreeBSD.org --- Comment #2 from Hans Petter Selasky --- You removed an exclamation mark below. Was that intentional? @@ -791,7 +959,7 @@ */ switch (sc->ntaps) { case 1: - if (!(params->caps & HAS_INTEGRATED_BUTTON)) { + if ((params->caps & HAS_INTEGRATED_BUTTON)) { wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n"); } -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Tue Nov 10 07:38:23 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9065BA2BDA9 for ; Tue, 10 Nov 2015 07:38:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D1511904 for ; Tue, 10 Nov 2015 07:38:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tAA7cNr3020539 for ; Tue, 10 Nov 2015 07:38:23 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 204420] Update wsp driver for Force Touch Date: Tue, 10 Nov 2015 07:38:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hselasky@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: hselasky@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 07:38:23 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204420 Hans Petter Selasky changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-usb@FreeBSD.org |hselasky@FreeBSD.org -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Tue Nov 10 10:17:38 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BDEBA2B1AC for ; Tue, 10 Nov 2015 10:17:38 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from mail.embedded-brains.de (host-82-135-62-35.customer.m-online.net [82.135.62.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2A1B14B2 for ; Tue, 10 Nov 2015 10:17:37 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id A35E52A181A; Tue, 10 Nov 2015 11:09:47 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YgfISPXQ4mQC; Tue, 10 Nov 2015 11:09:47 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 2726F2A1930; Tue, 10 Nov 2015 11:09:47 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EbnH3QBxlbfj; Tue, 10 Nov 2015 11:09:47 +0100 (CET) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 06D932A181A; Tue, 10 Nov 2015 11:09:47 +0100 (CET) Subject: Re: [PATCH] dwc_otg: Reduce interrupt load To: Hans Petter Selasky , freebsd-usb@freebsd.org References: <1446212307-4660-1-git-send-email-sebastian.huber@embedded-brains.de> <56338480.3090607@selasky.org> <5637557A.1070007@embedded-brains.de> <56375A12.9060000@selasky.org> <563F19B6.1010506@selasky.org> From: Sebastian Huber Message-ID: <5641C235.1040007@embedded-brains.de> Date: Tue, 10 Nov 2015 11:08:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563F19B6.1010506@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 10:17:38 -0000 Hello, On 08/11/15 10:45, Hans Petter Selasky wrote: > On 11/02/15 13:41, Hans Petter Selasky wrote: >> On 11/02/15 13:22, Sebastian Huber wrote: >>> >>> >>> On 30/10/15 15:53, Hans Petter Selasky wrote: >>>> On 10/30/15 14:38, Sebastian Huber wrote: >>>>> Tested on an Altera Cyclone V development kit. Here the=20 >>>>> controller has >>>>> 16 host channels. This change significantly reduced the time=20 >>>>> spent in >>>>> the dwc_otg_interrupt_poll_locked() function. >>>> >>>> Hi, >>>> >>>> Thank you for your optimisation patch: >>>> >>>> https://svnweb.freebsd.org/changeset/base/290195 >>> > > Hi Sebastian, > > You maybe also want to port these two patches, and measure the CPU=20 > load again: > > https://svnweb.freebsd.org/changeset/base/290489 > https://svnweb.freebsd.org/changeset/base/290542 I didn't notice a big overall difference. Highest CPU load is now due to=20 dwc_otg_read_fifo() instead of dwc_otg_interrupt_poll_locked(). --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=E4ftliche Mitteilung im Sinne des EHUG. From owner-freebsd-usb@freebsd.org Tue Nov 10 16:28:58 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36755A2B1F0 for ; Tue, 10 Nov 2015 16:28:58 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com [IPv6:2607:f8b0:4003:c01::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 006011101 for ; Tue, 10 Nov 2015 16:28:58 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: by obdgf3 with SMTP id gf3so1395530obd.3 for ; Tue, 10 Nov 2015 08:28:57 -0800 (PST) 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=MzA2QfN1iEFrGPc5Hno1p3942fbwP7aN8DOdqJzT8Rc=; b=AyBYHyIlz9KRnXAOOd1eQD5yUaTINhEXWcoDH8cwO4oq11D0uR4gFeTp7dwuYl59hY mr554+JkkUT5higLfvo62d+gRAc6xci8eFn5A3e6NpVtmMFIw/gfDjthq3uP2poeGuAd PmqUK4bvJr8asHmeRBjlm3QhimgbevZ/LiCS29z0aHiwEjeYeZdGR8dESGVEwv00J1Gy GsBh8UwMPBIvEzauZdZffIoe1JTLqjqOanZ5NT0Qz+eDmWHDghp++QxImnbRfbpCrjTT NqdHr4zq1D+ZLdRy1rdYa7FsT0+34AvK3NdOjdSx4onAkDpAE4b+x0E6xi272H2CdKzI D6Dw== MIME-Version: 1.0 X-Received: by 10.182.88.165 with SMTP id bh5mr2155260obb.21.1447172937373; Tue, 10 Nov 2015 08:28:57 -0800 (PST) Received: by 10.76.44.145 with HTTP; Tue, 10 Nov 2015 08:28:57 -0800 (PST) Date: Tue, 10 Nov 2015 11:28:57 -0500 Message-ID: Subject: How to access a FTDI usb device with a custom vendor and product id's From: Burton Sampley To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 16:28:58 -0000 Greetings, I am a long time FreeBSD user (started with FreeBSD 2.1.5R). I took a break with FreeBSD for a while with a Linux desktop, but have recently returned. I am now running a 10.2R desktop. I am having problems getting a a FTDI based USB to serial cable to provide CAT control to my Yaesu FT-897d amateur radio. The cable is made by RT-Systems with vendor ID 0x2100 and a product ID 0x9e56. In Linux, using a udev rule, the cable works correctly with a command like the following: modprobe ftdi_sio vendor=0x2100 product=0x9e56 or a udev rule similar to the following: SYSFS{idVendor}=="2100", SYSFS{idProduct}=="9e56", RUN+="/sbin/modprobe -q ftdi_sio vendor=0x2100 product=0x9e56" How do I accomplish the same in FreeBSD? When the cable is plugged in, I get the following in /var/log/messages: Nov 10 08:17:58 kernel: ugen2.3: at usbus2 (disconnected) Nov 10 08:18:06 kernel: ugen2.3: at usbus2 Nov 10 08:18:06 devd: Executing 'logger Unknown USB device: vendor 0x2100 product 0x9e56 bus uhub4' Nov 10 08:18:06 root: Unknown USB device: vendor 0x2100 product 0x9e56 bus uhub4 Nov 10 08:47:31 devd: Executing 'logger Unknown USB device: vendor 0x2100 product 0x9e56 bus uhub4' Nov 10 08:47:31 root: Unknown USB device: vendor 0x2100 product 0x9e56 bus uhub4 and usbconfig shows the following: $ /usr/local/bin/sudo /usr/sbin/usbconfig -d ugen2.3 dump_device_desc ugen2.3: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x2100 idProduct = 0x9e56 bcdDevice = 0x0600 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 $ I have installed devel/libftdi from the ports collection, but I have not found documentation on how to configure my system to be able to use this device. Once this issue is resolved, I want to use hamlib or FLRIG and FLDIGI for amateur radio digital communications. I have been searching for days to find documentation on what I need to do to make this work and have struck out. Regards, -Burton -- Your mind is like a parachute, it works much better when it is open. From owner-freebsd-usb@freebsd.org Tue Nov 10 16:38:47 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA562A2B62E for ; Tue, 10 Nov 2015 16:38:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 911421AA6 for ; Tue, 10 Nov 2015 16:38:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id BEA051FE022; Tue, 10 Nov 2015 17:38:45 +0100 (CET) Subject: Re: How to access a FTDI usb device with a custom vendor and product id's To: Burton Sampley , freebsd-usb@freebsd.org References: From: Hans Petter Selasky Message-ID: <56421DFD.6070503@selasky.org> Date: Tue, 10 Nov 2015 17:40:29 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 16:38:47 -0000 On 11/10/15 17:28, Burton Sampley wrote: > SYSFS{idVendor}=="2100", SYSFS{idProduct}=="9e56", RUN+="/sbin/modprobe -q > ftdi_sio vendor=0x2100 product=0x9e56" > > How do I accomplish the same in FreeBSD? When the cable is plugged in, I > get the following in /var/log/messages: Hi, See examples here: https://svnweb.freebsd.org/ports/head/multimedia/webcamd/files/webcamd.conf.in?view=markup --HPS From owner-freebsd-usb@freebsd.org Tue Nov 10 16:50:14 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71EB1A2B8FD for ; Tue, 10 Nov 2015 16:50:14 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5315F1F0B for ; Tue, 10 Nov 2015 16:50:14 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Tue, 10 Nov 2015 16:50:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tAAGoBK6003727; Tue, 10 Nov 2015 09:50:11 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1447174212.91061.9.camel@freebsd.org> Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Ian Lepore To: Hans Petter Selasky , Burton Sampley , freebsd-usb@freebsd.org Date: Tue, 10 Nov 2015 09:50:12 -0700 In-Reply-To: <56421DFD.6070503@selasky.org> References: <56421DFD.6070503@selasky.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 16:50:14 -0000 On Tue, 2015-11-10 at 17:40 +0100, Hans Petter Selasky wrote: > On 11/10/15 17:28, Burton Sampley wrote: > > SYSFS{idVendor}=="2100", SYSFS{idProduct}=="9e56", > > RUN+="/sbin/modprobe -q > > ftdi_sio vendor=0x2100 product=0x9e56" > > > > How do I accomplish the same in FreeBSD? When the cable is plugged > > in, I > > get the following in /var/log/messages: > > Hi, > > See examples here: > > https://svnweb.freebsd.org/ports/head/multimedia/webcamd/files/webcam > d.conf.in?view=markup > > --HPS But the info in those examples won't cause the uftdi driver to attach to the device (as shown in the linux-based example), that can only happen if the vid/pid are added to the table in the driver itself, right? I don't remember any mechanism in our usb world for forcing a driver to attach to a device that isn't compiled into the driver's usb_device_id array. On the other hand, if the device is going to be accessed via libusb and/or libftdi, I'm not sure the tty driver needs to attach to it at all; don't those libraries work purely through the ugen device? -- Ian From owner-freebsd-usb@freebsd.org Tue Nov 10 16:53:22 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CD2BA2BACE for ; Tue, 10 Nov 2015 16:53:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33C2011FC; Tue, 10 Nov 2015 16:53:21 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E00BB1FE022; Tue, 10 Nov 2015 17:53:19 +0100 (CET) Subject: Re: How to access a FTDI usb device with a custom vendor and product id's To: Ian Lepore , Burton Sampley , freebsd-usb@freebsd.org References: <56421DFD.6070503@selasky.org> <1447174212.91061.9.camel@freebsd.org> From: Hans Petter Selasky Message-ID: <56422167.6050803@selasky.org> Date: Tue, 10 Nov 2015 17:55:03 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1447174212.91061.9.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 16:53:22 -0000 On 11/10/15 17:50, Ian Lepore wrote: > On Tue, 2015-11-10 at 17:40 +0100, Hans Petter Selasky wrote: >> On 11/10/15 17:28, Burton Sampley wrote: >>> SYSFS{idVendor}=="2100", SYSFS{idProduct}=="9e56", >>> RUN+="/sbin/modprobe -q >>> ftdi_sio vendor=0x2100 product=0x9e56" >>> >>> How do I accomplish the same in FreeBSD? When the cable is plugged >>> in, I >>> get the following in /var/log/messages: >> >> Hi, >> >> See examples here: >> >> https://svnweb.freebsd.org/ports/head/multimedia/webcamd/files/webcam >> d.conf.in?view=markup >> >> --HPS > > But the info in those examples won't cause the uftdi driver to attach > to the device (as shown in the linux-based example), that can only > happen if the vid/pid are added to the table in the driver itself, > right? I don't remember any mechanism in our usb world for forcing a > driver to attach to a device that isn't compiled into the driver's > usb_device_id array. > > On the other hand, if the device is going to be accessed via libusb > and/or libftdi, I'm not sure the tty driver needs to attach to it at > all; don't those libraries work purely through the ugen device? > Right. This might be a feature for: https://reviews.freebsd.org/D3458 --HPS From owner-freebsd-usb@freebsd.org Tue Nov 10 16:55:43 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12493A2BB5F for ; Tue, 10 Nov 2015 16:55:43 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE4CA127A for ; Tue, 10 Nov 2015 16:55:42 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: by obdgf3 with SMTP id gf3so2028142obd.3 for ; Tue, 10 Nov 2015 08:55:42 -0800 (PST) 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 :cc:content-type; bh=7PJ8oovJm+yXXgThawW28hjADjg+I7GpQkPQDSs6eqg=; b=X/iU2G11QTjP8/TlzglLtWGehuxxR1DIaR1bzSWNq/fvPrcVfTKaTstNiEevi3sns9 tWzwRRhvgZRSDlab1utRX+hTLXfv+N3KVcpBHaZu8q5CRJ9TVxcoa2zp35/70H5BZtpm LwPHm7CQrVYhv+4vWvVbry3pn0v613P20wPfR6JtIJ80c87JwpnABGssPtyJcKNXQrsE QIyQnH2Fg22XAJC7CH8y7GTC2PqW4Zi3c7RiqRD4tVpJNmXOVYfC0Pva29K1IYnM8qRy KVWoUkw7q1Yd7bEOeudLZTVoSzEafyAHf2p0V04Zahv+D1WgPqku00X/4tv3pua8Nxs2 SiCw== MIME-Version: 1.0 X-Received: by 10.182.20.203 with SMTP id p11mr288820obe.32.1447174542166; Tue, 10 Nov 2015 08:55:42 -0800 (PST) Received: by 10.76.44.145 with HTTP; Tue, 10 Nov 2015 08:55:42 -0800 (PST) In-Reply-To: <56421DFD.6070503@selasky.org> References: <56421DFD.6070503@selasky.org> Date: Tue, 10 Nov 2015 11:55:42 -0500 Message-ID: Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Burton Sampley To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 16:55:43 -0000 HPS, Thank you for your prompt response. I reviewed the webpage link you have provided. I assume that would be a template for an entry in /etc/devd.conf, however what I do not understand is what is the FreeBSD equivalent of "FTDI_SIO" that can be called in the "action" line? The first step I would like to accomplish is to simple make the device work at the command line, then I can automate the steps within /etc/devd.conf. Right now, I am struggling to find documentation that is fit-for-purpose for USB. I would like to figure out if libftdi is the proper solution or if I must use uftdi. If I need to use uftdi, then specifically how do I force uftdi to attach to a custom vid/pid? Regards, -Burton On Tue, Nov 10, 2015 at 11:40 AM, Hans Petter Selasky wrote: > On 11/10/15 17:28, Burton Sampley wrote: > >> SYSFS{idVendor}=="2100", SYSFS{idProduct}=="9e56", RUN+="/sbin/modprobe -q >> ftdi_sio vendor=0x2100 product=0x9e56" >> >> How do I accomplish the same in FreeBSD? When the cable is plugged in, I >> get the following in /var/log/messages: >> > > Hi, > > See examples here: > > > https://svnweb.freebsd.org/ports/head/multimedia/webcamd/files/webcamd.conf.in?view=markup > > --HPS > -- Your mind is like a parachute, it works much better when it is open. From owner-freebsd-usb@freebsd.org Tue Nov 10 16:59:31 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C51DCA2BBE8 for ; Tue, 10 Nov 2015 16:59:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86E2512F5 for ; Tue, 10 Nov 2015 16:59:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 800391FE022; Tue, 10 Nov 2015 17:59:29 +0100 (CET) Subject: Re: How to access a FTDI usb device with a custom vendor and product id's To: Burton Sampley References: <56421DFD.6070503@selasky.org> Cc: freebsd-usb@freebsd.org From: Hans Petter Selasky Message-ID: <564222D8.6020900@selasky.org> Date: Tue, 10 Nov 2015 18:01:12 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 16:59:31 -0000 On 11/10/15 17:55, Burton Sampley wrote: > HPS, > > Thank you for your prompt response. I reviewed the webpage link you have > provided. I assume that would be a template for an entry in > /etc/devd.conf, however what I do not understand is what is the FreeBSD > equivalent of "FTDI_SIO" that can be called in the "action" line? Hi, FreeBSD doesn't support that you add a VID and PID to a driver runtime. > > The first step I would like to accomplish is to simple make the device work > at the command line, then I can automate the steps within /etc/devd.conf. > Right now, I am struggling to find documentation that is fit-for-purpose > for USB. I would like to figure out if libftdi is the proper solution or > if I must use uftdi. If I need to use uftdi, then specifically how do I > force uftdi to attach to a custom vid/pid? You will need to add a vendor/product entry in this table: https://svnweb.freebsd.org/base/head/sys/dev/usb/serial/uftdi.c?revision=286385&view=markup#l273 --HPS From owner-freebsd-usb@freebsd.org Tue Nov 10 17:14:28 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5B32A2C20F for ; Tue, 10 Nov 2015 17:14:28 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: from mail-ob0-x231.google.com (mail-ob0-x231.google.com [IPv6:2607:f8b0:4003:c01::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B9861E88 for ; Tue, 10 Nov 2015 17:14:28 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: by obbww6 with SMTP id ww6so2618274obb.0 for ; Tue, 10 Nov 2015 09:14:28 -0800 (PST) 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 :cc:content-type; bh=tAoY/ZevX9lIxaLFgtMeU/bO6GIQkBbn/mM9tnNJNHY=; b=zwwhFCYulI8bygD7jkV1imfC3Fz9IYSdddkJBuxQoD8HY2ZRwYPBYyokXSbTTPo7Ve airisd7wpun6Se/JfZufsv9AopIQ5CAQVWgqB6/KsnvKH84830uTRqMjrJW+bdHZBb32 5TLz/G+CbNWIGU5q5lkjJvq/MYpGPHaVpM0MwE5xmOaGQ4nUnZoTRZPf6W32IWHgzLAk O0aSbcxa1NxXIyhsDlSpMGMUPkMoGygJyAV4I9fqsd1/pQbJ2SRGxGieG1AV+u5kAul+ lHc2YMr9IkHBU7Cnym6hhgiZFdAje07hyxwakHFqGx5DIrBpCIqj4Pwf8kEQ3+ojBP1A hM+A== MIME-Version: 1.0 X-Received: by 10.182.88.165 with SMTP id bh5mr2299665obb.21.1447175667978; Tue, 10 Nov 2015 09:14:27 -0800 (PST) Received: by 10.76.44.145 with HTTP; Tue, 10 Nov 2015 09:14:27 -0800 (PST) In-Reply-To: <564222D8.6020900@selasky.org> References: <56421DFD.6070503@selasky.org> <564222D8.6020900@selasky.org> Date: Tue, 10 Nov 2015 12:14:27 -0500 Message-ID: Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Burton Sampley To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 17:14:28 -0000 Thank you. I do not have the kernel source on this system, so I will need to setup the kernel source, then modify the table in uftdi.c with the custom entries, then recompile the module and reload it. It may take some time for me to complete these actions. Should I report back to this email list if this solution resolves my problem? Regards, -Burton On Tue, Nov 10, 2015 at 12:01 PM, Hans Petter Selasky wrote: > On 11/10/15 17:55, Burton Sampley wrote: > >> HPS, >> >> Thank you for your prompt response. I reviewed the webpage link you have >> provided. I assume that would be a template for an entry in >> /etc/devd.conf, however what I do not understand is what is the FreeBSD >> equivalent of "FTDI_SIO" that can be called in the "action" line? >> > > Hi, > > FreeBSD doesn't support that you add a VID and PID to a driver runtime. > > >> The first step I would like to accomplish is to simple make the device >> work >> at the command line, then I can automate the steps within /etc/devd.conf. >> Right now, I am struggling to find documentation that is fit-for-purpose >> for USB. I would like to figure out if libftdi is the proper solution or >> if I must use uftdi. If I need to use uftdi, then specifically how do I >> force uftdi to attach to a custom vid/pid? >> > > You will need to add a vendor/product entry in this table: > > > https://svnweb.freebsd.org/base/head/sys/dev/usb/serial/uftdi.c?revision=286385&view=markup#l273 > > --HPS > -- Your mind is like a parachute, it works much better when it is open. From owner-freebsd-usb@freebsd.org Tue Nov 10 17:18:55 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2054DA2C2C1 for ; Tue, 10 Nov 2015 17:18:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D568A10A6 for ; Tue, 10 Nov 2015 17:18:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E56A61FE022; Tue, 10 Nov 2015 18:18:52 +0100 (CET) Subject: Re: How to access a FTDI usb device with a custom vendor and product id's To: Burton Sampley References: <56421DFD.6070503@selasky.org> <564222D8.6020900@selasky.org> Cc: freebsd-usb@freebsd.org From: Hans Petter Selasky Message-ID: <56422764.4040307@selasky.org> Date: Tue, 10 Nov 2015 18:20:36 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 17:18:55 -0000 On 11/10/15 18:14, Burton Sampley wrote: > Thank you. I do not have the kernel source on this system, so I will need > to setup the kernel source, then modify the table in uftdi.c with the > custom entries, then recompile the module and reload it. It may take some > time for me to complete these actions. Should I report back to this email > list if this solution resolves my problem? Hi, Please keep us updated. Nice to hear some success stories too ;-) And also there is #bsdusb on EF-net. --HPS From owner-freebsd-usb@freebsd.org Wed Nov 11 03:37:10 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17106A29274 for ; Wed, 11 Nov 2015 03:37:10 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0361F1BA0 for ; Wed, 11 Nov 2015 03:37:10 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 0144BA29272; Wed, 11 Nov 2015 03:37:10 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F4123A29271 for ; Wed, 11 Nov 2015 03:37:09 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id DEF801B9F for ; Wed, 11 Nov 2015 03:37:09 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from AlfredMacbookAir.local (unknown [IPv6:2601:645:8004:7515:1458:653b:6e46:e18e]) by elvis.mu.org (Postfix) with ESMTPSA id 76520345A916 for ; Tue, 10 Nov 2015 19:37:08 -0800 (PST) To: usb@freebsd.org From: Alfred Perlstein Subject: usb modem "Can't setup transfer" Organization: FreeBSD Message-ID: <5642B7E4.505@freebsd.org> Date: Tue, 10 Nov 2015 19:37:08 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 03:37:10 -0000 Hello, A friend gave me a usb modem recently. The model is: Multi-Tech Systems - Multi-Modem USB - MT5634ZBA The Linux driver info is here: ftp://ftp.multitech.com/usb/usb-linux2.txt When I plug this device into FreeBSD I get a ugen0 device. So I tried hacking into the driver itself: diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c index c1e8812..9886294 100644 --- a/sys/dev/usb/serial/umodem.c +++ b/sys/dev/usb/serial/umodem.c @@ -136,6 +136,7 @@ static const STRUCT_USB_HOST_ID umodem_host_devs[] = { {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)}, {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)}, {USB_VPI(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_PC5740, 1)}, + {USB_VP(0x06e0, 0xf107)}, }; /* Now I get the following: Nov 10 19:19:54 spigot kernel: ugen3.3: at usbus3 Nov 10 19:19:54 spigot kernel: umodem0: on usbus3 Nov 10 19:19:54 spigot kernel: umodem0: data interface 1, has CM over data, has no break Nov 10 19:19:54 spigot kernel: umodem0: Can't setup transfer Nov 10 19:19:54 spigot kernel: device_attach: umodem0 attach returned 6 I read the Linux driver and it seems pretty similar, although it does look like they have a ton more quirks and edge cases the handle. The file in Linux I'm looking at is: linux/drivers/usb/class/cdc-acm.c (this seems to make the most sense given the instructions given at ftp://ftp.multitech.com/usb/usb-linux2.txt). I tried turning on sysctl hw.usb.debug=10 however after doing so it didn't seem to want to probe anymore. Any ideas? I can ship this modem to someone if they are interested and have a good idea how to fix. thank you, -Alfred From owner-freebsd-usb@freebsd.org Wed Nov 11 08:35:11 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE068A1FD59 for ; Wed, 11 Nov 2015 08:35:11 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D88F2137D for ; Wed, 11 Nov 2015 08:35:11 +0000 (UTC) (envelope-from hps@selasky.org) Received: by mailman.ysv.freebsd.org (Postfix) id D5CD2A1FD52; Wed, 11 Nov 2015 08:35:11 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D566FA1FD4D for ; Wed, 11 Nov 2015 08:35:11 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44297137C; Wed, 11 Nov 2015 08:35:11 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A50381FE022; Wed, 11 Nov 2015 09:35:09 +0100 (CET) Subject: Re: usb modem "Can't setup transfer" To: Alfred Perlstein , usb@freebsd.org References: <5642B7E4.505@freebsd.org> From: Hans Petter Selasky Message-ID: <5642FE24.4050408@selasky.org> Date: Wed, 11 Nov 2015 09:36:52 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5642B7E4.505@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 08:35:12 -0000 On 11/11/15 04:37, Alfred Perlstein wrote: > Hello, > > A friend gave me a usb modem recently. The model is: > Multi-Tech Systems - Multi-Modem USB - MT5634ZBA > > The Linux driver info is here: > ftp://ftp.multitech.com/usb/usb-linux2.txt > > When I plug this device into FreeBSD I get a ugen0 device. > > So I tried hacking into the driver itself: > > diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c > index c1e8812..9886294 100644 > --- a/sys/dev/usb/serial/umodem.c > +++ b/sys/dev/usb/serial/umodem.c > @@ -136,6 +136,7 @@ static const STRUCT_USB_HOST_ID umodem_host_devs[] = { > {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)}, > {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)}, > {USB_VPI(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_PC5740, 1)}, > + {USB_VP(0x06e0, 0xf107)}, > }; > > /* > > > Now I get the following: > > Nov 10 19:19:54 spigot kernel: ugen3.3: at > usbus3 > Nov 10 19:19:54 spigot kernel: umodem0: on > usbus3 > Nov 10 19:19:54 spigot kernel: umodem0: data interface 1, has CM over > data, has no break > Nov 10 19:19:54 spigot kernel: umodem0: Can't setup transfer > Nov 10 19:19:54 spigot kernel: device_attach: umodem0 attach returned 6 > > I read the Linux driver and it seems pretty similar, although it does > look like they have a ton more quirks and edge cases the handle. The > file in Linux I'm looking at is: linux/drivers/usb/class/cdc-acm.c (this > seems to make the most sense given the instructions given at > ftp://ftp.multitech.com/usb/usb-linux2.txt). > > I tried turning on sysctl hw.usb.debug=10 however after doing so it > didn't seem to want to probe anymore. > > Any ideas? > > I can ship this modem to someone if they are interested and have a good > idea how to fix. Hi, Can you send the configuration descriptor dump: usbconfig -d X.Y dump_device_desc dump_curr_config_desc Maybe the modem fits into the U3G driver. --HPS From owner-freebsd-usb@freebsd.org Wed Nov 11 19:51:41 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE9A5A2BA21 for ; Wed, 11 Nov 2015 19:51:41 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C93DC1568 for ; Wed, 11 Nov 2015 19:51:41 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id C6FFAA2BA1F; Wed, 11 Nov 2015 19:51:41 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C59EFA2BA1E for ; Wed, 11 Nov 2015 19:51:41 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id AF5891567 for ; Wed, 11 Nov 2015 19:51:41 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from Alfreds-MacBook-Pro-2.local (unknown [IPv6:2601:645:8004:7515:9522:db07:c2:1b88]) by elvis.mu.org (Postfix) with ESMTPSA id B103A345A92E; Wed, 11 Nov 2015 11:51:40 -0800 (PST) Subject: Re: usb modem "Can't setup transfer" To: Hans Petter Selasky , usb@freebsd.org References: <5642B7E4.505@freebsd.org> <5642FE24.4050408@selasky.org> From: Alfred Perlstein Organization: FreeBSD Message-ID: <56439C4B.6060407@freebsd.org> Date: Wed, 11 Nov 2015 11:51:39 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5642FE24.4050408@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 19:51:42 -0000 On 11/11/15 12:36 AM, Hans Petter Selasky wrote: > On 11/11/15 04:37, Alfred Perlstein wrote: >> Hello, >> >> A friend gave me a usb modem recently. The model is: >> Multi-Tech Systems - Multi-Modem USB - MT5634ZBA >> >> The Linux driver info is here: >> ftp://ftp.multitech.com/usb/usb-linux2.txt >> >> When I plug this device into FreeBSD I get a ugen0 device. >> >> So I tried hacking into the driver itself: >> >> diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c >> index c1e8812..9886294 100644 >> --- a/sys/dev/usb/serial/umodem.c >> +++ b/sys/dev/usb/serial/umodem.c >> @@ -136,6 +136,7 @@ static const STRUCT_USB_HOST_ID >> umodem_host_devs[] = { >> {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)}, >> {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)}, >> {USB_VPI(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_PC5740, 1)}, >> + {USB_VP(0x06e0, 0xf107)}, >> }; >> >> /* >> >> >> Now I get the following: >> >> Nov 10 19:19:54 spigot kernel: ugen3.3: at >> usbus3 >> Nov 10 19:19:54 spigot kernel: umodem0: on >> usbus3 >> Nov 10 19:19:54 spigot kernel: umodem0: data interface 1, has CM over >> data, has no break >> Nov 10 19:19:54 spigot kernel: umodem0: Can't setup transfer >> Nov 10 19:19:54 spigot kernel: device_attach: umodem0 attach returned 6 >> >> I read the Linux driver and it seems pretty similar, although it does >> look like they have a ton more quirks and edge cases the handle. The >> file in Linux I'm looking at is: linux/drivers/usb/class/cdc-acm.c (this >> seems to make the most sense given the instructions given at >> ftp://ftp.multitech.com/usb/usb-linux2.txt). >> >> I tried turning on sysctl hw.usb.debug=10 however after doing so it >> didn't seem to want to probe anymore. >> >> Any ideas? >> >> I can ship this modem to someone if they are interested and have a good >> idea how to fix. > > Hi, > > Can you send the configuration descriptor dump: > > usbconfig -d X.Y dump_device_desc dump_curr_config_desc > > Maybe the modem fits into the U3G driver. > > --HPS > Hans, Moving it to u3g on -current gives nearly same error: Nov 11 11:38:48 spigot kernel: u3g0: Nov 11 11:38:48 spigot kernel: on usbus3 Nov 11 11:38:49 spigot kernel: u3g0: no ports found Nov 11 11:38:49 spigot kernel: device_attach: u3g0 attach returned 6 Nov 11 11:38:56 spigot kernel: ugen3.3: at usbus3 (disconnected) Nov 11 11:39:00 spigot kernel: ugen3.3: at usbus3 Nov 11 11:39:00 spigot kernel: u3g0: on usbus3 Nov 11 11:39:00 spigot kernel: u3g0: no ports found Nov 11 11:39:00 spigot kernel: device_attach: u3g0 attach returned 6 Output from usbconfig is as follows: /usr/home/alfred # usbconfig -d 3.3 dump_device_desc dump_curr_config_desc ugen3.3: at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (400mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0100 bDeviceClass = 0x0002 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x06e0 idProduct = 0xf107 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0002 Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0029 bNumInterfaces = 0x0002 bConfigurationValue = 0x0001 iConfiguration = 0x0003 bmAttributes = 0x00a0 bMaxPower = 0x00c8 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0000 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0004 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0005 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0002 wMaxPacketSize = 0x0010 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0084 bmAttributes = 0x0003 wMaxPacketSize = 0x003f bInterval = 0x0002 bRefresh = 0x0000 bSynchAddress = 0x0000 From owner-freebsd-usb@freebsd.org Wed Nov 11 21:28:29 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 770BBA2C001 for ; Wed, 11 Nov 2015 21:28:29 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BCDB120F for ; Wed, 11 Nov 2015 21:28:29 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: by oige206 with SMTP id e206so22699018oig.2 for ; Wed, 11 Nov 2015 13:28:28 -0800 (PST) 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 :cc:content-type; bh=vUf++EurUfP3r/v2gCHJls6vZaudP9L96xgu/ly1XT4=; b=ThiUh1jkyAUTM2u6GouEARahDeSPdOmYYyiWj6P3C/80K7+MXXWYSbLGwtUjvWAszg jp7mCsoMpvylt72ofYjmX6rio6m9rSmuXaTftlFvKmgeUXg6bIX79/N/NjAubXdigalV 3PVeSXbhU2uyQ8Hni/YURTDwxv8gwYahrFIJWyrgIDKMUFXPHM+UNmcjQCjWi/yzg9gT Jtiz9JsSv8C6P+9SuwrRbjWtH3i67K92pKdpHESwp6WOoMpFFKDrl1LZqOgiWUJ1ho2+ 1CrtFKGL2eDK9vhOq1Nc0O3HIw/7biTdBJYS6x3AZdmBX3pR8MMjHbnlkDUxi94fMszY Qq4Q== MIME-Version: 1.0 X-Received: by 10.202.108.79 with SMTP id h76mr6400518oic.47.1447277308570; Wed, 11 Nov 2015 13:28:28 -0800 (PST) Received: by 10.76.44.145 with HTTP; Wed, 11 Nov 2015 13:28:28 -0800 (PST) In-Reply-To: <56422764.4040307@selasky.org> References: <56421DFD.6070503@selasky.org> <564222D8.6020900@selasky.org> <56422764.4040307@selasky.org> Date: Wed, 11 Nov 2015 16:28:28 -0500 Message-ID: Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Burton Sampley To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 21:28:29 -0000 I added a line to the table, but it seems to have failed since I used the VID# instead of the VID# name. Where are the VID names mapped to the VID#'s? Apparently, I know enough about coding to be dangerous. I'll do some more digging to try to fix my own error. Here's a diff of the original source and my modified source: [/usr/src/sys/dev/usb/serial]$ /usr/bin/diff ./uftdi.c ./uftdi.c.ORIG 914d913 < UFTDI_DEV(2100, 9e56, 0), [/usr/src/sys/dev/usb/serial]$ Here's the compile splattage: ===> usb/uftdi (all) cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -c /usr/src/sys/modules/usb/uftdi/../../../dev/usb/serial/uftdi.c -o uftdi.o /usr/src/sys/modules/usb/uftdi/../../../dev/usb/serial/uftdi.c:914:2: error: use of undeclared identifier 'USB_VENDOR_2100' UFTDI_DEV(2100, 9e56, 0), ^ /usr/src/sys/modules/usb/uftdi/../../../dev/usb/serial/uftdi.c:275:13: note: expanded from macro 'UFTDI_DEV' { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } ^ :167:1: note: expanded from here USB_VENDOR_2100 ^ @/dev/usb/usbdi.h:332:14: note: expanded from macro 'USB_VPI' USB_VENDOR(vend), USB_PRODUCT(prod), USB_DRIVER_INFO(info) ^ @/dev/usb/usbdi.h:323:40: note: expanded from macro 'USB_VENDOR' .match_flag_vendor = 1, .idVendor = (vend) ^ /usr/src/sys/modules/usb/uftdi/../../../dev/usb/serial/uftdi.c:914:2: error: use of undeclared identifier 'USB_PRODUCT_2100_9e56' /usr/src/sys/modules/usb/uftdi/../../../dev/usb/serial/uftdi.c:275:29: note: expanded from macro 'UFTDI_DEV' { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } ^ :170:1: note: expanded from here USB_PRODUCT_2100_9e56 ^ @/dev/usb/usbdi.h:332:33: note: expanded from macro 'USB_VPI' USB_VENDOR(vend), USB_PRODUCT(prod), USB_DRIVER_INFO(info) ^ @/dev/usb/usbdi.h:326:42: note: expanded from macro 'USB_PRODUCT' .match_flag_product = 1, .idProduct = (prod) ^ /usr/src/sys/modules/usb/uftdi/../../../dev/usb/serial/uftdi.c:1067:48: error: invalid application of 'sizeof' to an incomplete type 'const struct usb_device_id []' id = usbd_lookup_id_by_info(uftdi_devs, sizeof(uftdi_devs), ^~~~~~~~~~~~ 3 errors generated. *** Error code 1 Stop. make[5]: stopped in /usr/src/sys/modules/usb/uftdi *** Error code 1 Stop. make[4]: stopped in /usr/src/sys/modules/usb *** Error code 1 Stop. make[3]: stopped in /usr/src/sys/modules *** Error code 1 Stop. make[2]: stopped in /usr/obj/usr/src/sys/GENERIC *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src [/usr/src]$ On Tue, Nov 10, 2015 at 12:20 PM, Hans Petter Selasky wrote: > On 11/10/15 18:14, Burton Sampley wrote: > >> Thank you. I do not have the kernel source on this system, so I will need >> to setup the kernel source, then modify the table in uftdi.c with the >> custom entries, then recompile the module and reload it. It may take some >> time for me to complete these actions. Should I report back to this email >> list if this solution resolves my problem? >> > > Hi, > > Please keep us updated. Nice to hear some success stories too ;-) > > And also there is #bsdusb on EF-net. > > --HPS > -- Your mind is like a parachute, it works much better when it is open. From owner-freebsd-usb@freebsd.org Wed Nov 11 21:32:16 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E3DEA2C176 for ; Wed, 11 Nov 2015 21:32:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F14351564 for ; Wed, 11 Nov 2015 21:32:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgad10 with SMTP id d10so33988929qga.3 for ; Wed, 11 Nov 2015 13:32:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp_com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=KG9rmsMD+e/vE/hqoTyv8ff4O43IwNea9In3/Sc1QfQ=; b=OXxyYQxa6Gz6Yh3f1+6N0HlF/AhOnIpjeA2UZa5AyKerxIOkWLxGNLpvg8HGXGsw0O dHIw0/NrrdBFwCzRc/gLx15PWwsR4RtaDNs30qOHmCqkwb8UYm5vPpDdpj6noB8d0hRW VeHQbrY+ZwpDivoS3wCi+DK9KcjyNw5uvAxDSiXIb3krDDJ3OitEG9V/gTeuns4mg0ju zefmsm59yYeNwO2FMlT9vb1kIjMcVMLdh/aiu9q1YtLlPxDGOMdJliUc5L0ozkP/t5V8 vAGdyjzB+cvLnbDoHLi476n/J5CxtGCXZhFNyi8UXloG6tctXfUaN5WpZUc3HFQmBSCb XSSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KG9rmsMD+e/vE/hqoTyv8ff4O43IwNea9In3/Sc1QfQ=; b=bsyARP0HXeTfmyggfiR1Ntzslvxroblavu0dUovykFLXaMYE4ReLo4HrNfqWWsizrp i4M2XRD569pgL8UYrsM/OKbwd2QrtAE77O/MEHs5/6pn/sc4AUHJRy/RD2hF618FUMNU XzhYFAyKJ7v9pJu34MC5vK0a7YMmZzQubq7cfy43Jto5CrSdBECY1+hBSH6OENp8uZf5 zee/26qgHeMxH11MsOe5Iz/IlNm6nZ3mEx0tFDZubkLCIq3ZWQHDOvBEKKNGsU0sYjt0 VaWZq7QZLFjIOxtbbwL9B8gtrJeH1APEF0vzdvRIJsMDQZ0AD+3DfC82fdBfwpbzIoQ3 OAGw== X-Gm-Message-State: ALoCoQlhS05yz0YhsP78SexM+vtpb6letDGMOonZU31ncfKdr3kmclIvISolD7NqFGf5GC09KSbl MIME-Version: 1.0 X-Received: by 10.140.234.134 with SMTP id f128mr13926472qhc.43.1447277534721; Wed, 11 Nov 2015 13:32:14 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Wed, 11 Nov 2015 13:32:14 -0800 (PST) X-Originating-IP: [2607:fb90:181:948c:0:8:a70c:3501] Received: by 10.140.27.181 with HTTP; Wed, 11 Nov 2015 13:32:14 -0800 (PST) In-Reply-To: <56422167.6050803@selasky.org> References: <56421DFD.6070503@selasky.org> <1447174212.91061.9.camel@freebsd.org> <56422167.6050803@selasky.org> Date: Wed, 11 Nov 2015 14:32:14 -0700 X-Google-Sender-Auth: ztaB6l5-6VYawzhPF04Ouo4ZHzs Message-ID: Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Warner Losh To: Hans Petter Selasky Cc: Burton Sampley , Ian Lepore , freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 21:32:16 -0000 On Nov 10, 2015 9:53 AM, "Hans Petter Selasky" wrote: > > On 11/10/15 17:50, Ian Lepore wrote: >> >> On Tue, 2015-11-10 at 17:40 +0100, Hans Petter Selasky wrote: >>> >>> On 11/10/15 17:28, Burton Sampley wrote: >>>> >>>> SYSFS{idVendor}=="2100", SYSFS{idProduct}=="9e56", >>>> RUN+="/sbin/modprobe -q >>>> ftdi_sio vendor=0x2100 product=0x9e56" >>>> >>>> How do I accomplish the same in FreeBSD? When the cable is plugged >>>> in, I >>>> get the following in /var/log/messages: >>> >>> >>> Hi, >>> >>> See examples here: >>> >>> https://svnweb.freebsd.org/ports/head/multimedia/webcamd/files/webcam >>> d.conf.in?view=markup >>> >>> --HPS >> >> >> But the info in those examples won't cause the uftdi driver to attach >> to the device (as shown in the linux-based example), that can only >> happen if the vid/pid are added to the table in the driver itself, >> right? I don't remember any mechanism in our usb world for forcing a >> driver to attach to a device that isn't compiled into the driver's >> usb_device_id array. >> >> On the other hand, if the device is going to be accessed via libusb >> and/or libftdi, I'm not sure the tty driver needs to attach to it at >> all; don't those libraries work purely through the ugen device? >> > > Right. This might be a feature for: > > https://reviews.freebsd.org/D3458 No. That's different. I need to integrate the code from my talk a few years ago that did the right mappings so the device driver knew what to do with the device. Warner > --HPS > > > _______________________________________________ > freebsd-usb@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" From owner-freebsd-usb@freebsd.org Wed Nov 11 21:38:41 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B464A2C2FB for ; Wed, 11 Nov 2015 21:38:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBF9B19B8 for ; Wed, 11 Nov 2015 21:38:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Wed, 11 Nov 2015 21:38:23 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tABLc8nt001743; Wed, 11 Nov 2015 14:38:08 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1447277889.91061.22.camel@freebsd.org> Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Ian Lepore To: Burton Sampley , Hans Petter Selasky Cc: freebsd-usb@freebsd.org Date: Wed, 11 Nov 2015 14:38:09 -0700 In-Reply-To: References: <56421DFD.6070503@selasky.org> <564222D8.6020900@selasky.org> <56422764.4040307@selasky.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 21:38:41 -0000 On Wed, 2015-11-11 at 16:28 -0500, Burton Sampley wrote: > I added a line to the table, but it seems to have failed since I used > the > VID# instead of the VID# name. Where are the VID names mapped to the > VID#'s? Apparently, I know enough about coding to be dangerous. > I'll do > some more digging to try to fix my own error. > > Here's a diff of the original source and my modified source: > > [/usr/src/sys/dev/usb/serial]$ /usr/bin/diff ./uftdi.c ./uftdi.c.ORIG > 914d913 > < UFTDI_DEV(2100, 9e56, 0), > [/usr/src/sys/dev/usb/serial]$ > > Here's the compile splattage: The VID and PID names are in the file src/sys/dev/usb/usbdevs. -- Ian From owner-freebsd-usb@freebsd.org Wed Nov 11 21:57:37 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 541CFA2C8D5 for ; Wed, 11 Nov 2015 21:57:37 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com [IPv6:2607:f8b0:4003:c01::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 147B814D2; Wed, 11 Nov 2015 21:57:37 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: by obbbj7 with SMTP id bj7so14036030obb.1; Wed, 11 Nov 2015 13:57:36 -0800 (PST) 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 :cc:content-type; bh=hFvKOaXpB7aCBqKz21bOdoeSn/0epuOxIWWXdYWSIPU=; b=H31Vu7exAzwo9LDKz6rSQkfqNNHabWRmm34epN0Bfcfx5K50aViIXjNMoaJ3OPHpup 962iV9DIWhsLo5pKzhQ1h6nxTqGx3ib+7svCjLQFxFApAYwX0CFF9HUUom6IVZULaDM9 mMn/OsorRqeLkz5eZAe8i8Sy/igg6REphKKVIbTpLKdfdnD45N71lJqwawMGvEWVFLfP pa17lrRLhGPwM4/KddWS4745zTXPsisSZLeQMd+A3wDIk5GP5gbSLdUsbpoKL0DH7BBP QNTmMs3BvhXb4GBrncT9kROZadNQ6uv5/9TxJ8jTMI6WN1uD3Gw1m7LgIKrJpWJoO/Li tL9Q== MIME-Version: 1.0 X-Received: by 10.60.125.33 with SMTP id mn1mr7142873oeb.65.1447279056133; Wed, 11 Nov 2015 13:57:36 -0800 (PST) Received: by 10.76.44.145 with HTTP; Wed, 11 Nov 2015 13:57:36 -0800 (PST) In-Reply-To: <1447277889.91061.22.camel@freebsd.org> References: <56421DFD.6070503@selasky.org> <564222D8.6020900@selasky.org> <56422764.4040307@selasky.org> <1447277889.91061.22.camel@freebsd.org> Date: Wed, 11 Nov 2015 16:57:36 -0500 Message-ID: Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Burton Sampley To: Ian Lepore Cc: Hans Petter Selasky , freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 21:57:37 -0000 Ian, Thank you for your prompt reply. Looking at the usbdevs file, I found 0x2100, but there is no entry for 0x9e56, which is my device. So, I'm assuming that changing uftdi.c to the correct name for the VID will only solve part of my problem. I will further assume that I need to find the correct/proper entry for usbdevs as well. Is this a correct assumption? If so, then how/where can I find the proper entry for usbdevs? Here's the 2 closest entries: /* RT system products */ product RTSYSTEMS CT29B 0x9e54 FTDI compatible adapter product RTSYSTEMS SERIAL_VX7 0x9e52 FTDI compatible adapter For me, what appears to be the last piece of the puzzle is to find the correct name to place in the 3rd field. Based on the following: $ /usr/local/bin/sudo /usr/sbin/usbconfig -d ugen2.3 dump_device_desc ugen2.3: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x2100 idProduct = 0x9e56 bcdDevice = 0x0600 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 $ does "CT-62B" look reasonable? Regards, -Burton On Wed, Nov 11, 2015 at 4:38 PM, Ian Lepore wrote: > On Wed, 2015-11-11 at 16:28 -0500, Burton Sampley wrote: > > I added a line to the table, but it seems to have failed since I used > > the > > VID# instead of the VID# name. Where are the VID names mapped to the > > VID#'s? Apparently, I know enough about coding to be dangerous. > > I'll do > > some more digging to try to fix my own error. > > > > Here's a diff of the original source and my modified source: > > > > [/usr/src/sys/dev/usb/serial]$ /usr/bin/diff ./uftdi.c ./uftdi.c.ORIG > > 914d913 > > < UFTDI_DEV(2100, 9e56, 0), > > [/usr/src/sys/dev/usb/serial]$ > > > > Here's the compile splattage: > > The VID and PID names are in the file src/sys/dev/usb/usbdevs. > > -- Ian > -- Your mind is like a parachute, it works much better when it is open. From owner-freebsd-usb@freebsd.org Wed Nov 11 22:04:24 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 749E5A2CA9A for ; Wed, 11 Nov 2015 22:04:24 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BA6A19B1 for ; Wed, 11 Nov 2015 22:04:23 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Wed, 11 Nov 2015 22:04:07 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tABM4Fg9001792; Wed, 11 Nov 2015 15:04:15 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1447279455.91061.24.camel@freebsd.org> Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Ian Lepore To: Burton Sampley Cc: Hans Petter Selasky , freebsd-usb@freebsd.org Date: Wed, 11 Nov 2015 15:04:15 -0700 In-Reply-To: References: <56421DFD.6070503@selasky.org> <564222D8.6020900@selasky.org> <56422764.4040307@selasky.org> <1447277889.91061.22.camel@freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 22:04:24 -0000 On Wed, 2015-11-11 at 16:57 -0500, Burton Sampley wrote: > Ian, > > Thank you for your prompt reply. > > Looking at the usbdevs file, I found 0x2100, but there is no entry > for > 0x9e56, which is my device. So, I'm assuming that changing uftdi.c > to the > correct name for the VID will only solve part of my problem. I will > further assume that I need to find the correct/proper entry for > usbdevs as > well. Is this a correct assumption? If so, then how/where can I > find the > proper entry for usbdevs? > > Here's the 2 closest entries: > > /* RT system products */ > product RTSYSTEMS CT29B 0x9e54 FTDI compatible adapter > product RTSYSTEMS SERIAL_VX7 0x9e52 FTDI compatible > adapter > > For me, what appears to be the last piece of the puzzle is to find > the > correct name to place in the 3rd field. Based on the following: > > $ /usr/local/bin/sudo /usr/sbin/usbconfig -d ugen2.3 dump_device_desc > ugen2.3: at usbus2, cfg=0 md=HOST > spd=FULL > (12Mbps) pwr=ON (90mA) > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0008 > idVendor = 0x2100 > idProduct = 0x9e56 > bcdDevice = 0x0600 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0003 > bNumConfigurations = 0x0001 > > $ > > does "CT-62B" look reasonable? > Yep, you'll have to add a new entry to usbdevs for the the 0x9e56 device. CT62B seems like a good name (can't put the dash in the name for C syntax reasons). -- Ian > > Regards, > > -Burton > > On Wed, Nov 11, 2015 at 4:38 PM, Ian Lepore wrote: > > > On Wed, 2015-11-11 at 16:28 -0500, Burton Sampley wrote: > > > I added a line to the table, but it seems to have failed since I > > > used > > > the > > > VID# instead of the VID# name. Where are the VID names mapped to > > > the > > > VID#'s? Apparently, I know enough about coding to be dangerous. > > > I'll do > > > some more digging to try to fix my own error. > > > > > > Here's a diff of the original source and my modified source: > > > > > > [/usr/src/sys/dev/usb/serial]$ /usr/bin/diff ./uftdi.c > > > ./uftdi.c.ORIG > > > 914d913 > > > < UFTDI_DEV(2100, 9e56, 0), > > > [/usr/src/sys/dev/usb/serial]$ > > > > > > Here's the compile splattage: > > > > The VID and PID names are in the file src/sys/dev/usb/usbdevs. > > > > -- Ian > > > > > From owner-freebsd-usb@freebsd.org Thu Nov 12 08:29:46 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9F30A2C326 for ; Thu, 12 Nov 2015 08:29:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D49DB1C45 for ; Thu, 12 Nov 2015 08:29:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: by mailman.ysv.freebsd.org (Postfix) id D0CF6A2C323; Thu, 12 Nov 2015 08:29:46 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0697A2C322 for ; Thu, 12 Nov 2015 08:29:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 962E11C42; Thu, 12 Nov 2015 08:29:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9BBD21FE022; Thu, 12 Nov 2015 09:29:43 +0100 (CET) Subject: Re: usb modem "Can't setup transfer" To: Alfred Perlstein , usb@freebsd.org References: <5642B7E4.505@freebsd.org> <5642FE24.4050408@selasky.org> <56439C4B.6060407@freebsd.org> From: Hans Petter Selasky Message-ID: <56444E5E.1030706@selasky.org> Date: Thu, 12 Nov 2015 09:31:26 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <56439C4B.6060407@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 08:29:47 -0000 On 11/11/15 20:51, Alfred Perlstein wrote: > Hi, The device is very special in that it uses an interrupt type of endpoint for receiving the data. > > Endpoint 1 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0084 > bmAttributes = 0x0003 > wMaxPacketSize = 0x003f > bInterval = 0x0002 > bRefresh = 0x0000 > bSynchAddress = 0x0000 > In umodem.c you might want to change the USB matching filter to accept interrupt endpoints: > [UMODEM_BULK_RD] = { > .type = UE_BULK, // change this to UE_BULK_INTR > .endpoint = UE_ADDR_ANY, > .direction = UE_DIR_RX, This change will break other modem drivers, but at least it will give some clues if it works or not. --HPS From owner-freebsd-usb@freebsd.org Thu Nov 12 19:43:47 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62513A2D174 for ; Thu, 12 Nov 2015 19:43:47 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC8E1604 for ; Thu, 12 Nov 2015 19:43:47 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 4A68DA2D173; Thu, 12 Nov 2015 19:43:47 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 492E5A2D172 for ; Thu, 12 Nov 2015 19:43:47 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 32E7B1603 for ; Thu, 12 Nov 2015 19:43:47 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from AlfredMacbookAir.local (unknown [IPv6:2601:645:8004:7515:240d:167c:ca3f:1d20]) by elvis.mu.org (Postfix) with ESMTPSA id AD7C2345A920; Thu, 12 Nov 2015 11:43:41 -0800 (PST) Subject: Re: usb modem "Can't setup transfer" To: Hans Petter Selasky , usb@freebsd.org References: <5642B7E4.505@freebsd.org> <5642FE24.4050408@selasky.org> <56439C4B.6060407@freebsd.org> <56444E5E.1030706@selasky.org> From: Alfred Perlstein Organization: FreeBSD Message-ID: <5644EBF3.9070605@freebsd.org> Date: Thu, 12 Nov 2015 11:43:47 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56444E5E.1030706@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 19:43:47 -0000 Hans, Thank you, that allows it to attach and the device nodes appear in /dev/ However I then can not seem to send any AT commands and get a response via either cu -l /dev/ttyU1 or cu -l /dev/ttyU1. Any further steps? Is there a way to virtually share this hardware with you? -Alfred On 11/12/15 12:31 AM, Hans Petter Selasky wrote: > On 11/11/15 20:51, Alfred Perlstein wrote: >> > > Hi, > > The device is very special in that it uses an interrupt type of > endpoint for receiving the data. > >> >> Endpoint 1 >> bLength = 0x0007 >> bDescriptorType = 0x0005 >> bEndpointAddress = 0x0084 >> bmAttributes = 0x0003 >> wMaxPacketSize = 0x003f >> bInterval = 0x0002 >> bRefresh = 0x0000 >> bSynchAddress = 0x0000 >> > > In umodem.c you might want to change the USB matching filter to accept > interrupt endpoints: > >> [UMODEM_BULK_RD] = { >> .type = UE_BULK, // change this to UE_BULK_INTR >> .endpoint = UE_ADDR_ANY, >> .direction = UE_DIR_RX, > > This change will break other modem drivers, but at least it will give > some clues if it works or not. > > --HPS > From owner-freebsd-usb@freebsd.org Fri Nov 13 08:19:36 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03F27A2DEC1 for ; Fri, 13 Nov 2015 08:19:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E189A128E for ; Fri, 13 Nov 2015 08:19:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: by mailman.ysv.freebsd.org (Postfix) id DE99DA2DEC0; Fri, 13 Nov 2015 08:19:35 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE338A2DEBE for ; Fri, 13 Nov 2015 08:19:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A44E3128D; Fri, 13 Nov 2015 08:19:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 298911FE022; Fri, 13 Nov 2015 09:19:33 +0100 (CET) Subject: Re: usb modem "Can't setup transfer" To: Alfred Perlstein , usb@freebsd.org References: <5642B7E4.505@freebsd.org> <5642FE24.4050408@selasky.org> <56439C4B.6060407@freebsd.org> <56444E5E.1030706@selasky.org> <5644EBF3.9070605@freebsd.org> From: Hans Petter Selasky Message-ID: <56459D7C.9050106@selasky.org> Date: Fri, 13 Nov 2015 09:21:16 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5644EBF3.9070605@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 08:19:36 -0000 On 11/12/15 20:43, Alfred Perlstein wrote: > Hans, > > Thank you, that allows it to attach and the device nodes appear in /dev/ > > However I then can not seem to send any AT commands and get a response > via either cu -l /dev/ttyU1 or cu -l /dev/ttyU1. > > Any further steps? Is there a way to virtually share this hardware with > you? Hi, You will need to capture a USB trace from a working driver to get further. Sounds like the device needs a custom driver to function. --HPS