From: Hermann H. <her...@we...> - 2016-08-19 08:50:47
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div name="quoted-content">Hi Tormod,</div> <div name="quoted-content">thank you for your expertise; now I see clearer.</div> <div name="quoted-content"><br/> > < Why it crashed?<br/> > I don't know.</div> <div name="quoted-content"> </div> <div name="quoted-content">I will send you a crash dump later.</div> <div name="quoted-content"><br/> > <If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in<br/> > <the system and better use WinUSB driver for your device.<br/> ><br/> > I want the backend that is in the registry.<br/> <br/> >pyusb by default looks for libusb1 first</div> <div name="quoted-content"> </div> <div name="quoted-content">< .... you must select backend explicitly.</div> <div name="quoted-content"> </div> <div name="quoted-content">Well how can I? I do not know which backend is available on my clients' machines.</div> <div name="quoted-content">I can only rely on the driver that was installed for my device and which is displayed </div> <div name="quoted-content">in the control panel. I suppose the control panel gets it through the registry.</div> <div name="quoted-content"><br/> << Flexibility comes at a cost.</div> <div name="quoted-content">And what is the cost of reliability?</div> <div name="quoted-content"><br/> <And the pyusb application currently uses a DLL search to select default library<br/> <backend, regardless of the device.</div> <div name="quoted-content"> </div> <div name="quoted-content">Well I rank the registry higher in authority than the library search order.</div> <div name="quoted-content"><br/> <br/> <Hermann, in your case you are probably better off selecting the<br/> <libusb0 backend in your python application, if you know that your<br/> <device requires libusb0.sys. Otherwise, register the device for WinUSB<br/> <(with .inf file or Zadig), make sure a known good libusb1.dll is<br/> <installed in the path (before any third party libusb1.dll) and select<br/> <the libusb1 backend in your python application for good measure.</div> <div name="quoted-content"> </div> <div name="quoted-content">Well I am a bit confused when regarding recommendations for driver installation.</div> <div name="quoted-content">The tutorial recommends the inf-wizard and libusb0 and so I did and it works fine.</div> <div name="quoted-content">Well I can instruct my clients to do the same and hardcode pyusb0 into my program.</div> <div name="quoted-content">So much about flexibility.</div> <div name="quoted-content"><br/> <br/> <BTW, Hermann's example patch hardcodes "ControlSet002" which I believe<br/> <should be "CurrentControlSet", unless there are better ways to find</div> <div name="quoted-content"> </div> <div name="quoted-content">I found this with a registry editor search. I do not understand enough to</div> <div name="quoted-content">judge the generality of this approach.</div> <div name="quoted-content"><br/> <(e.g. different serial numbers but same vid/pid) can have different<br/> <Service values, and I am not sure how the patch deals with that.</div> <div name="quoted-content">I would not care, nobody will have two same oscilloscopes on its computer.</div> <div name="quoted-content"> </div> <div name="quoted-content">Thank you again for your effort, this makes my issue obsolete an I will not open it.</div> <div name="quoted-content"> </div> <div name="quoted-content">Sincerely Hermann</div> <div name="quoted-content"><br/> ------------------------------------------------------------------------------<br/> _______________________________________________<br/> pyusb-users mailing list<br/> pyu...@li...<br/> <a href="https://lists.sourceforge.net/lists/listinfo/pyusb-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/pyusb-users</a></div> </div> </div> </div></div></body></html> |