×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Second USB webcam doesn't work

  • Posts: 10
  • Thank you received: 0
Hello, I'm moving my setup from Windows to Ubuntu 16.04 on an HP laptop that has a built-in camera. I'd like to use Kstars/Ekos at least to autoguide, but connecting a second webcam to a USB port ( a Microsoft LifeCam HD-3000 ) and trying to access it via INDI indi_v4l2_ccd driver, doesn't work.

Webcams are recognized as UVC devices from Ubuntu and I don't have any problem in using both of them with the usual applications ( Skype, Cheese, ... )

ls -la of /dev gives :
crw-rw----+ 1 root video 81, 0 mar 19 11:02 video0
crw-rw----+ 1 root video 81, 1 mar 19 07:18 video1
where video0 is the built-in camera. Both cameras have the same permissions.

I installed INDI and all the available drivers from the repository :
sudo apt-add-repository ppa:mutlaqja/ppa
sudo apt-get update
sudo apt-get install libindi1 indi-bin

I installed Kstars/Ekos from the repository :
sudo apt-add-repository ppa:mutlaqja/ppa
sudo apt-get update
sudo apt-get install kstars-bleeding

Both applications/environments seem to work just fine.

After plugging in the USB webcam, I start Kstars and in the Tools menu -> Ekos I create a new profile "test" where the mode is "Local", autoconnect is "off" and Devices are "Telescope Simulator" for the mount and "V4L2 CCD" for the guider.
I save the profile.

I click on "Start INDI" and in the "Options" TAB of the V4L2 CCD , I set "Ports" to /dev/video0 (default). On the "Main Control" of the V4L2 CCD I click "Connect".
Connection goes green and a second line ( Expose ) shows up.
I click "Connect" to the Telescope Simulator" too.
Now Ekos shows the autoguide icon that I can click.

Clicking on "Capture" i correctly get an image from the built-in camera.
Indi Control Panel log reports :

2017-03-19T13:28:10: Capture of one frame (0 stacked frames) took 0.343403 seconds.
2017-03-19T13:27:35: Device configuration applied.
2017-03-19T13:27:35: Upload settings set to client only.
2017-03-19T13:27:35: Loading device configuration...
2017-03-19T13:27:34: Found intial Input "Camera 1", Format "YUYV 4:2:2", Size 640x480, Frame interval 1/24s
2017-03-19T13:27:34: V4L2 CCD Device is online. Initializing properties.

I disconnect and Stop INDI

To switch to the USB camera, I restart INDI. While VL2 CCD in Main Control is disconnected, I set /dev/video1 as device port.
Clicking “Connect” lights the Connection “Led” green.

Going to the autoguide tool, I click on “Capture” and nothing happens. The wheel-like icon spins forever. Indi Control Panel log this time reports :

2017-03-19T13:34:42: Using device manual exposure (max 20000.000000, required 10000.000000).
2017-03-19T13:34:26: Found intial Input "Camera 1", Format "YUYV 4:2:2", Size 640x480, Frame interval 383/1s
2017-03-19T13:34:26: V4L2 CCD Device is online. Initializing properties.

It seems that indi_v4l2_ccd reads some wrong value and has some problem to complete the acquisition. I tried to wait for 383 seconds as suggested from the wrong value in frame interval, but even after such a long time no image is captured.

Other than Kstars/Ekos, I tried PHD2 that shows a similar behaviour. Is there something I’m doing wrong in setting up and starting INDI ?

Any help is really appreciated !

Marco
7 years 1 week ago #15369

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
INDI version is : 1.4.1
uname -a gives : Linux mp 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Marco
7 years 1 week ago #15371

Please Log in or Create an account to join the conversation.

