<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">As I try to catch up with my large backlog of email...</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2019, at 7:45 AM, Anton Lundin <<a href="mailto:glance@acc.umu.se" class="">glance@acc.umu.se</a>> wrote:</div><div class=""><div class=""><br class="">First of all, I'd just try to run our current code on a libusb<br class="">containing:<br class=""><a href="https://github.com/libusb/libusb/commit/2f3bc98b0d0f4766496df53c855685a5f0e5e7cf" class="">https://github.com/libusb/libusb/commit/2f3bc98b0d0f4766496df53c855685a5f0e5e7cf</a><br class=""></div></div></blockquote><div><br class=""></div>That part is easy. v1.0.23 is what we want to switch to.</div><div>But of course that breaks our current approach which works on SOME devices, </div><div>so we can't do that until the second part below is done.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="">My preferred solution here would be to patch linux_scan_devices to have<br class="">a callback into subsurface which could do the scanning against java code<br class="">here, and fill up the libusb data structures. I have some unfinished<br class="">code working on this path, and its basically the same approach as in our<br class="">"open" patch. The upside with this is that it keeps all our non ftdi<br class="">libusb using backends in libdivecomputer still working.<br class=""></div></div></blockquote></div><br class=""><div class="">I honestly think that this is the right approach. I started staring at the code and</div><div class="">as expected the more I look the more I worry that I will get started and never</div><div class="">get finished. My challenge is that I don't understand the libusb data structures.</div><div class="">So which part of the libusb_context do I need to populate from the information </div><div class="">we get back from the JNI calls? That structure has quite a few members that I </div><div class="">have no idea what to do with. And reading the Linux code that initializes this </div><div class="">structure in the regular case really doesn't make me any smarter as just trying </div><div class="">to follow the code is making me break out in a rash...</div><div class=""><br class=""></div><div class="">I have a branch for this but I don't recommend that anybody hope that I'll make</div><div class="">a lot of progress. I'm just dealing with way too many other issues that people</div><div class="">are equally desperately hoping for me to work on (like the UI issues and crashes</div><div class="">on Android that I think the latest beta finally addresses - which means I need to</div><div class="">make another release...)</div><div class=""><br class=""></div><div class="">/D</div></body></html>