×

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

Bi-monthly release with minor bug fixes and improvements

INDI LibCamera Driver

  • Posts: 113
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

When I attach KStars/Ekos to my indiserver driver works, but when I press capture button it crashes:
indiserver -v indi_libcamera_ccd 
2023-01-04T06:16:47: startup: indiserver -v indi_libcamera_ccd
2023-01-04T06:16:47: Driver indi_libcamera_ccd: pid=4933 rfd=6 wfd=6 efd=7
2023-01-04T06:16:47: listening to port 7624 on fd 5
2023-01-04T06:16:47: Local server: listening on local domain at: @/tmp/indiserver
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Telescope Simulator.EQUATORIAL_COORD
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Telescope Simulator.TELESCOPE_INFO
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Telescope Simulator.GEOGRAPHIC_COORD
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Telescope Simulator.TELESCOPE_PIER_SIDE
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Rotator Simulator.ABS_ROTATOR_ANGLE
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Focuser Simulator.ABS_FOCUS_POSITION
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on Focuser Simulator.FOCUS_TEMPERATURE
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on CCD Simulator.FILTER_SLOT
2023-01-04T06:16:48: Driver indi_libcamera_ccd: [19:03:09.181523222] [4933]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on CCD Simulator.FILTER_NAME
2023-01-04T06:16:48: Driver indi_libcamera_ccd: snooping on SQM.SKY_QUALITY
2023-01-04T06:16:48: Driver indi_libcamera_ccd: [19:03:09.262540175] [4937]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0
2023-01-04T06:17:04: Client 9: new arrival from 127.0.0.1:53984 - welcome!
2023-01-04T06:17:05: Client 10: new arrival from 127.0.0.1:53986 - welcome!
2023-01-04T06:17:38: Driver indi_libcamera_ccd: Running without preview window
2023-01-04T06:17:38: Driver indi_libcamera_ccd: Opening camera...
2023-01-04T06:17:38: Driver indi_libcamera_ccd: [19:03:58.505618538] [4935] FATAL IPAManager ipa_manager.cpp:109 Multiple IPAManager objects are not allowed
2023-01-04T06:17:38: Driver indi_libcamera_ccd: Backtrace:
2023-01-04T06:17:38: Driver indi_libcamera_ccd: 
2023-01-04T06:17:38: Driver indi_libcamera_ccd: read EOF
<delProperty device="LibCamera"/>
2023-01-04T06:17:38: Driver indi_libcamera_ccd: restart #0
2023-01-04T06:17:38: Driver indi_libcamera_ccd: pid=4954 rfd=7 wfd=7 efd=11
2023-01-04T06:17:38: Client 9: read EOF
2023-01-04T06:17:38: Client 9: shut down complete - bye!
2023-01-04T06:17:38: Client 10: read EOF
2023-01-04T06:17:38: Client 10: shut down complete - bye!
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Telescope Simulator.EQUATORIAL_COORD
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Telescope Simulator.TELESCOPE_INFO
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Telescope Simulator.GEOGRAPHIC_COORD
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Telescope Simulator.TELESCOPE_PIER_SIDE
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Rotator Simulator.ABS_ROTATOR_ANGLE
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Focuser Simulator.ABS_FOCUS_POSITION
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on Focuser Simulator.FOCUS_TEMPERATURE
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on CCD Simulator.FILTER_SLOT
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on CCD Simulator.FILTER_NAME
2023-01-04T06:17:38: Driver indi_libcamera_ccd: snooping on SQM.SKY_QUALITY
2023-01-04T06:17:38: Driver indi_libcamera_ccd: [19:03:59.105795000] [4954]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
2023-01-04T06:17:38: Driver indi_libcamera_ccd: [19:03:59.172564166] [4956]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
 
uname -a
Linux stellarmate 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux

This error happens on freshly rebooted system, so I'm really sure no other device is using camera.
Could it be some libcamera bug on 64 bit systems?

