Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2008 07:46:23 -0800
From:      Bruce Cran <bruce@cran.org.uk>
To:        Boris Samorodov <bsam@ipt.ru>
Cc:        Hans, Alfred Perlstein <bright@mu.org>, freebsd-questions@freebsd.org, Petter Selasky <hselasky@c2i.net>
Subject:   Re: garmin forerunner 305
Message-ID:  <20081104074623.25f51f27@tau.draftnet>
In-Reply-To: <80794437@bs1.sp34.ru>
References:  <f5b896260809040751ka9d42e8nfba3ec0d49305c58@mail.gmail.com> <20080904202402.0c245ed2@tau.draftnet> <20081103192749.2f35701b@tau.draftnet> <80794437@bs1.sp34.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 04 Nov 2008 14:57:14 +0300
Boris Samorodov <bsam@ipt.ru> wrote:

> Bruce Cran <bruce@cran.org.uk> writes:
> 
> > I don't know if it'll work with the usb stack that's in shipping
> > version of FreeBSD though, and even with the new stack I had to
> > make a change to libgpsusb.c in gpsbabel to get it working.
> 
> Can you submit a patch? Thanks!

Having just read about endpoint addresses I'm not sure who's wrong.
gpsbabel truncates the address to the first 4 bytes using
USB_ENDPOINT_ADDRESS_MASK from libusb20 while
the stack clearly wants the rest, including the top 'direction' bit.  In
fact in /sys/dev/usb2/core/usb2_device.c line 114 it masks out the
reserved bits but still keeps the direction bit. usb2_get_pipe_by_addr
was failing when passed address 1 because the full endpoint address is
0x81 (endpoint 1, direction IN).  It looks as though by changing EA_MASK
to be just the endpoint number would fix the problem, but I'm not
sure if that's correct.

-- 
Bruce Cran



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081104074623.25f51f27>