Go Down

Topic: Take a picture whit Arduino Yun (Read 3849 times) previous topic - next topic

Zack91

Hello, i'm trying to take a picture with my Arduino Yun and web cam.

For this I have followed this guide:
http://www.lucadentella.it/en/2013/11/15/yun-colleghiamo-una-webcam-1/

But when i'm going to take a picture, i have this response:

Code: [Select]
root@Arduino:~# cd ..
root@Arduino:/# cd mnt/sda1/
root@Arduino:/mnt/sda1# fswebcam --save p1.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 352x288.
Error starting stream.
VIDIOC_STREAMON: No space left on device
Unable to use mmap. Using read instead.
Unable to use read.


When i connect my webcam device, i think it is recognized, here the system log:


.
.
.
Feb 14 13:19:35 Arduino kern.info kernel: [  512.560000] usb 1-1.1: USB disconnect, device number 3
Feb 14 13:19:38 Arduino kern.info kernel: [  515.360000] usb 1-1.1: new full-speed USB device number 5 using ehci-platform
Feb 14 13:19:38 Arduino kern.info kernel: [  515.490000] usb 1-1.1: not running at top speed; connect to a high speed hub
Feb 14 13:19:38 Arduino kern.info kernel: [  515.490000] usb 1-1.1: New USB device found, idVendor=18ec, idProduct=3290
Feb 14 13:19:38 Arduino kern.info kernel: [  515.490000] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 14 13:19:38 Arduino kern.info kernel: [  515.500000] usb 1-1.1: Product: USB2.0 PC CAMERA
Feb 14 13:19:38 Arduino kern.info kernel: [  515.500000] usb 1-1.1: Manufacturer: ARKMICRO
Feb 14 13:19:38 Arduino kern.info kernel: [  515.500000] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:3290)
Feb 14 13:19:38 Arduino kern.info kernel: [  515.510000] input: USB2.0 PC CAMERA as /devices/platform/ehci-platform/usb1/1-1/1-1.1/1-1.1:1.0/input/input2
Feb 14 13:21:43 Arduino kern.info kernel: [  640.050000] usb 1-1.1: USB disconnect, device number 5
Feb 14 13:21:56 Arduino kern.info kernel: [  653.090000] usb 1-1.1: new full-speed USB device number 6 using ehci-platform
Feb 14 13:21:56 Arduino kern.info kernel: [  653.220000] usb 1-1.1: not running at top speed; connect to a high speed hub
Feb 14 13:21:56 Arduino kern.info kernel: [  653.220000] usb 1-1.1: New USB device found, idVendor=18ec, idProduct=3290
Feb 14 13:21:56 Arduino kern.info kernel: [  653.220000] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 14 13:21:56 Arduino kern.info kernel: [  653.230000] usb 1-1.1: Product: USB2.0 PC CAMERA
Feb 14 13:21:56 Arduino kern.info kernel: [  653.230000] usb 1-1.1: Manufacturer: ARKMICRO
Feb 14 13:21:56 Arduino kern.info kernel: [  653.230000] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:3290)
Feb 14 13:21:56 Arduino kern.info kernel: [  653.240000] input: USB2.0 PC CAMERA as /devices/platform/ehci-platform/usb1/1-1/1-1.1/1-1.1:1.0/input/input3


Why ? What is the problem ?

Thanks for your attention.

lucad79

Hi Zack

that error normally means you have some issues with a device connected to your USB port: I got the same when I tried to use two webcams at the same time. What did you connect to the Yun? Only a webcam? Which is its manufacturer/model?
www.lucadentella.it

Zack91

I have connected one webcam (USB2.0 PC CAMERA by ARKMICRO) by usb port and sd.

The notebook has a camera but it should not detect it.

lucad79

run the
Code: [Select]
lsusb command and post the output... it seems from the dmesg you posted that the webcam is detected more than one time  :smiley-eek-blue:
www.lucadentella.it

Zack91


root@Arduino:~# lsusb
Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 18ec:3290 Arkmicro Technologies Inc.                              <=Camera
Bus 001 Device 003: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader



lucad79

well referring to this webpage:
http://www.ideasonboard.org/uvc/

your webcam should be supported by UVC: have you already installed all the required packages in Yun?
www.lucadentella.it

Zack91

#6
Feb 17, 2014, 10:14 am Last Edit: Feb 17, 2014, 10:52 am by Zack91 Reason: 1
Yes, the camera is supported and I installed the packages as indicated by the guide that i link in the first post.

On the internet I found information about the problem, it says that I have more than a webcam, but it is not.

Also I have found information that talks about the BW usb port, that the camera is not enough.

ideas ?

Thanks.

edit:
The porcess for steps:
Code: [Select]
root@Arduino:/mnt/sda1# fswebcam -v --save 1.jpg
main,1609: gd has no fontconfig support
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
src_v4l2_get_capability,87: /dev/video0 information:
src_v4l2_get_capability,88: cap.driver: "uvcvideo"
src_v4l2_get_capability,89: cap.card: "USB2.0 PC CAMERA"
src_v4l2_get_capability,90: cap.bus_info: "usb-ehci-platform-1.1"
src_v4l2_get_capability,91: cap.capabilities=0x84000001
src_v4l2_get_capability,92: - VIDEO_CAPTURE
src_v4l2_get_capability,103: - STREAMING
No input was specified, using the first.
src_v4l2_set_input,181: /dev/video0: Input 0 information:
src_v4l2_set_input,182: name = "Camera 1"
src_v4l2_set_input,183: type = 00000002
src_v4l2_set_input,185: - CAMERA
src_v4l2_set_input,186: audioset = 00000000
src_v4l2_set_input,187: tuner = 00000000
src_v4l2_set_input,188: status = 00000000
src_v4l2_set_pix_format,541: Device offers the following V4L2 pixel formats:
src_v4l2_set_pix_format,554: 0: [0x47504A4D] 'MJPG' (MJPEG)
Using palette MJPEG
Adjusting resolution from 384x288 to 352x288.
src_v4l2_set_mmap,693: mmap information:
src_v4l2_set_mmap,694: frames=4
src_v4l2_set_mmap,741: 0 length=202752
src_v4l2_set_mmap,741: 1 length=202752
src_v4l2_set_mmap,741: 2 length=202752
src_v4l2_set_mmap,741: 3 length=202752
Error starting stream.
VIDIOC_STREAMON: No space left on device
Unable to use mmap. Using read instead.
Unable to use read.

Yuntastic

It's probably because the yun usb can't provide sufficient power (I had the same problem and symptoms).

TRy using a powered hub - this one works great for me: http://www.amazon.co.uk/D-Link-DUB-H7-Port-USB-External/dp/B0002AFZVM

Go Up