From owner-freebsd-usb@FreeBSD.ORG Sun Oct 11 18:25:54 2009 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 F15641065676 for ; Sun, 11 Oct 2009 18:25:54 +0000 (UTC) (envelope-from tamaru@myn.rcast.u-tokyo.ac.jp) Received: from mailv3.ecc.u-tokyo.ac.jp (mailv3.ecc.u-tokyo.ac.jp [133.11.225.58]) by mx1.freebsd.org (Postfix) with ESMTP id 76B118FC08 for ; Sun, 11 Oct 2009 18:25:54 +0000 (UTC) Received: from mailv1.ecc.u-tokyo.ac.jp (mailv1.ecc.u-tokyo.ac.jp [133.11.225.59]) by mailv3.ecc.u-tokyo.ac.jp (Postfix) with ESMTP id A768D6C02A7 for ; Mon, 12 Oct 2009 02:47:55 +0900 (JST) Received: from mhs002.ecc.u-tokyo.ac.jp (mhs002.ecc.u-tokyo.ac.jp [133.11.70.162]) by mailv1.ecc.u-tokyo.ac.jp (Postfix) with ESMTP id 2EE376C0042 for ; Mon, 12 Oct 2009 02:47:54 +0900 (JST) Received: from amulet.amuletic.net (124.155.55.252 [124.155.55.252]) by mhs002.ecc.u-tokyo.ac.jp (SpamBlock.pstn.b 3.4.102) with ESMTP id for ; Mon, 12 Oct 2009 02:47:34 +0900 Date: Mon, 12 Oct 2009 02:47:34 +0900 Message-ID: From: Hiroharu Tamaru To: Sven Hazejager In-Reply-To: <09101118515750.-1077948416@somehost.domainz.com> References: <0910111122164F.-1077952704@somehost.domainz.com> <200910111217.49002.hselasky@c2i.net> <09101116183255.-1077948416@somehost.domainz.com> <200910111639.07588.hselasky@c2i.net> <09101118515750.-1077948416@somehost.domainz.com> User-Agent: User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-IP: 124.155.55.252 X-FROM-DOMAIN: myn.rcast.u-tokyo.ac.jp X-FROM-EMAIL: tamaru@myn.rcast.u-tokyo.ac.jp Cc: freebsd-usb@freebsd.org Subject: Re: Simple manner to read 1-pin high/low from USB under FBSD? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2009 18:25:55 -0000 Hi At Sun, 11 Oct 2009 18:56:16 +0200 (CEST), Sven Hazejager wrote: > On Sun, 11 Oct 2009, Hans Petter Selasky wrote: > > >> Thanks for your reply, would I need some GPIO device like this: > >> http://www.fivemanconspiracy.com/node/45 > > > > I don't know. You need to ask the manufacturer. Ask them if the control > > endpoint is used to turn on/off the pin(s) you want. > > Well, I only need to read high/low, not to set anything... I've mailed the > manufacturer for info, thanks for suggesting. I once considered replacing ppi(4) functionalities with usb- to-parallel converters as well. They seem to follow the USB Printer Class specification. http://www.usb.org/developers/devclass_docs/usbprint11.pdf According to the protocol description, they seem to be rather intelligent in processing the handshake and do not allow the host to program each bits like ppi(4) interface does. However, they do seem to support couple of input pins like "paper empty", "select" and "error" (pin 12, 13, and 15, IIRC). So, for your use, probably they may be good enough. I myself didn't actually try them, 'cause I needed more bits in and out anyway. YMMV, but just FYI. I'd be interested in success stories with USB GPIO devices as well, so if you'd try it, please send in your experiences too. I haven't looked at the device you mentioned, but if they release a spec sheet like the one I mentioned above, you should be able to used them fine. -- Hiroharu Tamaru