Hi,

I’m using PyUSB both on an Ubuntu and a Mac osX machine. The code on the Mac 
jkust works fine, it uses PyUSB to communicate to an D1Mini ESP8266 chip. This 
chip controls some LED using WLED.

If I run the same code on the Ubuntu side, I needed to sort out some issues:
-       Adjust permissions for the USB device
-       Add the user to DIALOUT group
-       Remove brltty-Service

As a result I was able to run the code without any error. Even when switching 
Debugging on, it gives me the very same result as compared to the Mac.

The problem is that the lights don’r react on the Ubuntu side, whereas 
everything works fine on the Mac side. I spent some hours searching for an 
explanation but couldn't see any reason. Boths implementations use libusb1.0, 
the only difference being that on Ubuntu it says to utilize libusb-1.0.so 
<http://libusb1.0.so/>.0 whereas on the Mac it says libusb-1.dylib

Both implementations state that they successfully passed the same amount of 
data to the USB device, no errors are shown on either side. Both sides run the 
exact same hardware (I switch it between the PCs)

My understanding is that once the data is transmitted to the USB device, the OS 
of the sending computer should not matter anymore, so I’m having no idea on 
where to search for a solution for this problem. 

Has anybody an idea on what I could check?

Here’s a debug output from the Mac but the Linux side looks exactly the same:

2024-04-07 17:36:42,699 DEBUG:usb.backend.libusb1:_LibUSB.__init__(<CDLL 
'/usr/local/lib/libusb-1.0.dylib', handle 7ff91832b330 at 0x10a9facc0>)
2024-04-07 17:36:42,709 INFO:usb.core:find(): using backend 
"usb.backend.libusb1"
2024-04-07 17:36:42,709 DEBUG:usb.backend.libusb1:_LibUSB.enumerate_devices()
2024-04-07 17:36:42,709 
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>)
2024-04-07 17:36:42,709 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.open_device(<usb.backend.libusb1._Device 
object at 0x10acc4980>)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.set_configuration(<usb.backend.libusb1._DeviceHandle
 object at 0x10a9fb560>, 1)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 1, 0, 0, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0, 0)
2024-04-07 17:36:42,710 
DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0)
2024-04-07 17:36:42,711 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,711 
DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 1, 0, 0, 0)
2024-04-07 17:36:42,711 
DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0, 0, 0)
2024-04-07 17:36:42,711 
DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device
 object at 0x10acc4980>, 0)
2024-04-07 17:36:42,711 
DEBUG:usb.backend.libusb1:_LibUSB.claim_interface(<usb.backend.libusb1._DeviceHandle
 object at 0x10a9fb560>, 0)
2024-04-07 17:36:42,712 
DEBUG:usb.backend.libusb1:_LibUSB.bulk_write(<usb.backend.libusb1._DeviceHandle 
object at 0x10a9fb560>, 2, 0, array('B', [123, 34, 111, 110, 34, 58, 116, 114, 
117, 101, 125]), 1000)
Bytes written: 11
2024-04-07 17:36:42,744 
DEBUG:usb.backend.libusb1:_LibUSB.release_interface(<usb.backend.libusb1._DeviceHandle
 object at 0x10a9fb560>, 0)
2024-04-07 17:36:42,744 
DEBUG:usb.backend.libusb1:_LibUSB.close_device(<usb.backend.libusb1._DeviceHandle
 object at 0x10a9fb560>)
2024-04-07 17:36:42,744 DEBUG:usb.backend.libusb1:_LibUSB._finalize_object()
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to