If you start V4L2 driver and put initially the /dev/video1, it still has the same issue?
7 years 1 week ago #15373

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
Yes, I tried that. I get the same behavior.
Thanks for your support !
7 years 1 week ago #15375

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
This is the complete log of a session :
2017-03-19T16:46:38: Using device manual exposure (max 20000.000000, required 10000.000000). 
2017-03-19T16:46:17: xioctl: ioctl 0xC0445624/VIDIOC_QUERYCTRL received errno 22 (Invalid argument) 
2017-03-19T16:46:17: Adding Zoom, Absolute -- min: 0 max: 10 step: 1 value: 39346200 
2017-03-19T16:46:17: Adding Tilt (Absolute) -- min: -201600 max: 201600 step: 3600 value: 39346200 
2017-03-19T16:46:17: Adding Pan (Absolute) -- min: -201600 max: 201600 step: 3600 value: 39346200 
2017-03-19T16:46:17: Adding Exposure (Absolute) -- min: 5 max: 20000 step: 1 value: 39346200 
2017-03-19T16:46:17: Adding menu  Exposure, Auto (item 3 set) 
2017-03-19T16:46:17: Adding menu item Aperture Priority Mode Aperture Priority Mode MENU002_OPT001 item 1 index 3 
2017-03-19T16:46:17: xioctl: ioctl 0xC02C5625/VIDIOC_QUERYMENU received errno 22 (Invalid argument) 
2017-03-19T16:46:17: Adding menu item Manual Mode Manual Mode MENU002_OPT000 item 0 index 1 
2017-03-19T16:46:17: xioctl: ioctl 0xC02C5625/VIDIOC_QUERYMENU received errno 22 (Invalid argument) 
2017-03-19T16:46:17: Adding Backlight Compensation -- min: 0 max: 10 step: 1 value: 39346200 
2017-03-19T16:46:17: Adding Sharpness -- min: 0 max: 50 step: 1 value: 39346200 
2017-03-19T16:46:17: Adding White Balance Temperature -- min: 2800 max: 10000 step: 1 value: 39346200 
2017-03-19T16:46:17: Adding menu  Power Line Frequency (item 1 set) 
2017-03-19T16:46:17: Adding menu item 60 Hz 60 Hz MENU001_OPT002 item 2 index 2 
2017-03-19T16:46:17: Adding menu item 50 Hz 50 Hz MENU001_OPT001 item 1 index 1 
2017-03-19T16:46:17: Adding menu item Disabled Disabled MENU001_OPT000 item 0 index 0 
2017-03-19T16:46:17: Adding switch  White Balance Temperature, Auto (On) 
2017-03-19T16:46:17: Adding Saturation -- min: 0 max: 200 step: 1 value: 39346200 
2017-03-19T16:46:17: Adding Contrast -- min: 0 max: 10 step: 1 value: 39346200 
2017-03-19T16:46:17: Adding Brightness -- min: 30 max: 255 step: 1 value: 39346200 
2017-03-19T16:46:17: xioctl: ioctl 0xC0445624/VIDIOC_QUERYCTRL received errno 22 (Invalid argument) 
2017-03-19T16:46:17: xioctl: ioctl 0xC02C5625/VIDIOC_QUERYMENU received errno 22 (Invalid argument) 
2017-03-19T16:46:17: xioctl: ioctl 0xC02C5625/VIDIOC_QUERYMENU received errno 22 (Invalid argument) 
2017-03-19T16:46:17: Found intial Input "Camera 1", Format "YUYV 4:2:2", Size 640x480, Frame interval 383/1s 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: xioctl: ioctl 0xC02C564A/VIDIOC_ENUM_FRAMESIZES received errno 22 (Invalid argument) 
2017-03-19T16:46:17: Current capture size is (0.)  640x480 
2017-03-19T16:46:17: Current Capture format is (0.) YUYV. 
2017-03-19T16:46:17: Current Video input(0.): Camera 1 
2017-03-19T16:46:17: V4L2 CCD Device is online. Initializing properties. 
2017-03-19T16:46:17: ioctl_set_format: current format 640x480 YUYV uncompressed (supported) 
2017-03-19T16:46:17: xioctl: ioctl 0xC02C564A/VIDIOC_ENUM_FRAMESIZES received errno 22 (Invalid argument) 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  10. (Discrete)  width 160 x height 120 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  9. (Discrete)  width 320 x height 240 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  8. (Discrete)  width 176 x height 144 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  7. (Discrete)  width 352 x height 288 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  6. (Discrete)  width 416 x height 240 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  5. (Discrete)  width 800 x height 600 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  4. (Discrete)  width 640 x height 360 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  3. (Discrete)  width 800 x height 448 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  2. (Discrete)  width 960 x height 544 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  1. (Discrete)  width 1280 x height 720 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  0. (Discrete)  width 640 x height 480 
2017-03-19T16:46:17:   Available Frame sizes/rates for this format: 
2017-03-19T16:46:17: 1. Motion-JPEG (MJPG) supported 
2017-03-19T16:46:17: xioctl: ioctl 0xC02C564A/VIDIOC_ENUM_FRAMESIZES received errno 22 (Invalid argument) 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  11. (Discrete)  width 1280 x height 800 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  10. (Discrete)  width 160 x height 120 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  9. (Discrete)  width 176 x height 144 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  8. (Discrete)  width 800 x height 600 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  7. (Discrete)  width 320 x height 240 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  6. (Discrete)  width 352 x height 288 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  5. (Discrete)  width 424 x height 240 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  4. (Discrete)  width 640 x height 360 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  3. (Discrete)  width 800 x height 448 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  2. (Discrete)  width 960 x height 544 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  1. (Discrete)  width 1280 x height 720 
2017-03-19T16:46:17: xioctl: ioctl 0xC034564B/VIDIOC_ENUM_FRAMEINTERVALS received errno 22 (Invalid argument) 
2017-03-19T16:46:17: 2/15 s,  
2017-03-19T16:46:17: 1/10 s,  
2017-03-19T16:46:17: 1/15 s,  
2017-03-19T16:46:17: 1/20 s,  
2017-03-19T16:46:17: 1/30 s,  
2017-03-19T16:46:17:     Frame intervals: 
2017-03-19T16:46:17:  0. (Discrete)  width 640 x height 480 
2017-03-19T16:46:17:   Available Frame sizes/rates for this format: 
2017-03-19T16:46:17: 0. YUYV 4:2:2 (YUYV) supported 
2017-03-19T16:46:17: Available Capture Image formats: 
2017-03-19T16:46:17: xioctl: ioctl 0xC014563B/VIDIOC_G_CROP received errno 22 (Invalid argument) 
2017-03-19T16:46:17: xioctl: ioctl 0x4014563C/VIDIOC_S_CROP received errno 25 (Inappropriate ioctl for device) 
2017-03-19T16:46:17: Resetting crop area to default 
2017-03-19T16:46:17: Crop capabilities: pixelaspect = 1 / 1 
2017-03-19T16:46:17: Crop capabilities: defrect = (top=0, left=0, width=640, height=480) 
2017-03-19T16:46:17: Crop capabilities: bounds = (top=0, left=0, width=640, height=480) 
2017-03-19T16:46:17: Current Video input: 0 
2017-03-19T16:46:17: 0. Camera 1 (type Composite/S-Video) 
2017-03-19T16:46:17: Available Inputs: 
2017-03-19T16:46:17:   V4L2_CAP_STREAMING 
2017-03-19T16:46:17:   V4L2_CAP_VIDEO_CAPTURE 
2017-03-19T16:46:17: Driver capabilities: 
2017-03-19T16:46:17:   bus; usb-0000:04:00.0-1 
2017-03-19T16:46:17:   card; Microsoft® LifeCam HD-3000 
2017-03-19T16:46:17: Driver uvcvideo (version 4.4.44) 
2017-03-19T16:46:04: Error: unable to open device. Cannot identify /dev/video1: 2, No such file or directory 
2017-03-19T16:45:29: Upload complete 
2017-03-19T16:45:29: Uploading file. Ext: fits, Size: 311040, sendImage? Yes, saveImage? No 
2017-03-19T16:45:29: Capture of one frame (0 stacked frames) took 0.343298 seconds. 
2017-03-19T16:45:29: read_frame: [0x2589ab0] decoding 614400-byte buffer 0x7f5a2a8a1000 cropset N 
2017-03-19T16:45:29: read_frame: frame exposure started -666.821 seconds ago 
2017-03-19T16:45:29: read_frame: buffer #0 dequeued from fd:3 
2017-03-19T16:45:29: read_frame: using MMAP to recover frame buffer 
2017-03-19T16:45:28: V4L2 base setcroprect 640x480 at (0, 0) 
2017-03-19T16:45:28: Requested CCD Frame is (  0,  0) (640 x 480) 
2017-03-19T16:45:14: Session log file /home/mp/.indi/logs/2017-03-19/indi_v4l2_ccd/indi_v4l2_ccd_16:44:30.log 
2017-03-19T16:45:11: Toggle Debug Level -- Driver Debug 
2017-03-19T16:44:58: Debug is enabled. 
2017-03-19T16:44:31: Device configuration applied. 
2017-03-19T16:44:31: Upload settings set to client only. 
2017-03-19T16:44:31: Loading device configuration... 
2017-03-19T16:44:30: Found intial Input "Camera 1", Format "YUYV 4:2:2", Size 640x480, Frame interval 1/24s 
2017-03-19T16:44:30: V4L2 CCD Device is online. Initializing properties.
7 years 1 week ago #15376

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
Error Number 22 is something I can fix ?
It seems there are many lines with this error in the log...

