This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLPLCR4500EVM: Problem sending commands to DLPLCR4500 using the Pyusb package on Ubuntu 20.04:

Part Number: DLPLCR4500EVM
Other Parts Discussed in Thread: DLPC350

In my setup. I'm trying to communicate with a DLPLCR4500 through he USB interface on a Ubuntu 20.04 machine. The following are the steps I've taken to debug the system,

I installed libusb using the following command:

sudo apt-get install build-essential libusb-1.0.0-dev libudev-dev

Upon sending commands through the USB interface, I got the following error:

usb.core.USBError: [Errno 13] Access denied (insufficient permissions) 

After some digging in the forums, I found out that I might need to add a udev rule to allow permission to the system to connect to the USB device. I added the udev rule, named 10-local.rules, in /etc/udev/rules.d/:

SUBSYSTEM=="USB", ATTRS{IdVendor}=="0451", MODE="0666"

This solution seemed to have worked since the following code ran without error:

#!/usr/bin/python
from usb.core import find

dev = find(idVendor=0x0451, idProduct=0x6401)
dev.reset()

When trying to send commands however, I now get the following error:

raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 16] Resource busy

Process finished with exit code 1

I've ran the exact same codes on a Windows 10 device, by installing libusb-win32 through Zadig, without any issues. I'm not sure where exactly the problem arises from. Any help would be appreciated.

  • Seyed,

    Are you able to communicate with the EVM using the LightCrafter GUI software? You should probably confirm that your EVM's basic functions are working first.

    https://www.ti.com/tool/DLPLCR4500EVM

    Regards,

    Philippe Dollo

  • Seyed,

    Were you able to test the above? Since your system works on Windows 10, you should probably check whether your USB driver is probably installed on Ubuntu, and the USB resource is being properly accessed (port open/close, etc.) through Python.

    I hope this helps.
    Regards,

    Philippe Dollo

  • Hey Philippe,

    Thanks for your response, and I apologize for the delayed response.

    the Lcr4500 EVM fails to detect the device, no matter what the USB driver is. I've tried this on multiple Windows 10 machines.

    I've switched to a Windows 10 Enterprise machine to continue my development. My end goal in this project is to use libusb in conjunction with Pyusb to send commands to Lcr4500 through the USB interface. I've been using the code from this repository to perform such tasks: github.com/.../pyCrafter4500

    When installing libusb (v1.2.6.0) as the driver for the USB interface (using Zadig), I get errors trying to use Pyusb. Many of the Pyusb methods i.e. set_configuration() and write(), fail to run under this USB Driver. When using  libusbK (v3.0.7.0), the previous errors resolve and I am able to send commands to the projector, but I end up getting projection artifacts i.e. flickering screen, and windows overlapping with each other.

    I'm not sure what I could do to remedy this problem. I'd appreciate any guidance you could give me.

    Best

    Navid

  • Navid,

    We are looking into your query and will get back to you before 09/16/20.

    Regards,

    Mayank

  • Hi Navid, 

    Please confirm if you are able to control the LCR4500 EVM normally using the LCR4500 EVM GUI software that is available on TI.com. Once you are able to do this, you can use the USBHID library (included in the GUI Source code) to communicate with the EVM. You can call this library from the python script you re developing.

  • Dear Hirak,

    The EVM GUI does not detect the projector. The 'connected' LED remains red, and controls are not configurable. I've tested this on multiple PCs. This issue regardless of the USB driver (libusb0, libusb-win32, or libusbK), or the USB port that the projector is connected to.

    Best

    Navid

  • Hello Navid,

    We are continuing to investigate why your LCR4500 EVM may not be connecting and will get back to you by Friday (9/18).

    Regards,

    Austin

  • Hi Navid, 

    Could you kindly restart your PC, and also the EVM and then check in Device Manager if the device is showing up under Human Interface Devices category? This device should work with standard Microsoft USB HID driver on Windows platforms.

  • Hey Hirak,

    The device doesn't show up under HID. This is after changing the driver to libusbK. Please advise on how I could return this to the original HID driver.

    Best

    Navid

  • Hi Navid, 

    Please uninstall the LIBUSBK or any custom USB Driver you have installed. Windows should detect the LCR4500 and install it automatically. No manual installation are required. If you are still unable to communicate to LCR4500 using the LCR4500 GUI, kindly try on another Windows PC/Using different USB cable.

  • Dear Hirak,

    I'm still unable to use the GUI with the projector. I've tried this on 4 Windows computers with 2 different USB cables.

    Since we last communicated, I've been able to resolve the flickering issue. When switching from video mode to pattern mode, Windows did not account for the change in resolution, causing artifacts to be displayed.

    Although I'm no longer in need of the GUI, It'd be a great tool to have during debugging phases of my experiments. I've been using the 4.0.0 version of the GUI. Is there another version you'd recommend trying out?

    Best

    Navid 

  • Hi Navid, 


    This sounds erratic. Are you currently switching between video mode and pattern mode using I2C Commands? If yes could you please check the FW version on your DLPC350 controller? The latest version of the GUI is 4.0.0 and it should work.