I'm using 64bit Stellarmate OS that is based on Bullseye.
@Anjo, @OUTTA, what OS version are you to using? Also my "Main control" tab is showing a lot less parameters than yours.
Last edit: 1 year 3 months ago by Simon.
1 year 3 months ago #89400
Attachments:

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

  • Posts: 113
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

@Anjo, I have made little change in your branch, INDILibCamera::Connect() method to get sensor size and pixel size from camera.

github.com/anjok/indi-3rdparty/commit/81...d060da020aafb068a482

It works on my imx477, can you see if it works for you too?
1 year 3 months ago #89409

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

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

I am using
Linux raspberrypi 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux

I will try to pull that now and test it on IMX462
1 year 3 months ago #89412

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

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

It seems fine, although default resolution is still max - 1937x1097 and that results in failure, despite device detecting correct frame ROI of 1920x1080:
Capture JPG works, exposure and gain works as per histogram
Capture DNG works, exposure and gain works as per histogram
Streaming crashes whole Kstars :)

but the issue I notice the most, we only get single channel(only red from RGB)
2023-01-04T12:18:22: [INFO] World Coordinate System is enabled. 
2023-01-04T12:18:22: [INFO] WCS_CONTROL.WCS_ENABLE -> 1 
2023-01-04T12:18:22: [INFO] Device configuration applied. 
2023-01-04T12:18:22: [INFO] LIMITS.LIMITS_PREVIEW_FPS -> 10.000000 
2023-01-04T12:18:22: [INFO] LIMITS.LIMITS_BUFFER_MAX -> 512.000000 
2023-01-04T12:18:22: [INFO] CCD_STREAM_RECORDER.SER -> 1 
2023-01-04T12:18:22: [INFO] RECORD_OPTIONS.RECORD_FRAME_TOTAL -> 30.000000 
2023-01-04T12:18:22: [INFO] RECORD_OPTIONS.RECORD_DURATION -> 1.000000 
2023-01-04T12:18:22: [INFO] CCD_STREAM_ENCODER.MJPEG -> 0 
2023-01-04T12:18:22: [INFO] CCD_STREAM_ENCODER.RAW -> 1 
2023-01-04T12:18:22: [INFO] Setting frame buffer size to 2073600 bytes. 
2023-01-04T12:18:22: [INFO] Frame ROI x:0 y:0 w:1920 h:1080 
2023-01-04T12:18:22: [INFO] CCD_BINNING.VER_BIN -> 1.000000 
2023-01-04T12:18:22: [INFO] CCD_BINNING.HOR_BIN -> 1.000000 
2023-01-04T12:18:22: [WARNING] Cannot subframe JPEG streams. 
2023-01-04T12:18:22: [INFO] Setting frame buffer size to 2073600 bytes. 
2023-01-04T12:18:22: [INFO] Frame ROI x:0 y:0 w:1920 h:1080 
2023-01-04T12:18:22: [INFO] CCD_FRAME.HEIGHT -> 1080.000000 
2023-01-04T12:18:22: [INFO] CCD_FRAME.WIDTH -> 1920.000000 
2023-01-04T12:18:22: [INFO] CCD_FRAME.Y -> 0.000000 
2023-01-04T12:18:22: [INFO] CCD_FRAME.X -> 0.000000 
2023-01-04T12:18:22: [INFO] CCD_TRANSFER_FORMAT.FORMAT_NATIVE -> 0 
2023-01-04T12:18:22: [INFO] CCD_TRANSFER_FORMAT.FORMAT_FITS -> 1 
2023-01-04T12:18:22: [INFO] CCD_CAPTURE_FORMAT.JPG -> 1 
2023-01-04T12:18:22: [INFO] CCD_CAPTURE_FORMAT.DNG -> 0 
2023-01-04T12:18:22: [INFO] CCD_COMPRESSION.INDI_DISABLED -> 1 
2023-01-04T12:18:22: [INFO] CCD_COMPRESSION.INDI_ENABLED -> 0 
2023-01-04T12:18:22: [INFO] CCD_FAST_TOGGLE.INDI_DISABLED -> 1 
2023-01-04T12:18:22: [INFO] CCD_FAST_TOGGLE.INDI_ENABLED -> 0 
2023-01-04T12:18:22: [INFO] Upload settings set to client only. 
2023-01-04T12:18:22: [INFO] UPLOAD_MODE.UPLOAD_BOTH -> 0 
2023-01-04T12:18:22: [INFO] UPLOAD_MODE.UPLOAD_LOCAL -> 0 
2023-01-04T12:18:22: [INFO] UPLOAD_MODE.UPLOAD_CLIENT -> 1 
2023-01-04T12:18:22: [INFO] LOG_OUTPUT.FILE_DEBUG -> 0 
2023-01-04T12:18:22: [INFO] LOG_OUTPUT.CLIENT_DEBUG -> 1 
2023-01-04T12:18:22: [INFO] LOGGING_LEVEL.LOG_DEBUG -> 0 
2023-01-04T12:18:22: [INFO] LOGGING_LEVEL.LOG_SESSION -> 1 
2023-01-04T12:18:22: [INFO] LOGGING_LEVEL.LOG_WARNING -> 1 
2023-01-04T12:18:22: [INFO] LOGGING_LEVEL.LOG_ERROR -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_DEBUG -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_SESSION -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_WARNING -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_ERROR -> 1 
2023-01-04T12:18:22: [INFO] POLLING_PERIOD.PERIOD_MS -> 1000.000000 
2023-01-04T12:18:22: [INFO] DEBUG.DISABLE -> 0 
2023-01-04T12:18:22: [INFO] DEBUG.ENABLE -> 1 
2023-01-04T12:18:22: [INFO] Loading device configuration... 
2023-01-04T12:18:22: [INFO] CONFIG_PROCESS.CONFIG_PURGE -> 0 
2023-01-04T12:18:22: [INFO] CONFIG_PROCESS.CONFIG_DEFAULT -> 0 
2023-01-04T12:18:22: [INFO] CONFIG_PROCESS.CONFIG_SAVE -> 0 
2023-01-04T12:18:22: [INFO] CONFIG_PROCESS.CONFIG_LOAD -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_DEBUG -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_SESSION -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_WARNING -> 1 
2023-01-04T12:18:22: [INFO] DEBUG_LEVEL.DBG_ERROR -> 1 
2023-01-04T12:18:22: [INFO] DEBUG.ENABLE -> 1 
2023-01-04T12:18:22: [INFO] UnitCellSize 2.900000 x 2.900000 
2023-01-04T12:18:22: [INFO] PixelArraySize 1937 x 1097 (actual 1936 x 1097) 
2023-01-04T12:18:22: [INFO] Setting frame buffer size to 2123792 bytes. 
2023-01-04T12:18:22: [INFO] Frame ROI x:0 y:0 w:1936 h:1097 
2023-01-04T12:18:22: [INFO] CONNECTION.CONNECT -> 1 
2023-01-04T12:18:21: [INFO] LOG_OUTPUT.FILE_DEBUG -> 0 
2023-01-04T12:18:21: [INFO] LOG_OUTPUT.CLIENT_DEBUG -> 1 
2023-01-04T12:18:21: [INFO] POLLING_PERIOD.PERIOD_MS -> 1000.000000 
2023-01-04T12:18:21: [INFO] LOGGING_LEVEL.LOG_DEBUG -> 0 
2023-01-04T12:18:21: [INFO] LOGGING_LEVEL.LOG_SESSION -> 1 
2023-01-04T12:18:21: [INFO] LOGGING_LEVEL.LOG_WARNING -> 1 
2023-01-04T12:18:21: [INFO] LOGGING_LEVEL.LOG_ERROR -> 1 
2023-01-04T12:18:21: [INFO] DEBUG_LEVEL.DBG_DEBUG -> 1 
2023-01-04T12:18:21: [INFO] DEBUG_LEVEL.DBG_SESSION -> 1 
2023-01-04T12:18:21: [INFO] DEBUG_LEVEL.DBG_WARNING -> 1 
2023-01-04T12:18:21: [INFO] DEBUG_LEVEL.DBG_ERROR -> 1 
2023-01-04T12:18:21: [INFO] Debug is enabled. 
2023-01-04T12:18:21: [INFO] DEBUG.DISABLE -> 0 
2023-01-04T12:18:21: [INFO] DEBUG.ENABLE -> 1 
1 year 3 months ago #89414

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

  • Posts: 113
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

