Usb Video Camera On ARTIK

From Tizen Wiki
Jump to: navigation, search

« back to Tizen_On_ARTIK

UVC(Usb Video Camera) can be applied on ARTIK board

1. Check device
We tested "Logitech, Inc. Webcam C270" on ARTIK10.
Connect UVC to USB socket and check if detected properly first.
You can find dmesg during booting as bellows.

$ root:~> dmesg | grep video
...
[    2.996000] usbcore: registered new interface driver uvcvideo
[    3.268000] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
[    3.268000] usbcore: registered new interface driver uvcvideo
...

Also you can find device-node "video0" for UVC device.

root:~> ls -al /dev/v4l/by-id/
lrwxrwxrwx 1 root root 12 Jul 25 21:36 usb-046d_0825_82906010-video-index0 -> ../../video0

2. Execute
Execute Camera App in home screen, and check if pre-view can be seen.
Although device is installed successfully, you can see black-screen and can get journalctl log.

gstv4l2object.c:3235:gst_v4l2_object_set_format_full:<videosrc_src> error: Device '/dev/video101' cannot capture at 640x480

The log message shows that camera app tries to connect video101 device which is on-board camera module. It is caused from the ini environment for camera. Look into mmfw_camcorder.ini file

root:~> cat /etc/multimedia/mmfw_camcorder.ini
...
VideosrcElement = v4l2src | 1,1 | do-timestamp,1 | device,/dev/video101
...

We should change the device-node to /dev/video0 as bellows.

root:~> cat /etc/multimedia/mmfw_camcorder.ini
...
VideosrcElement = v4l2src | 1,1 | do-timestamp,1 | device,/dev/video0
...
  • Edit file without Viewer on Tizen

There is no Editor, but you can edit file in two ways.
First, Edit the file in host PC and push the file into target via SDB.
Second, Make the file using "cat" command as bellows.

→ copy overall text contents into clipboard.
root:~> cat > /etc/multimedia/mmfw_camcorder.ini
→ here, paste the clipboard.
→ Press return at last line
→ Escape with Ctrl+C


Finally, you can see Pre-View with Usb Video Camera in Camera application.