dagargo / overwitch

JACK client for Overbridge devices
GNU General Public License v3.0
120 stars 14 forks source link

Overwitch error: can't find a matching device #33

Closed ScottGarman closed 2 years ago

ScottGarman commented 2 years ago

Hi there. Just a couple of weeks ago I had overwitch working with my Digitone on Ubuntu 20.04. I just recently performed a fresh Manjaro Linux install and I'm having issues getting it working again.

Using the latest current master build (f8e18a511ff49d83c9e9402bf1ca01c3d310bb1a), I get the following:

overwitch-cli -l
0: Digitone (ID 1935:0014) at bus 003, address 018

overwitch-cli -d Digitone
ERROR:engine.c:704:(ow_engine_init_from_bus_address): Error while opening device: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
ERROR:jclient.c:394:(jclient_init): Overwitch error: can't find a matching device

My OS has libusb 1.0.25-3 and libusb-compat 0.1.7-1 installed. Let me know if there's anything more I can add to this report to make it more useful.

ScottGarman commented 2 years ago

This seems related to https://github.com/dagargo/overwitch/issues/31 except that I'm still getting this error when I power on the Digitone after my computer is running.

dagargo commented 2 years ago

I know it's gonna sound weird but, can you do it in this order?

  1. Unplug and turn off everything.
  2. Start the computer.
  3. Start the Digitone and ensure it is in Overbridge mode.
  4. Plug the Digitone.
  5. Start Overwitch.

The reason for this test is that we believed in #31 that there is something bad in the USB enumeration process.

Do you know if the libusb version was different before?

ScottGarman commented 2 years ago

I'm getting the same behavior and error messages even when I perform everything in that order. As for Ubuntu 20.04, it appears to be using libusb 1.0.23, so they more or less match. Manjaro stable just released their new monthly updates, which moves to libusb 1.0.26, so I'll give that a spin this weekend as well.

ScottGarman commented 2 years ago

...and after that package update, still getting the same behavior with libusb 1.0.26.

dagargo commented 2 years ago

Don't know now I didn't understand the issue until now. The issue was a bug in the code that was causing it to print a totally misleading error message. However, the underlying USB error is still there.

See 9ceb9117e6a363d2234a66bce1246b8dec1e9e73 for the changes.

From here, I'm betting on that in fresh installations you all are having a permission issue. If I'm right, you'll probably see something like the following in the log.

ERROR:engine.c:705:(ow_engine_init_from_bus_address): Error while opening device: LIBUSB_ERROR_ACCESS

If this hypothesis is right, follow the instructions from the README.md regarding the udev devices. More specifically, this paragraph.

Some udev rules might need to be installed manually with sudo make install from the udev directory as they are not part of the install target. This is not needed when packaging or when distributions already provide them.

In previous versions, these udev rules were installed automatically but this is not the preferred way any more. See #26 for more information about this change.

Let me know if this solves anything for you.

@quimgil, I think it's exactly the same issue you're having.

ScottGarman commented 2 years ago

Yes! You are exactly right. With the latest code change, I do get the LIBUSB_ERROR_ACCESS error message instead. And this is due to the fact that I had forgotten to run make install from the udev directory since I had switched Linux distros and did a fresh install (which was pretty careless on my part, it's right there in the README).

Thanks again for spending time on this and being so responsive.

dagargo commented 2 years ago

That's great!

Happy to help.