2017-03-19T16:46:17: xioctl: ioctl 0xC02C564A/VIDIOC_ENUM_FRAMESIZES received errno 22 (Invalid argument)

Any hint ?
7 years 1 week ago #15424

Please Log in or Create an account to join the conversation.

  • Posts: 226
  • Thank you received: 88
Hi,
The Error number 22 messages are normal, this is the way the v4l2 API is working: ask until it responds something other than 0.
I just tested the driver and also got those inappropriate values for every integer items: I suspect the issue is that we should use the V4L2_ G_EXT_CTRLS instead of the V4L2_G_CTRL ioctl when the underlying v4L2 driver offers extended controls. Will test. Done. Actually no: the indi driver is just printing a double value as an integer. There remains the problem of the framerate. Will check that later.
Now I've used a C920 Logitech webcam using the uvcvideo driver too and everything is still working as usual, I can set every number items (brightness, contrast, ...) and the driver is able to take exposure up to 10000.0 (1 sec which is the max for the cam) using the Exposure manual mode.
7 years 1 week ago #15440

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
Thanks you geehalel for your analysis, but I'm afraid I'm not completely understanding what's going on.
Do I have to correctly set some parameter(s) or do you have to modify the code ?
If you are in need of some additional testing from this side, I'm really willing to help !
7 years 1 week ago #15446

