×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

webcam / indi_v4l2_ccd get stuck

  • Posts: 45
  • Thank you received: 6
So DSLR and mount are running nicely on INDI on an RPi2, last thing to get to work is guiding.
I use a webcam (PCVC840 acting as SPC900) and the indi_v4l2_ccd driver. PHD2 runs locally on the RPi2, using INDI to access the webcam.

All seems fine, driver connects, I can change settings etc and I can start the image capture loop, but at some point the chain stops. The final message from the indi server is:
2016-01-21T13:28:31: Driver indi_v4l2_ccd: VIDIOC_STREAMON error 32, Broken pipe

At the same time some system messages are logged, dmesg gives:
[  136.268946] Transfer to device 6 endpoint 0x5 frame 1876 failed - FIQ timed out. Data may have been lost.
[  136.277974] pwc: Iso frame 0 has error -63
[  141.628389] pwc: Failed to set LED on/off time (-32)
[  142.138539] pwc: Failed to set LED on/off time (-32)
[  142.138752] pwc: send_video_command error -32
[  142.138767] pwc: Failed to set video mode VGA@15 fps; return code = -32
[  142.139114] pwc: Failed to set LED on/off time (-32)

Does anybody have a clue on what's happening? It seems that the webcam device driver gets stuck, and the interface to the indi_v4l2_ccd service is shut down...
8 years 2 months ago #6733

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

  • Posts: 72
  • Thank you received: 21
Quite strange error. As the driver can't communicate to the device anymore. Only idea from my side is to ask you if you're connect via USB directly to the RPi ? Usually better to use powered USB hub to avoid a lot of strange error.
Philippe
Philippe Besson
Skywatcher HEQ5, Televue 101-IS, Takahashi FS-60CB
Focus Boss II with OptecInc TCF-S focuser and Starlight Instruments HSM20 handy stepper motor
Guiding camera ZWO ASI120MM
Filterwheel OptecInc IFW
Camera not set yet
Switzerland
8 years 2 months ago #6734

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

  • Posts: 45
  • Thank you received: 6
Apparently it has to do with a USB issue, the function usb_control_msge() in the PWC driver gets an error and as a result the connection to the webcam is lost.
I am not sure whether it is actually a HW problem, since I am using a Pi2, which is supposed to have a better USB implementation. Other USB devices seem to work fine.

Yesterday I had it running for 7 hours before it got stuck. I have changed the settings so that it only gets a snapshot every few seconds.
8 years 2 months ago #6765

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

  • Posts: 314
  • Thank you received: 34
do you use any usb extension cables? Or maybe an USB device on your rp2 sucks to much power from the rp2 (then try an seperate powered usb hub)*. I had a lot of connection issues with my DSLR-USB cable. You could try to replace cables, change usb port, or just test the camera alone without any other usb-devices to trace down the problem. Sometimes its just the wrong usb port. That sounds stupid but for my setup I am shure one specific usb port doesnt like my wlan stick.

*If I remember correctly proper grounding can also be a matter (potential equalization between mount and rp2)
--= human, without Windows™ =--
pls excuse my bad english! :)
8 years 2 months ago #6770

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

  • Posts: 45
  • Thank you received: 6
I am pretty sure now that it is the USB interface. It may be the cable, but I would be very disappointed about USB when this is the case, camera runs fine on a laptop. I doubled the USB power to 1.2W, which didn't help either.
What I do suspect is a non-resilient or plain shaky driver implementation, either the PWC (webcam) driver or the USB layer or the bad chemistry between the two. I think you don't notice as long as things are quiet, but when you start loading the HW with other processes glitches start to happen.

The 4 USB ports are equipped with keyboard, mouse, WLAN and the webcam. The RPi2 is running Ubuntu Mate 15.10, with full GUI.
PHD2 or lin_guider is running on one display, with 320x240 image size, which can be OK for hours. Lin_guider seems smoother and able to capture higher image rates probably because there is no INDI in between.
Things tend to go wrong however when I either start using e.g. Firefox on the other display or when I increase the image size in the guider.

I would be very interested to know whether somebody has got a webcam (esp. Philips) running on a Pi, and even more in how this was managed.

Edit: there is no mount connected yet, nor the DSLR, just the webcam and the guider SW....
Last edit: 8 years 2 months ago by Arjan.
8 years 2 months ago #6771

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

  • Posts: 314
  • Thank you received: 34
I just stumbled upon some posts mentioning similar error message:
www.forum-raspberrypi.de/Thread-raspbian-syslog-laeuft-voll
github.com/raspberrypi/linux/issues/624

an suggestion was to setin /boot/cmdline.txt but dont ask me what it actually does... I have no clue
could be some kind of kernel problem
--= human, without Windows™ =--
pls excuse my bad english! :)
The following user(s) said Thank You: Arjan
8 years 2 months ago #6772

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

  • Posts: 45
  • Thank you received: 6
Thanks for the suggestions.
The German one has to do with ever growing syslog,
The github one has to do with masking off certain USB interrupts. I could give it a try, but it boils down to ignoring something is wrong...

I am running another test with lin_guider in 320x240 mode, doing nothing else. Still runs after a couple of hours. I would rather use PHD2 though, ARM / INDI version by Patrick Chevalley, which can do the guiding directly through the INDI/EQMod device. Maybe I need to dedicate my second Pi to guiding and use the other one for the rest and the INDI server ...
8 years 2 months ago #6773

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

Time to create page: 0.269 seconds