On Sat, 28 Dec 2013, Phil Dibowitz wrote: > OK, on the failed reads, I got further, but I haven't yet fixed it. > > The first problem is that I was running into USB read timeouts - so I bumped > the default from 500ms to 1000ms. > > Then I started getting Invalid Sequence errors from CRemote::ReadFlash(). > > We expect the sequence number to increase by 0x11 each time, and it does, > until it doesn't. One example, it goes: > > 89, 9a, ab, bc, ef (we expect cd here) > > Tried several times and I see: > > bc, cd, 00 (we expect de) > 89, 9a, cd (we expect ab) > cd, de, 11 (we expect ef) > ab, bc, ef (we expect cd) > 89, 9a, cd (we expect ab) > cd, de, 11 (we expect ef) > > There's a pattern here - they are always either one or two sequence numbers > ahead... (+ 0x11 or + 0x22) > > I don't really know what that means though. :(
This is very interesting... I have been doing some more debugging on the Windows issue with config dumps. On Windows, what I've found is that we're losing packets from the remote. In the MH config dump code, I wasn't actually checking the sequence numbers coming from the remote, but I added some code to do that, and sure enough, I'm seeing a gap in sequence numbers. So, the packets are getting lost somewhere, which sounds *very* similar to what you're seeing on Mac. I'm still not sure how to fix the problem though. At first, I thought it might be because we were spending too much CPU time in the callback function (writing status to the screen) and missing packets, but that didn't seem to be the problem. Then, I tried increasing the packet buffer size - this required a changed to HIDAPI - but that didn't seem to help either. It is weird, though. For some reason, the remote seems to send packets to us much faster to us on Windows that on Linux. According to the info I've found, it seems that the Windows HID driver continuously requests reports from the interrupt IN endpoint and stores them in a buffer. If the buffer is full, it will drop the oldest packet. I think this is how we're losing packets on Windows but I'm still not sure how to fix it yet. Scott ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel