Scubapro Aladin Square

vavincavent vavincavent at gmail.com
Tue Nov 14 13:08:22 PST 2017


Linus,

i change back
        if (1) {
to
        if (io->packet_size <64) {

here is the usb.pcap

in windows, i see idle and busy on the divecomputer, but not in debian.

Vincent

Le mardi 14 novembre 2017 à 12:33 -0800, Linus Torvalds a écrit :
> On Tue, Nov 14, 2017 at 12:15 PM, Jef Driesen <jef at libdivecomputer.or
> g> wrote:
> > 
> > In of you previous emails, you asked Vincent to patch the
> > 
> >         if (io->packet_size <64) {
> > 
> > to a
> > 
> >         if (1) {
> 
> Oh, my bad.
> 
> That was actually an earlier "let's try to avoid the report byte",
> and
> I'd forgotten entirely about that (and it was pointless, since the
> hidusb.c code actually removes the report byte anyway for libusb).
> 
> But yes, if Vincent has that code, then that explains why he might
> get
> the smaller size.
> 
> Vincent, please remove that particular broken test patch if you have
> it.
> 
> > Ah that explains the difference. In upstream libdivecomputer the
> > buffer is
> > one byte larger:
> > 
> > unsigned char buf[TX_PACKET_SIZE + 1];
> 
> And that may actually end up being relevant.
> 
> It makes no sense that the receiver cares about the number of padding
> bytes, but the code originally always padded out to the full USB HID
> packet size of 64 bytes.
> 
> The whole confusion between 32/33 is all kinds of crazy, but yes,
> maybe some broken other end really wants to see 32 bytes plus report
> byte.
> 
> So Vincent, also do change that
> 
>     unsigned char buf[TX_PACKET_SIZE];
> 
> in src/scubapro_g2.c to have the "+1" while you're at it, and see if
> that matters..
> 
>              Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb.pcap
Type: application/vnd.tcpdump.pcap
Size: 186444 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20171114/6bd9d83e/attachment-0001.pcap>


More information about the subsurface mailing list