Skip to content

Linux and MacOS

QuantAsylum edited this page Apr 14, 2022 · 6 revisions

The QA402 software binaries are hosted on GitHub HERE. Theoretically, the images should run as-in on Linux and Mac under Mono. Most of the time, we’re used to downloading different images based on our platform (and sometimes there’s even an image for x32 and x64 machines). But the tools folks (Android, Java and DotNet) are working hard to make single image a real thing, from phones to desktop–it just all works with a single image. Now, that’s still some ways off (see MSFT MAUI for what is next up in the queue) but it’s helpful on background to understand where things are headed.

C# and DotNet and Mono enable most of this. And LibUSB is the other piece of the puzzle. On Windows, LibUsb relies on WinUSB. And with the QA402 and QA403, we’ve moved to a driverless install (the OS knows what to do based on advanced descriptors). And then for non-Windows platforms, LibUSB switches out the bottom half of the stack to whatever is needed and it just works.

If you’d like to try the QA40x software on Linux (and potentially MacOS), you can try the following steps:

Download the latest installation EXE from HERE. You will need to us a PC running Windows or potentially WINE to copy the directory structure from the install location. The root of the install location contains the QA40x.exe application, and there are two directories (one titled UserWeighting and another titled Documentation) that are needed.

The application will generate the latest suggested install script via the Help-> Generate Linux USB Install Script as shown below.

image

Since you can't get run the app yet, the script from Release 1.149 is shown below. The steps involve installing Mono, installing LibUSB, and making the USB VID:PID known to the OS. Depending on your platform, changes will probably be needed.

IMPORTANT: There are some issues related to updating the device firmware from Linux. If you are confronted with that option, note the current firmware version in the status bar of the application, decline the firmware update, and then switch to the latest release that supports that version of firmware (the firmware version for a given release is shown in the release notes for each version). That will ensure your new hardware can be run initially. Later, you can see the discussion related to permissions HERE and proceed accordingly.

# The steps needed to make the Audio Analyzer known to 
# Linux are shown below. You might need to tweak 
# depending on your platform. When a flash update is needed, the
# analyzer will re-attach to the system with a new VID:PID for the update.
# 
# Install MONO
# See https://www.mono-project.com/docs/getting-started/install/linux/
# When you try to run the EXE, if you see a note that mono could not load windows.form, then
# you might need to explicitly specify:
# sudo apt-get install mono-complete
# 
# Install LibUSB. This might be already installed. Alternately, you might need the dev build
# sudo apt-get install libusb-1.0-0
# sudo apt-get install libusb-1.0-0-dev
# 
# Make the hardware known to the OS. 
# The QA402 VID:PID is 0x16C0:4E37
# sudo sh -c 'echo "SUBSYSTEM ==\"usb\", ATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"4e37\", MODE=\"0666\"" > /etc/udev/rules.d/51-qa402.rules'
# The QA403 VID:PID is 0x16C0:4E39
# sudo sh -c 'echo "SUBSYSTEM ==\"usb\", ATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"4e39\", MODE=\"0666\"" > /etc/udev/rules.d/51-qa403.rules'
# The QA402 and QA403 use VID:PID of 0x1fc9:0x0022 when in bootloader mode
# sudo sh -c 'echo "SUBSYSTEM ==\"usb\", ATTRS{idVendor}==\"1fc9\", ATTRS{idProduct}==\"0022\", MODE=\"0666\"" > /etc/udev/rules.d/51-qa40xBootloader.rules'
# Review the file(s) we just wrote above
# cat /etc/udev/rules.d/51-qa402.rules
# cat /etc/udev/rules.d/51-qa403.rules
# cat /etc/udev/rules.d/51-qa40xBootloader.rules
# Tell the device manager to reparse the rules
# sudo udevadm control --reload-rules
Clone this wiki locally