On Fri, 20 Sep 2013, Phil Dibowitz wrote:

>>>> Yep, the Windows version of hidapi wouldn't work at all unless I fixed
>>>> this bug by doing:
>>>
>>> This seems to work fine on Linux. I don't understand how it worked without 
>>> it.
>>> Weird.
>>
>> It works fine on Linux *except* when the first byte of the message is
>> 0x00, which MH remotes use during a config update, which is how I noticed
>> the bug.  It is kind of odd though, that the bug manifests itself
>> differently on Windows vs. Linux.
>
> But it shouldn't only manifest there. The first byte of every packet is being
> dropped... how does that even REMOTELY work?!
>
> *confused*

The first byte is only getting dropped on Linux if it is 0x00. 
That's why only packets with data[0] == 0x00 were getting dropped.  From 
the libusb hidapi implementation:

int report_number = data[0];
int skipped_report_id = 0;

if (report_number == 0x0) {
data++;
length--;
skipped_report_id = 1;
}



------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
concordance-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to