I am using 
Linux raspberrypi 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux
 
I will try to pull that now and test it on IMX462


I guess FATAL IPAManager ipa_manager.cpp:109 Multiple IPAManager objects are not allowed crash is only related to 64 bit systems?
Could it be a libcamera bug?
Last edit: 1 year 3 months ago by Simon.
1 year 3 months ago #89415

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

  • Posts: 113
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

It seems fine, although default resolution is still max - 1937x1097 and that results in failure, despite device detecting correct frame ROI of 1920x1080:

That's strange on my imx477 it returns correct values 4056 x 3040.
1 year 3 months ago #89416

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

  • Posts: 113
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

I'm testing new indi_libcamera_ccd driver.
Is it normal that I get two welcome messages in LOG when I start EKOS from KStars with arrow button?
2023-01-11T09:01:01: Client 9: new arrival from 127.0.0.1:43488 - welcome!
2023-01-11T09:01:02: Client 10: new arrival from 127.0.0.1:43494 - welcome!

I'm wandering if this is somehow related to this error message and driver crash when I press "Capture a preview" button on EKOS/CCD tab?
2023-01-11T09:01:10: Driver indi_libcamera_ccd: [0:47:13.714290735] [4642] FATAL IPAManager ipa_manager.cpp:109 Multiple IPAManager objects are not allowed

