From owner-freebsd-usb@FreeBSD.ORG Thu Aug 26 21:29:40 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 029F21065672 for ; Thu, 26 Aug 2010 21:29:39 +0000 (UTC) (envelope-from kc5vdj.freebsd@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3C18FC1C for ; Thu, 26 Aug 2010 21:29:39 +0000 (UTC) Received: by iwn36 with SMTP id 36so2144227iwn.13 for ; Thu, 26 Aug 2010 14:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=hPCR3l42mEnDG2ZAEQGQS6YT7U5QIBpl+Dqfwrahfp8=; b=L5cBQrQ1AERQvEBIoVYImyZL6KYP06GCIA58W4lVC+SWZSrqOI+qob2qo1hZbmc/Ft KFZ0X2YlLHbVI9EEemC8gOHGzgcUXWzjI1vdQxnWvuyqqU7zIqLtYf1lkJCFDTPJyLth BRfz44Ya8KpZuC3lhL3OjXaLV2R7QPjCoCwhc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=hjijvD1LyYjOgxBtCp/yrV17gsksHtkvfJTGoyFSgaChLFHEmUlT590TOx3oA2nJj6 9go7wjS+OMZ0viDyies66Ys668Cn8x631ySe4GlXM9omXSz3S3JJB77qwiM52u++WcAs CKNf2PobmDeS9CvVMk9s/Ev2lDp3obkgn/dGA= Received: by 10.231.37.75 with SMTP id w11mr11729238ibd.45.1282858177812; Thu, 26 Aug 2010 14:29:37 -0700 (PDT) Received: from orb.electron-tube.net (71-217-215-181.cdrr.qwest.net [71.217.215.181]) by mx.google.com with ESMTPS id z6sm1143093ibc.6.2010.08.26.14.29.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Aug 2010 14:29:37 -0700 (PDT) Message-ID: <4C76DCBF.3080904@gmail.com> Date: Thu, 26 Aug 2010 16:29:35 -0500 From: Jim Bryant User-Agent: Thunderbird 2.0.0.24 (X11/20100731) MIME-Version: 1.0 To: Hans Petter Selasky References: <4C76AB76.4070806@gmail.com> <201008262232.44775.hselasky@c2i.net> In-Reply-To: <201008262232.44775.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: writing usb drivers under 8.x X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2010 21:29:40 -0000 Actually, all of my test programs (for testing my reverse engineering efforts) have been done in libusb-1.0. I would actually like to write kernel-level drivers though for these. Hans Petter Selasky wrote: > On Thursday 26 August 2010 19:59:18 Jim Bryant wrote: > >> i have some usb devices, in the hid class, that i am wanting to write >> some drivers for. >> >> seeing that one of these previously had an older non-submitted driver >> for 5.x-7.x online, i thought that might be a good starting point (the >> imon vfd/lirc driver), but that does not work, due to the changes in the >> usb subsystem. >> >> where can i find documentation on this subsystem? >> >> are there any decent skeletons to start with, or does this need to be >> from scratch? >> >> i'd like to start with a driver for the pcsensor temper usb thermometer, >> for which i already wrote a libusb util for, since these are widely >> sold, and very popular (and usually around $5 USD), and since it only >> has one transaction (read current temp), I figure it would be easier to >> start with while I learn the usb driver framework. >> >> as for the imon vfd unit, i'd like to tackle that next. i have written >> libusb utilities for all of the display functions supported, and have >> documented the knob/button interrupt packets (only three packet types, >> clockwise, counterclockwise, and button down). all of the remote >> control functions are well-documented in lirc. >> >> i've been looking through the sources in the sys tree, but would like to >> find some comprehensive documentation of the new usb subsystem, and >> maybe someone who can give me pointers as i go. >> >> jim >> > > Hi, > > Feel free to post patches here. > > Some choices you have: > > Use libusb v1.0 or v0.1 if you need portability. > > Else use libusb v2.0. > > All three versions are contained in -lusb on FreeBSD 8+. > > Sylvestre Gallon had some libusb examples in his USB P4 repositorium. Else if > you have questions regarding libusb you can ask either here or at: > > libusb-devel@lists.sourceforge.net > > --HPS > >