scriptorron / indi_pylibcamera

INDI libcamera driver made in Python
MIT License
11 stars 5 forks source link

binning 4 makes V1 camera to crash #40

Closed scriptorron closed 11 months ago

scriptorron commented 1 year ago

Since last OS update the V1 camera crashes when using binning 4.

scriptorron commented 1 year ago

driver log:

2023-06-21T08:08:04: Driver indi_pylibcamera: root-INFO- exposure settings: CameraSettings ExposureTime=0.5s, AGain=63.9375, FastExposure=False, DoRaw=True, ProcSize=(2592, 1944), RawMode={'size': (640, 480), 'true_size': (640, 480), 'camera_format': 'SGBRG10', 'bit_depth': 10, 'FITS_format': 'GBRG', 'binning': (4, 4), 'label': '640x480 GBRG 10bit'} 2023-06-21T08:08:04: Driver indi_pylibcamera: root-INFO- reconfiguring camera 2023-06-21T08:08:04: Driver indi_pylibcamera: [0:35:00.529403690] [8946] INFO Camera camera.cpp:1028 configuring streams: (0) 224x190-BGR888 (1) 640x480-SGBRG10 2023-06-21T08:08:04: Driver indi_pylibcamera: [0:35:00.530994484] [8942] INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-GB10 2023-06-21T08:08:04: Driver indi_pylibcamera: picamera2.picamera2-INFO- Configuration successful! 2023-06-21T08:08:04: Driver indi_pylibcamera: picamera2.picamera2-INFO- Camera started 2023-06-21T08:08:04: Driver indi_pylibcamera: root-INFO- camera started 2023-06-21T08:08:07: Driver indi_pylibcamera: [0:35:02.907890560] [8942] WARN V4L2 v4l2_videodevice.cpp:2007 /dev/video0[15:cap]: Dequeue timer of 2206000.00us has expired! 2023-06-21T08:08:07: Driver indi_pylibcamera: [0:35:02.908089222] [8942] ERROR RPI raspberrypi.cpp:1984 Unicam has timed out! 2023-06-21T08:08:07: Driver indi_pylibcamera: [0:35:02.908156683] [8942] ERROR RPI raspberrypi.cpp:1985 Please check that your camera sensor connector is attached securely. 2023-06-21T08:08:07: Driver indi_pylibcamera: [0:35:02.908216367] [8942] ERROR RPI raspberrypi.cpp:1986 Alternatively, try another cable and/or sensor.

scriptorron commented 11 months ago

It already crashes with the libcamera tools:

libcamera-still -r -o test.jpg --shutter 1000000 --gain 1 --awbgains 1,1 --immediate --mode 640:480:10:U

leads to:

[0:18:41.923984952] [5755]  INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[0:18:41.970539352] [5756]  INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media1 and ISP device /dev/media2
[0:18:41.970633442] [5756]  INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Stream configuration adjusted
[0:18:41.972360810] [5755]  INFO Camera camera.cpp:1033 configuring streams: (0) 2592x1944-YUV420 (1) 640x480-SGBRG10
[0:18:41.973042850] [5756]  INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-GB10
[0:18:47.087289835] [5756]  WARN V4L2 v4l2_videodevice.cpp:2007 /dev/video0[12:cap]: Dequeue timer of 5000000.00us has expired!
[0:18:47.087478405] [5756] ERROR RPI pipeline_base.cpp:1333 Camera frontend has timed out!
[0:18:47.087563218] [5756] ERROR RPI pipeline_base.cpp:1334 Please check that your camera sensor connector is attached securely.
[0:18:47.087642216] [5756] ERROR RPI pipeline_base.cpp:1335 Alternatively, try another cable and/or sensor.
ERROR: Device timeout detected, attempting a restart!!!

I made a bug report in libcamera bugzilla (https://bugs.libcamera.org/show_bug.cgi?id=195).

scriptorron commented 11 months ago

The V1 camera has a hardware issue. When using the same Pi with same cable but different V1 camera it works as expected.

scriptorron commented 11 months ago

Closing issue: reason was hardware fault.