From owner-freebsd-usb@FreeBSD.ORG Wed Jul 14 17:41:41 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 B9A051065672 for ; Wed, 14 Jul 2010 17:41:41 +0000 (UTC) (envelope-from peerst@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 48B1D8FC14 for ; Wed, 14 Jul 2010 17:41:40 +0000 (UTC) Received: by bwz12 with SMTP id 12so124311bwz.13 for ; Wed, 14 Jul 2010 10:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=HOu1Vm/OH74noeMk8XGtkP6x0a7yYywB6x8DaGtK9+A=; b=h4odIW3xwGQl8TAy+OIQ7t6EN35yKYoeOi3wrJ8S84NZ5N8FVn0gW6xj9yQKlfaBuT Ar3AG2cLU1bJ79yRutfRqUiXgjg3uOQsJ1ogcL9hc7J+xJwLSQp2RGNh15ORzhRfIUvw PJacnY8MobJWoiNbyk9qBvzjdxXYG4Zi6+yOw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QHxK2SvJnoTM+31FtaVJatLHGWqIbxsAmoShuDp425wm810RWKnkVJajE+EHmmX0DF D3AkI8dVahKuUrYN0/+PgoRbs1vzmbTlqIDyI4SeUFEEUrDlZusKrc9af+YGOjIcO9vB eaP9nkMiMz39ydBPjz4KphARhkn2b5BgxTNys= MIME-Version: 1.0 Received: by 10.204.134.133 with SMTP id j5mr13422789bkt.159.1279129300006; Wed, 14 Jul 2010 10:41:40 -0700 (PDT) Received: by 10.204.56.130 with HTTP; Wed, 14 Jul 2010 10:41:39 -0700 (PDT) In-Reply-To: <201007140935.29738.hselasky@c2i.net> References: <201007140935.29738.hselasky@c2i.net> Date: Wed, 14 Jul 2010 19:41:39 +0200 Message-ID: From: Peer Stritzinger To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-usb@freebsd.org Subject: Re: libusb10: libusb_bulk_transfer returns LIBUSB_ERROR_OTHER caused by USB_FS_OPEN ioctl in ugen20_tr_open 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: Wed, 14 Jul 2010 17:41:41 -0000 Hi, On Wed, Jul 14, 2010 at 9:35 AM, Hans Petter Selasky wrote: > On Tuesday 13 July 2010 23:40:43 Peer Stritzinger wrote: >> What I get is rv -> LIBUSB_ERROR_OTHER to get closer to re reason for > > IN endpoints must be OR'ed with 0x80. That was the problem, from the documentation (fbsd man page and sourceforge) it wasn't clear that this has to be done. OTOH it might have occurred to me that libusb_bulk_transfer couldn't always guess the direction so it must be told somehow. It works now quite well now. Thanks a lot! > Could you dump the configuration > descriptor of your device? Also you might need to claim the interfaces. Claiming the interface or not didn't make any difference (both ways it works). Looking at the code of libusb_claim_interface it doesn't do much, and claiming doesn't prevent other processes accessing the interface (I can start the program that claims the interface multiple times without problem). Actually what I would like to do is reading one endpoint of a interface in one process and writing in another process -- saves me polling an/or doing async i/o. It looks like it might just work but somehow I have the impression that it wouldn't be the right way to do it and might break in future versions of FreeBSD. Best regards -- Peer