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.

TI Sitara SK USB Camera /dev/videoX permission

HW: TI Sitara

SW: JB

Scenario 

  • When the USB webcam is connected and the camera application is executed the there is no image 
  • chmod 777 /dev/vidoe0
  • Execute the camera application, the image appears
  • Disconnect the camera and reconnect the camera, execute the camera application, once again no image

Question: What is the correct permission for /dev/vidoe0? So the camera works consistently.

thanks

  • Hi Mahendra,

    Normally when USB camera connected on boot up or connected first time after boot up, a device node "/dev/video0" gets created. The file uevent.am335xevm.rc defines permission 0666 to node "/dev/video0".

    When camera application started, the camera HAL opens "/dev/video0".

    Can you check what is the permission of /dev/video0 after boot up? This can be modified by  editing uevent.am335xevm.rc to assign 777 permission.

    When you disconnect camera and connect again, unfortunately kernel assigns "/dev/video1" and the camera HAL try to open "/dev/video0". This can be fixed by modifying camera HAL to retry opening /dev/video1 when opening /dev/video0 fails.

    Regards,

    Arun

  • @Arun,

    Thank you for the prompt response. 

    I changed the permission on uevent.am335xevm.rc to 777 for /dev/vidoe0. When I disconnect and reconnect the file permission for /dev/video0 comes up as 600.

    I have been changing permission manually to 777. It is not a big deal for now, like know more to understand this going forward

    Also for this particular  device /dev/video0 stays the same before and after connect and disconnect. 

    Anyhow which process/file calls uenvent.am335xevm.rc

    I also changed  /dev/video0 0777 system camera base on a recommendation on the web, but didn't see any change.

    Thank you

    Mahendra

  • @Arun,

    I recopied a pre-built image, and now it is working.

    I believe during the debugging process I would have changed file that was affecting the end result.

    Thank you for you support.

    Mahendra