<div dir="ltr">I see your point. But since libusbhid is mostly a wrapper library, its messages are going to be a higher level of debugging anyway - mostly related to how you handle a particular device. So once you are confident that things are working for your device, turning debug off completely seems the way to go, programs will be smaller and faster (no continuous checking for debug messages are to be displayed). If bugs or problems resurface, the underlying libusb is going to yell at you anyway. Alternatively, you can just compile one release and one debug version of your executable.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 29, 2019 at 1:21 PM James Richters <<a href="mailto:james@productionautomation.net">james@productionautomation.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8728188973009967337WordSection1"><p class="MsoNormal">Yes, and besides the errors, everything else seems to work properly. I did notice that the one machine uses an AMD processor and all the others are Intel, not sure what that would have to do with anything, but it is a major system configuration difference.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks for the debug level information. I will probably just shut off all messages but it would be nice to have a way to turn them on if I need to debug something on a remote system. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">How about the libusbxhid debug messages? Since they are controlled with {$ifdef DEBUG_MSG} you can’t really turn them on and off without re-compiling. Could another variable be used to make libusbxhid messages optional but only if {$ifdef DEBUG_MSG} is used? It would be helpful to be able to hide them most of the time but show them if trying to debug without re-compiling.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">James<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><b>From:</b> fpc-pascal <<a href="mailto:fpc-pascal-bounces@lists.freepascal.org" target="_blank">fpc-pascal-bounces@lists.freepascal.org</a>> <b>On Behalf Of </b>Stefan V. Pantazi<br><b>Sent:</b> Thursday, August 29, 2019 1:11 PM<br><b>To:</b> FPC-Pascal users discussions <<a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a>><br><b>Subject:</b> Re: [fpc-pascal] USB Human Interface Devices<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">I would chalk this up to differences between OS versions, configurations, devices, etc and move on. I see all memory is released. At least it does not crash and burn badly. <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">The function call you want to play with is:<u></u><u></u></p><div><p class="MsoNormal"><span style="font-size:9pt;font-family:Consolas;color:rgb(36,41,46)"> </span><span class="gmail-m_8728188973009967337gmail-pl-en"><span style="font-size:9pt;font-family:Consolas;color:rgb(111,66,193)">libusb_set_debug</span></span><u></u><u></u></p></div><div><p class="MsoNormal"><span class="gmail-m_8728188973009967337gmail-pl-en"><span style="font-size:9pt;font-family:Consolas;color:rgb(111,66,193)"><a href="http://libusb.sourceforge.net/api-1.0/group__lib.html#ga5f8376b7a863a5a8d5b8824feb8a427a" target="_blank">http://libusb.sourceforge.net/api-1.0/group__lib.html#ga5f8376b7a863a5a8d5b8824feb8a427a</a></span></span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Of course, you can set the level dynamically, from your program.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Aug 29, 2019 at 12:34 PM James Richters <<a href="mailto:james@productionautomation.net" target="_blank">james@productionautomation.net</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">At least I can shut off the messages with that.. but any idea what these messages actually mean? It’s an init_device error but no one was tying to do anything but get the list of devices from the system.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Is there a description of the verbosity level anywhere?<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Is this a variable I can change during program execution without re-compiling it? It would be helpful if I was having an issue to turn on debug info, then turn it back off without exiting my program or needing to compile.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">James<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">>libusb has a debug verbosity level which currently is set to 3 (i.e., very verbose) in the device open function.<u></u><u></u></p><div><p class="MsoNormal">>There is a define in libusbx.pas that you can change to shut off debug messages.<u></u><u></u></p></div></div></div></div><p class="MsoNormal">_______________________________________________<br>fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br><a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" target="_blank">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><u></u><u></u></p></blockquote></div></div></div>_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br>
</blockquote></div>