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.

dm816x with usb0 as device.

Hallo there,

I am trying to implement a webcam gadget through usb0 port. It creates a /dev/video0 device.

Though opening the device as below fails most of the times. Any ideas why this happens? Can autosuspend have to do anything with this?

const char* devname = "/dev/video0";

fd = open(devname, O_RDWR | O_NONBLOCK);

if (fd == -1) {
        printf("open %s failed: %s (%d)\n", devname, strerror(errno), errno);

The error message is:

open /dev/video4 failed: No such device (19)

Dm816x is configured with usb0 as device and usb1 as host according to http://processors.wiki.ti.com/index.php/Usbgeneralpage#One_port_as_host_and_other_port_as_Gadget_.28for_DM81XX.29

It is running linux 2.6.37.

Thanks,

Georgios

  • Hi

    To configure DM816x usb0 as device and usb1 as host, you must chose build usb for OTG mode, also you must build gadget driver as modules and do insmod of gadget modules for each port to enable the usb0 and usb1 port for respective configuration.

    Can you confirm, the webcam gadget modules are initialized.

    Regards

    Ravi B

  • Thank you for the reply.

    This happens as a consequence of loading the module. It is the module that creates the video device. The module is loaded successfully and I can also confirm that my gadget is detected by the host pc, though enumeration is prevented due to failing opening the device.

    Regards,

    Georgios