I can't get pass this error no mater what I try :(.

@Anjo, @OUTTA, is "Capture a preview" in EKOS working for you?
1 year 3 months ago #89567

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

  • Posts: 74
  • Thank you received: 11

Replied by Anjo on topic INDI LibCamera Driver

Preview is working for both pics and streams, but apparently it doesn't matter if you change the exposure time. it's always the same image. Also it takes a *really* long time, for a 1s exposure, it takes > 10s to take a pic and some 5s to download. For longer exposures it's even worse.
1 year 3 months ago #89568

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

  • Posts: 74
  • Thank you received: 11

Replied by Anjo on topic INDI LibCamera Driver

Replying to myself... so apparently only when using DNG it stays the same image level regardless of settings. When you use JPG it uses the new values and stays on that for subsequent DNG captures... kind of annoying if you ask me.
1 year 3 months ago #89570

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

  • Posts: 113
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

Great Python app for testing capabilities of your camera using Libcamera:
github.com/raspberrypi/picamera2/blob/main/apps/app_full.py
1 year 3 months ago #89580

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

  • Posts: 113
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

@Anjo, how your line for libcamera version looks like when you start EKOS?
Mine is:
2023-01-16T14:12:39: Driver indi_libcamera_ccd: [0:16:03.207523515] [3440]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
GitHub version of libcamera is v0.0.3, mine is still v0.0.1. How do I switch to newer?
Last edit: 1 year 3 months ago by Simon.
1 year 3 months ago #89680

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

  • Posts: 74
  • Thank you received: 11

Replied by Anjo on topic INDI LibCamera Driver

I have this one currently as I was testing out the waveshare 16MP cam:

2023-01-16T16:46:29: Driver indi_libcamera_ccd: [94:02:55.876760888] [23473] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3897-c3c878a9

I did a sudo rpi-update and it stayed on this version.
1 year 3 months ago #89683

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

Time to create page: 0.979 seconds