Hello indi people,

I have an old webcam Philips SPC 900 NC I have modified for long exposure using the led control (so called lxled mod).
I was using it for quite some time with indi and was happy about it despite I had to happy a rather ugly patch to the indi-v4l2-ccd driver to make it work. The patch can be found in this thread: www.indilib.org/forum/development/8752-i...borting-capture.html
I recently upgraded indi to 1.9.8 re-applied my patch and installed but then the long exposure mode stopped working when trying to start exposing in php2 (loop mode) I get the message below (translated from french):

Unsupported type or read error when loading FITS file

And the loop stops here. No other error from the console where indiserver runs:
indiserver -v indi_v4l2_ccd indi_simulator_telescope                                                                                                                       ✘ INT  1m 55s
2024-05-16T22:02:21: startup: indiserver -v indi_v4l2_ccd indi_simulator_telescope
2024-05-16T22:02:21: Driver indi_v4l2_ccd: pid=507965 rfd=6 wfd=6 efd=7
2024-05-16T22:02:21: Driver indi_simulator_telescope: pid=507966 rfd=8 wfd=8 efd=9
2024-05-16T22:02:21: listening to port 7624 on fd 5 
2024-05-16T22:02:21: Local server: listening on local domain at: @/tmp/indiserver
2024-05-16T22:02:21: Driver indi_simulator_telescope: HaAxis: TrackRate 1, trackingRateDegSec 15.041067 arcsec
2024-05-16T22:02:21: Driver indi_v4l2_ccd: Using default decoder 'Builtin decoder'
2024-05-16T22:02:21: Driver indi_v4l2_ccd:   Supported V4L2 formats are:
2024-05-16T22:02:21: Driver indi_v4l2_ccd: Y16                                                                        
2024-05-16T22:02:21: Driver indi_v4l2_ccd: NV21     
2024-05-16T22:02:21: Driver indi_v4l2_ccd: BA81                                                                       
2024-05-16T22:02:21: Driver indi_v4l2_ccd: YU12     
2024-05-16T22:02:21: Driver indi_v4l2_ccd: NV12        
2024-05-16T22:02:21: Driver indi_v4l2_ccd: YV12     
2024-05-16T22:02:21: Driver indi_v4l2_ccd: BYR2                                                                       
2024-05-16T22:02:21: Driver indi_v4l2_ccd: RGB3     
2024-05-16T22:02:21: Driver indi_v4l2_ccd: RGGB                                                                       
2024-05-16T22:02:21: Driver indi_v4l2_ccd: GRBG         
2024-05-16T22:02:21: Driver indi_v4l2_ccd: JPEG  
2024-05-16T22:02:21: Driver indi_v4l2_ccd: MJPG           
2024-05-16T22:02:21: Driver indi_v4l2_ccd: RGBO                                                                       
2024-05-16T22:02:21: Driver indi_v4l2_ccd: RGBP     
2024-05-16T22:02:21: Driver indi_v4l2_ccd: YVYU                                                                       
2024-05-16T22:02:21: Driver indi_v4l2_ccd: YUYV     
2024-05-16T22:02:21: Driver indi_v4l2_ccd: GREY           
2024-05-16T22:02:21: Driver indi_v4l2_ccd: VYUY     
2024-05-16T22:02:21: Driver indi_v4l2_ccd: UYVY                                                                       
2024-05-16T22:02:21: Driver indi_simulator_telescope: snooping on GPS Simulator.GEOGRAPHIC_COORD
2024-05-16T22:02:21: Driver indi_simulator_telescope: snooping on GPS Simulator.TIME_UTC
2024-05-16T22:02:21: Driver indi_simulator_telescope: snooping on Dome Simulator.DOME_PARK
2024-05-16T22:02:21: Driver indi_simulator_telescope: snooping on Dome Simulator.DOME_SHUTTER
2024-05-16T22:02:21: Driver indi_v4l2_ccd: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD
2024-05-16T22:02:21: Driver indi_v4l2_ccd: snooping on Telescope Simulator.EQUATORIAL_COORD
2024-05-16T22:02:21: Driver indi_v4l2_ccd: snooping on Telescope Simulator.TELESCOPE_INFO
2024-05-16T22:02:21: Driver indi_v4l2_ccd: snooping on Telescope Simulator.GEOGRAPHIC_COORD
2024-05-16T22:02:21: Driver indi_v4l2_ccd: snooping on Telescope Simulator.TELESCOPE_PIER_SIDE
2024-05-16T22:02:21: Driver indi_v4l2_ccd: snooping on SQM.SKY_QUALITY     
// When I connect using phd2 client
2024-05-16T22:02:41: Client 11: new arrival from 127.0.0.1:36214 - welcome!
2024-05-16T22:02:41: Driver indi_v4l2_ccd: VIDIOC_CROPCAP: Inappropriate ioctl for device
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Decoder usesoftcrop true
2024-05-16T22:02:41: Driver indi_v4l2_ccd: VIDIOC_ENUM_FRAMEINTERVALS: Invalid argument
2024-05-16T22:02:41: Driver indi_v4l2_ccd: VIDIOC_ENUM_FRAMEINTERVALS: Invalid argument
2024-05-16T22:02:41: Driver indi_v4l2_ccd: VIDIOC_ENUM_FRAMEINTERVALS: Invalid argument
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Decoder  set format: YU12 size 320x240 bpp 8
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Decoder: Colorspace is 8, using default ycbcr encoding and quantization
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Decoder allocBuffers cropping false
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Class User Controls
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Brightness
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
// enable the LXLED mode
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Contrast
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Saturation
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control White Balance, Automatic
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Menu items:
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Indoor (Incandescant Lighting) 
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Outdoor (Sunlight) Mode
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Indoor (Fluorescent Lighting) M
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Manual Mode
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Auto Mode
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Red Balance
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Blue Balance
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Gamma
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Exposure
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Gain, Automatic
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   boolean
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Gain
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Backlight Compensation
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   boolean
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Color Effects
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Menu items:
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   None
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   Black & White
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Band-Stop Filter
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   boolean
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Auto contour
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   boolean
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Contour
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Dynamic Noise Reduction
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Auto White Balance Speed
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Auto White Balance Delay
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   integer
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Save User Settings
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   button
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Restore User Settings
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   button
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Restore Factory Settings
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   button
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Class Flash Controls
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Strobe
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   button
2024-05-16T22:02:41: Driver indi_v4l2_ccd: Control Stop Strobe
2024-05-16T22:02:41: Driver indi_v4l2_ccd:   button
2024-05-16T22:02:42: Client 12: new arrival from 127.0.0.1:36222 - welcome!
// starting exposing in loop with a duration of 0.5s
2024-05-16T22:03:07: Driver indi_v4l2_ccd: Decoder  reset crop
2024-05-16T22:03:07: Driver indi_v4l2_ccd: Decoder allocBuffers cropping false
2024-05-16T22:03:07: Driver indi_v4l2_ccd: setlexstate to 2
2024-05-16T22:03:07: Driver indi_v4l2_ccd: setlexstate to 0

No error neither in the INDI console

Reverting to 1.9.7 makes the cam work again. After investigating a bit further I nailed down that particular commit: github.com/indilib/indi/commit/d3e668303...9e0e92f0680c4717e791
As it was introduced very late in this release I tried reverting it and the newly compiled package works nicely. However of course, further commits in 1.9.9 require that change and so I can't upgrade any further.
I took a look at the commit and on its own it just looks like fairly innocent change rename 2 functions and changing some of their arguments...
I have no idea why this messes up with the cam and I'm seeking for help fixing that. If possible I'd rather avoid another ugly patch so I'm more seeking for guidance/answers and better understand the problem, so I can hopefully try to fix it myself in the right way (despite my limited knowledge of C and hardware coding :-/ )

Let me know if specific information would be required

Read More...