Please Log in or Create an account to join the conversation.

  • Posts: 226
  • Thank you received: 88
I have a look at the driver code: it seems that the driver fails to read the correct framerate using the VIDIOC_G_PARM ioctl when it connects the device. May you have a look to the output of the server (or launch indiserver indi_v4l2_ccd from a terminal and look messages from here) ? It should display an error if the VIDIOC_G_PARM fails.
Otherwise did you play with the frame rate settings in the capture tab and then test streaming ? That may set it correctly. Or try to run a capture program (qv4l2 or guvcview) before running indi. That may also initialize things correctly.
The last option I think of is to debug the uvcvideo module: sudo echo 0xffff > /sys/module/uvcvideo/parameters/trace
Then look at the log with journalctl -f (don't make long captures, there will be a lot of stuff there...).
7 years 6 days ago #15475

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
I've done some additional testing, as suggested.

I'm running Indiserver -vvv indi_v4l2_ccd in a terminal.

Starting Kstars -> Ekos -> IndiControlPanel and setting /dev/video1 as input camera
After connecting, I confirmed all values in the "Capture Options" Tab. Inputs is Camera1, Capture Format is YUYV 4:2:2, Capture Size is 640x480, Frame Interval is 1/20. Everything goes green.

Trying to acquire an image from Ekos CCD Tab, leads to a crash of Kstars. Indiserver shows a disconnection of the client.

This is the copy of the entire session from the terminal window ( quite long ). Hope it might give some clue. I'll do additional testing when I'll be back from work, this evening.
 
7 years 6 days ago #15502

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
Hi,
good news ... it seems that things start going the right way.

After trying some different values for the "Capture Options" parameters, setting Frame Interval at 1/15 with a Capture Size of 640 x 480 did the magics : Live Video in the CCD Tab acquires correctly and I can finally see a beautiful image of my bookshelf ...

It seems that now I can play with different settings and camera reacts as expected, like if something was reseted in the software chain.

Only remaining issue is in the way the image is showed in the autoguide window and saved in the fit file. In the autoguide window, image seems split in two parts, one clearer and one darker, like they were exposed differently. The underlying image , however, is geometrically correct.
In the fit file, the image has the same problem, but , additionally, has a geometry problem like it were out of sync.
An example fit file is attached.

I feel we are very close to the solution ...

Thanks, Marco
7 years 6 days ago #15507
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 226
  • Thank you received: 88
Looking at the log it seems that you set the input to camera then toggle image format to 160x120 and back to 640x480. The framerate then appears correct at 1/30s, whereas it was still 383/1 at the connection. If you know how to compile libindi, you could try to reactivate the VIDIOC_TRY_FMT in the libs/webcam/v4l2_base.cpp file in the ioctl_set_format function at line 284 : replace if (false) with if (true). It may leave some time to the hardware for initializing.
Concerning the image corruption this may be due to the setup time of the camera: as we capture the very first frame it may be corrupted. There was an option to drop frames but it is no more present. Maybe you could have a look at the uvcvideo driver site and faq . And try qv4l2 which can take snapshots and trace V4L2 ioctls.
7 years 5 days ago #15522

Please Log in or Create an account to join the conversation.

Time to create page: 1.900 seconds