In mid-operation, the GUI software fails to detect the hardware and I’ve been unable to recover. At the lower left there’s a text on orange background “Connect the QA402. See File->Device to change”.
First I was afraid the hardware got damaged (was just plugging an input), but it works on another PC, and even on this PC when using my bare metal Python audio player. The device properly shows up in Windows Device Manager.
So it’s probably the GUI software, somehow. I uninstalled it, powered down, reinstalled it, no change. Older versions of the software, no change. Next try I inbetween deleted the settings under AppData\Local\QA40x, no change. At currently final level of despairation I searched for QA40* and QuantAsylum* registry keys, deleted what seems related, also no change.
Now I’m out of ideas. Is there any diagnostics, e.g. debug logging which could help?
The QA402 requires a certain current draw to work - perhaps the PC’s USB driver detected more than it was happy with and powered down the port? The Device Manager would be a good place to look maybe?
Yes, it’s a power-hungry box which may cause trouble at places.
However here, without touching anything the Python software works and the GUI software doesn’t.
Hi @IDC_Dragon, the QA40x doesn’t use any registry keys. It’s a standalone install. And the fact that the Python works, as you note, suggests the power and USB driver are all fine. Is it possible there’s a zombie process of QA40x running (that never closed completely for some reason) that might be causing issue? You can kill the process manually if you see it or reboot…
Also, Windows driverless installs (used on QA40x) only allow a single instance. That is, multiple apps cannot use the driver. So, if any process (including a prior Python session) grabbed the USB, then nothing else can use it until that process has released it. And that release needs to be explicit in some cases. In other words, if a Python app opens and doesn’t close the USB connection explicitly, it can in some cases, prevent anything from grabbing it in the future until reboot. I struggled a lot on this at first in Jupyter.
Finally, you can run the QA40x app with -L and/or -C for logging and console. Maybe that will shed some light?
Certainly I did reboot between my attempts. There is no previous run, I also uninstalled the ASIO driver to avoid interference.
Thank you for the log options (rtfm, sorry). It doesn’t reveal much, I get:
Logging started.
Assembly: QA40x, Version=1.1.6.8, Culture=neutral, PublicKeyToken=null
Version: 1.202
File logging started @ 02.11.2024 08:31:15
Default settings file not found. It was created
Server started listening on port 9402
Form1_FormClosing
The webserver has stopped. Webserver exception: Der E/A-Vorgang wurde wegen eines Threadendes oder einer Anwendungsanforderung abgebrochen
The webserver may have failed to start listening on the specified port. It may require the application to run with admin privs OR a namespace reservation needs to be made on the port you desire. For example, for port 9402:netsh http add urlacl url=http://*:9402/ user=DOMAIN\userTo check entries, use: netsh http show urlacl
Exiting user code...
Is the webserver complaint a shutdown artefact? I tried running the app with admin rights, but no difference.
Hi @IDC_Dragon, yes, the webserver message is an artifact.
Can you look in the c:\users\USER\Documents\QuantAsylum\QA40x
directory and see if in fact the settings file was created (filename is default.settings
)? Also, there is an ExceptionLog directory off that path, do you see any recent exceptions?
Here’s the log file from my machine for a recent startup and close.
Logging started.
Assembly: QA40x, Version=1.1.6.8, Culture=neutral, PublicKeyToken=null
Version: 1.202
File logging started @ 11/3/2024 10:02:41 AM
Server started listening on port 9402
Existing settings file loaded
Form1_FormClosing
The webserver has stopped. Webserver exception: The I/O operation has been aborted because of either a thread exit or an application request
The webserver may have failed to start listening on the specified port. It may require the application to run with admin privs OR a namespace reservation needs to be made on the port you desire. For example, for port 9402:netsh http add urlacl url=http://*:9402/ user=DOMAIN\userTo check entries, use: netsh http show urlacl
Exiting user code...
Would you mind sending your settings file that was created?
If I delete my settings file, I think my log looks identical to yours
Logging started.
Assembly: QA40x, Version=1.1.6.8, Culture=neutral, PublicKeyToken=null
Version: 1.202
File logging started @ 11/3/2024 10:08:05 AM
Default settings file not found. It was created
Server started listening on port 9402
Form1_FormClosing
The webserver has stopped. Webserver exception: The I/O operation has been aborted because of either a thread exit or an application request
The webserver may have failed to start listening on the specified port. It may require the application to run with admin privs OR a namespace reservation needs to be made on the port you desire. For example, for port 9402:netsh http add urlacl url=http://*:9402/ user=DOMAIN\userTo check entries, use: netsh http show urlacl
Exiting user code...
There is also some slightly different output that might be seen using the -C option. Is there anything interesting there??
also, one more thing to confirm: When you plug in the device is it loading the WinUsb driver? Right click on the device in device manager and and see if it’s loading the driver as WinUsb device. I suspect it is…but just thought we should check
Thanks, interesting catch: My first device manager page looks different, for me it shows “(Undefined Vendor)”. The second page says libwdi, but below that WINUSB. And a really old version 6.1.7600.16385, dated 02.06.2012.
No idea if and how anything wrong sneaked it, I wasn’t installing anything, but in the middle of measuring with the software.
Don’t know if Zadig is a good idea to reassign the driver. It is already listing WinUSB and shows the same version?
Replying to 2nd latest post: The ExceptionLog dir is empty. The log was already made with -C also.
Hi @IDC_Dragon thanks for this info, I think we might focus on getting the driver back to the default state.
I don’t know if you can tell the Zadig to not manage the QA403 driver? And if you do, does it go back to its default state?
The QA402 and QA403 use a special string descriptor (MSFT100
, which is a good string to search for if you want to learn more about the process). When you plug in the QA402 or QA403 for the first time, Windows asks for the descriptor at location 0xEE, and the QA HW returns the MSFT100
. From that, Windows knows to automatically load the WinUSB.sys drivers.
The second link below goes into more detail about the registry entries Windows creates. Now, once you go through the process once, that’s it, it won’t go through it again. So, if you want to start fresh, you need to go to
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags
and
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
and delete the appropriate VID:PID combination from both registries locations. For the QA402, this will be 0x16C0:0x4E37. For the QA403, this will be 0x16C0:0x4E39.
When you do this, you will force windows to reload the special descriptor and re-set the Windows drivers.
Note for others reading this: If you aren’t doing development type stuff on your machine and using various USB driver shims, you should never need to do this step. Poking about in your registry can be hazardous.
So, in summary: I’d first try to tell Zadig to NOT manage the QA402 hardware and see if that works. If not, then I’d go into the registry in two places and delete the appropriate VID:PID locations.
Alternately, you could try another port on your machine. I think Windows will go through the process above for every port ONCE. So, maybe another port will give you a clean WinUSB driver.
It is working again, thanks!
The second registry path wouldn’t allow me purge it, to be precise the top entry “(Standard)” in each subkey refused. I ended up deleting everything around that.
The first device manager page still looks the same, with “(Undefined Vendor)”, but nevertheless the software can control the hardware again.
I haven’t changed anything with Zadig, was just looking.
OK! Thanks for the update, @IDC_Dragon