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.

Interfacing USB camera with omap l138 lcdk kit

Other Parts Discussed in Thread: OMAPL138

I want to interface USB camera with the omap l138 lcdk kit,, when i am connecting the camera to the kit after booting the linux kernel in the serial terminal i am getting 

omapl138-lcdk login: root
root@omapl138-lcdk:~# usb 1-1: USB disconnect, device number 2
usb 1-1: new full speed USB device number 3 using ohci
usb 1-1: New USB device found, idVendor=046d, idProduct=0825
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=2
usb 1-1: SerialNumber: C1D14B60

for this i have seen the post from http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/328265/1143578.aspx#1143578 this link aftee that i have tried to enable the UVC support in the linux kernel but i am not able to do. 

  • Hi,

    Typically, If you got any kernel source, we have some standard steps to build,

    1) cleaning old builded files (clean & distclean commands)

    Note:

    Its one time only

    2) Do "defconfig" for your board (ex: omapl138_lcdk_defconfig)

    3) Compile kernel (this is equal to pre-built image bcz you have not changed anything)

    4) Now , Change choose the kernel drivers using "menuconfig"

    5) Recompile the kernel for latest changes (like UVC ),

    Ex:

    cd /root/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10

    make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    make clean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    make omapl138_lcdk_defconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    < Do the changes here >

    make uImage ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    I hope it helps.

    Please revert back if still you have issues.

    Ouptut logs should be like this,

    Arago Project http://arago-project.org omapl138-lcdk ttyS2

    Arago 2011.09 omapl138-lcdk ttyS2

    omapl138-lcdk login: root
    root@omapl138-lcdk:~# usb 1-1: new full speed USB device number 2 using ohci
    usb 1-1: New USB device found, idVendor=046d, idProduct=0825
    usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=2
    usb 1-1: SerialNumber: C1D14B60
    uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
    input: UVC Camera (046d:0825) as /devices/platform/ohci.0/usb1/1-1/1-1:1.0/input/input0

  • After running the command make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- this is the output coming in this it is saying permission denied

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    rm: cannot remove `./scripts/kconfig/.conf.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/zconf.tab.o': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/.textbox.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/.util.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/.inputbox.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/inputbox.o': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/.yesno.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/checklist.o': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/yesno.o': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/.checklist.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/textbox.o': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/menubox.o': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/util.o': Permission denied
    rm: cannot remove `./scripts/kconfig/lxdialog/.menubox.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/conf.o': Permission denied
    rm: cannot remove `./scripts/kconfig/.conf.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/.mconf.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/.mconf.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/.zconf.tab.o.cmd': Permission denied
    rm: cannot remove `./scripts/kconfig/mconf.o': Permission denied
    rm: cannot remove `./scripts/basic/.fixdep.cmd': Permission denied
    make: *** [clean] Error 123

  • and if i am giving this command with sudo permission then it is coming

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ sudo make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    [sudo] password for chandrakant:
    make: arm-arago-linux-gnueabi-gcc: Command not found
    CLEAN scripts/basic
    CLEAN scripts/kconfig
    CLEAN include/config
    CLEAN .config .config.old

  • Hi,

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ sudo make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    [sudo] password for chandrakant:
    make: arm-arago-linux-gnueabi-gcc: Command not found
    CLEAN scripts/basic
    CLEAN scripts/kconfig
    CLEAN include/config
    CLEAN .config .config.old

    Use "sudo su" for root permissions,

    then do the commands,

    Please ensure that you have exported the toolchain information on linux ubuntu host machine,

    Add the tool chain bin path in the last line of  bash.bashrc file.

    Ex:

    1) sudo su

    2) echo "export PATH=/home/titus/OMAP-L138-LCDK/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin:$PATH" >> /etc/bash.bashrc

    Note:

    Careful while editing basgrc file

    3)Command for update the bashrc file

    source /etc/bash.bashrc

    4) Terminal should be like this after "sudo su"

    Enter the arm-arago-linux-gnueabi-gcc command in terminal to  check whether the toolchain is exported or not.

    root@titus-desktop:/home/titus//ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10arm-arago-linux-gnueabi-gcc

     

    Please revert back if any

  • I have exported the tool chain with the help of following command after that i have tested that tool chain is exported

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ export PATH=$PATH:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin
    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ echo $PATH
    /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin
    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$

    But after that also commands are not working 

    Then i tried the commands given above then also 

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ sudo su
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# echo "export PATH='/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin:$PATH" >> /etc/bash.bashrc
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# source /etc/bash.bashrc
    bash: /etc/bash.bashrc: line 75: unexpected EOF while looking for matching `''
    bash: /etc/bash.bashrc: line 76: syntax error: unexpected end of file
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# arm-arago-linux-gnueabi-gcc
    arm-arago-linux-gnueabi-gcc: no input files
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10#

    What is the mistake i am doing??????

  • Hi,

    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# arm-arago-linux-gnueabi-gcc
    arm-arago-linux-gnueabi-gcc: no input files

    It seems to good configurations done for toolchain,

    Now try like this,

    and if i am giving this command with sudo permission then it is coming

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ sudo make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    [sudo] password for chandrakant:
    make: arm-arago-linux-gnueabi-gcc: Command not found
    CLEAN scripts/basic
    CLEAN scripts/kconfig
    CLEAN include/config
    CLEAN .config .config.old

    root@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10#make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    Let me know the results.

  • When i had run the following commands

    make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    make clean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    make omapl138_lcdk_defconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    then this happens

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ sudo su
    [sudo] password for chandrakant:
    bash: /etc/bash.bashrc: line 75: unexpected EOF while looking for matching `''
    bash: /etc/bash.bashrc: line 76: syntax error: unexpected end of file
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# exit
    exit
    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ su
    Password:
    bash: /etc/bash.bashrc: line 75: unexpected EOF while looking for matching `''
    bash: /etc/bash.bashrc: line 76: syntax error: unexpected end of file
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# make clean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# make omapl138_lcdk_defconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    HOSTCC scripts/basic/fixdep
    HOSTCC scripts/kconfig/conf.o
    SHIPPED scripts/kconfig/zconf.tab.c
    SHIPPED scripts/kconfig/zconf.lex.c
    SHIPPED scripts/kconfig/zconf.hash.c
    HOSTCC scripts/kconfig/zconf.tab.o
    HOSTLD scripts/kconfig/conf
    #
    # configuration written to .config
    #
    root@chandrakant-Lenovo-B560:/home/chandrakant/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10# make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    HOSTCC scripts/kconfig/lxdialog/checklist.o
    HOSTCC scripts/kconfig/lxdialog/inputbox.o
    HOSTCC scripts/kconfig/lxdialog/menubox.o
    HOSTCC scripts/kconfig/lxdialog/textbox.o
    scripts/kconfig/lxdialog/textbox.c: In function ‘print_line’:
    scripts/kconfig/lxdialog/textbox.c:323:9: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
    scripts/kconfig/lxdialog/textbox.c:323:6: warning: variable ‘y’ set but not used [-Wunused-but-set-variable]
    HOSTCC scripts/kconfig/lxdialog/util.o
    HOSTCC scripts/kconfig/lxdialog/yesno.o
    HOSTCC scripts/kconfig/mconf.o
    HOSTLD scripts/kconfig/mconf
    scripts/kconfig/mconf Kconfig


    Your configuration changes were NOT saved.

    but when i am trying to change the UVC it is not coming in the multimedia option in device drivers

  • Hi,

    chandrakant@chandrakant-Lenovo-B560:~/Desktop/ti-sdk-omapl138-lcdk-01.00.00/board-support/linux-3.1.10$ su
    Password:
    bash: /etc/bash.bashrc: line 75: unexpected EOF while looking for matching `''
    bash: /etc/bash.bashrc: line 76: syntax error: unexpected end of file


    This logs seems to be the problem while you editing the bashrc file.

    DO NOT RESTART the machine now until unless the bashrc file to be corrected.

    Ensure that you have given correct toolchain path.

    echo "export PATH=/home/titus/OMAP-L138-LCDK/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin:$PATH"   >>   /etc/bash.bashrc

    Change your toolchain path

    <LCDK install path> / ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin

  • how to remove this error i am not getting it

    bash: /etc/bash.bashrc: line 77: unexpected EOF while looking for matching `''
    bash: /etc/bash.bashrc: line 79: syntax error: unexpected end of file

    this is the error coming continuously when i am giving the sudo su command or su command

  • Hi,

    bash: /etc/bash.bashrc: line 77: unexpected EOF while looking for matching `''
    bash: /etc/bash.bashrc: line 79: syntax error: unexpected end of file

    This warnings seems to be you have edited/modified this  "bash.bashrc" file with unformatted strings.

    Please edit this file by good GUI editor and add the following command at last line.

    export PATH=<OMAPL138 LCDK install path /ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin:$PATH

    Ex:

    export PATH=/home/titus/OMAP-L138-LCDK/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/bin:$PATH

    Please let me know the results and further question if any.

  • when i am attaching the camera i am getting this

    omapl138-lcdk login: root

    root@omapl138-lcdk:~# usb 1-1: new full speed USB device number 2 using ohci
    usb 1-1: New USB device found, idVendor=0c45, idProduct=62f1
    usb 1-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
    usb 1-1: Product: USB 2.0 Camera
    usb 1-1: Manufacturer: Sonix Technology Co., Ltd.
    uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:62f1)
    input: USB 2.0 Camera as /devices/platform/ohci.0/usb1/1-1/1-1:1.0/input/input0

    now i have seen this post how to take image http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/328619/1145565.aspx#1145565

    but when i am giving command uvccapture then error is coming

    root@omapl138-lcdk:~# uvccapture
    ioctl querycontrol error 22
    root@omapl138-lcdk:~# ls
    snap.jpg
    root@omapl138-lcdk:~#

    and when i am seeing the image by removing sd card from the kit and then connecting with computer, when i am opening the image which is in the rootfs i am getting the error,i am attaching the snap shot

    what is the problem

  • Hi,

    root@omapl138-lcdk:~# uvccapture
    ioctl querycontrol error 22
    root@omapl138-lcdk:~# ls

    You should not get any errors while capturing the image.

    It seems to be the problem of resolution of your camera,

    Try this command to capture the low resolution images.

    root@omapl138-lcdk:~#uvccapture -x320 -y240  -v
    root@omapl138-lcdk:~#uvccapture -x640 -y480  -v

    Let us know the results.
  • now this error is coming

    root@omapl138-lcdk:~# uvccapture -x320 -y240 -v
    Using videodevice: /dev/video0
    Saving images to: snap.jpg
    Image size: 320x240
    Taking snapshot every 0 seconds
    Taking images using mmap
    Resetting camera settings
    ioctl querycontrol error 22
    Camera brightness level is 0
    Camera contrast level is 25
    Camera saturation level is 80
    ioctl querycontrol error 22
    Camera gain level is -1
    Saving image to: snap.jpg
    root@omapl138-lcdk:~#

  • Hi Marut,

    I think that you need to change the camera only,

    Some USB camera devices may not support for uvccapture,

    Anyway, I able to build mplayer successfully,

    So, You can use that,

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/328619.aspx

    Through mplayer , you can play the video file, streaming , video creating and taking screen shots etc.,