From owner-freebsd-usb@FreeBSD.ORG Mon Jul 12 20:41:58 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 E9DC01065676 for ; Mon, 12 Jul 2010 20:41:58 +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 45A298FC18 for ; Mon, 12 Jul 2010 20:41:57 +0000 (UTC) Received: by bwz12 with SMTP id 12so3163205bwz.13 for ; Mon, 12 Jul 2010 13:41:57 -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=QvZnwnxqGOSw/2FHwziKVXnohf6/JxiWydJjyp2uB7k=; b=ZF/EUQQBG8CexCMQA/tEIQCxHySJrhE1e+YCwyqC/qY/EcjMnLc+aGI7akavuVd5IQ gzvyZ/QAMK8cbW8R0Q1CWtFX+821EuHBgS/J2y2f3rXpMvcVY2JbLPnsb7Bm26kwhNZg q1POuB1jgHvykWl6K2Ed1PuE86TfcXt0dhbjw= 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=CnaV9TqlC98RIXkIrB7mRkhD36sfhTM1cfJgqWCnXIQZfROgtjDdczsjIVpcvYFuif 3ZV0jJ6mLghHSjUxBSBMIeB4HWLYOcq62aXyu12jD2DqPxFNKB/dNE6MW0dp82Y35U8a llu7UNFBa0xhuR/Z4fkKhLz4zRxZwcGj5Vk8A= MIME-Version: 1.0 Received: by 10.204.126.161 with SMTP id c33mr11105614bks.108.1278967316957; Mon, 12 Jul 2010 13:41:56 -0700 (PDT) Received: by 10.204.56.134 with HTTP; Mon, 12 Jul 2010 13:41:56 -0700 (PDT) In-Reply-To: <201007122020.02934.hselasky@freebsd.org> References: <201007122020.02934.hselasky@freebsd.org> Date: Mon, 12 Jul 2010 22:41:56 +0200 Message-ID: From: Peer Stritzinger To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-usb@freebsd.org Subject: Re: read(2) always returns 0 when reading from /dev/usb/n.m.k bulk IN endpoint 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: Mon, 12 Jul 2010 20:41:59 -0000 Hi, On Mon, Jul 12, 2010 at 8:20 PM, Hans Petter Selasky wrote: > On Monday 12 July 2010 19:22:28 Peer Stritzinger wrote: > > However the read always returns 0. > > > > Tried different buffer sizes etc. > Hi, > > Maybe you are missing to set the short transfer OK flag. > > Else I recommend using LibUSB. > > --HPS > Did'nt set this flag (not doing any ioctls on the ugen device at all). However I did try matching either the max packetlen, or the read buffer size with the actual bytes sent, so I thought it shouldn't matter. I'll move on to libusb and not waste any more time with the raw interfaces. Thanks -- Peer