×

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

Bi-monthly release with minor bug fixes and improvements

INDI LibCamera Driver

  • 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.

  • Posts: 112
  • Thank you received: 33

Replied by Simon on topic INDI LibCamera Driver

After updating to latest INDI 2.0.0 and KStars 3.6.3 and Stellarmate 1.7.5.

I get this after starting EKOS from KStars:
[2023-02-04T21:48:11.322 CET DEBG ][           org.kde.kstars.indi] - Starting INDI Driver "indi_libcamera_ccd"
[2023-02-04T21:48:11.387 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: startup: /usr/bin/indiserver -v -p 7624 -m 1024 -r 0 -f /tmp/indififoc938e0fd"
[2023-02-04T21:48:11.387 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: listening to port 7624 on fd 5"
[2023-02-04T21:48:11.387 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Local server: listening on local domain at: @/tmp/indiserver"
[2023-02-04T21:48:11.388 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: FIFO: start indi_simulator_telescope -n \"Telescope Simulator\""
[2023-02-04T21:48:11.389 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: With name: Telescope Simulator"
[2023-02-04T21:48:11.390 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: FIFO: Starting driver indi_simulator_telescope"
[2023-02-04T21:48:11.393 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_simulator_telescope: pid=1722 rfd=9 wfd=9 efd=10"
[2023-02-04T21:48:11.395 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_simulator_telescope: HaAxis: TrackRate 1, trackingRateDegSec 15.041067 arcsec"
[2023-02-04T21:48:11.395 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_simulator_telescope: snooping on GPS Simulator.GEOGRAPHIC_COORD"
[2023-02-04T21:48:11.396 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_simulator_telescope: snooping on GPS Simulator.TIME_UTC"
[2023-02-04T21:48:11.398 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_simulator_telescope: snooping on Dome Simulator.DOME_PARK"
[2023-02-04T21:48:11.399 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_simulator_telescope: snooping on Dome Simulator.DOME_SHUTTER"
[2023-02-04T21:48:11.400 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: FIFO: start indi_libcamera_ccd -n \"LibCamera\""
[2023-02-04T21:48:11.402 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: With name: LibCamera"
[2023-02-04T21:48:11.402 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: FIFO: Starting driver indi_libcamera_ccd"
[2023-02-04T21:48:11.403 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_libcamera_ccd: pid=1723 rfd=11 wfd=11 efd=12"
[b][2023-02-04T21:48:11.403 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_libcamera_ccd: indi_libcamera_ccd: error while loading shared libraries: libindidriver.so.1: cannot open shared object file: No such file or directory"
[/b][2023-02-04T21:48:11.403 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_libcamera_ccd: stderr EOF"
[2023-02-04T21:48:11.403 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_libcamera_ccd: read: Connection reset by peer"
[2023-02-04T21:48:11.403 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  "2023-02-04T20:48:11: Driver indi_libcamera_ccd: Terminated after #0 restarts."
[2023-02-04T21:48:11.404 CET DEBG ][           org.kde.kstars.indi] - INDI Server:  ""
[2023-02-04T21:48:11.405 CET CRIT ][           org.kde.kstars.indi] - INDI driver  "indi_libcamera_ccd"  crashed!
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.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux
 
apt list --installed | grep libcamera
 
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
 
indi-libcamera/unknown,now 1.0-stable~202211300958 arm64 [installed]
libcamera-apps/unknown,now 1.0-stable~202211161401 arm64 [installed]
libcamera-tools/unknown,now 1.0-stable~202211161314 arm64 [installed]
libcamera0/unknown,now 1.0-stable~202211161314 arm64 [installed,automatic]
python3-libcamera/unknown,now 1.0-stable~202211161314 arm64 [installed,automatic]
1 year 2 months ago #90211

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

Replied by Jasem Mutlaq on topic INDI LibCamera Driver

Thank you for the report, I'll check it later tonight.
1 year 2 months ago #90226

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 finally dared to install everything on StellarMate that has been sitting poor and alone on sd card for ages :D

So I first wanted to try Rpi Camera legacy, and that does not work, indi says no stack found despite turning legacy stack on in raspi-config.

Next was to build libcamera, that failed first due to
"Could NOT find Boost"
So I additionally ran:
sudo apt install build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev

@Jasem you might want to update root 3rd party readme too add boost.
Next error was Could not find DRM_LIBRARY using following names:drm

working on that now

OK I just commented that out, does not seem to create issues.
I got FITs record issues, i just checkedout previous commit and
Now I got this
/home/stellarmate/Projects/indi-3rdparty/indi-libcamera/indi_libcamera.cpp:206:37: error: \u2018INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _ISwitch]\u2019 is protected within this context
206 | bool raw = IUFindOnSwitchIndex(&CaptureFormatSP) == CAPTURE_DNG;
There are more errors but all related to PropertyBasic
Remember I am working on a clean, freshly updated StellarMate, with build guide from github.
Last edit: 1 year 2 months ago by Outta.
1 year 2 months ago #90389

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

  • Posts: 7
  • Thank you received: 1

Replied by Tino on topic INDI LibCamera Driver

Hello,

is there any news yet?
The driver hasn't worked for me yet.
1 year 2 months ago #90597

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

  • Posts: 27
  • Thank you received: 4
I can't speak about the C driver. But my Python driver ( github.com/scriptorron/indi_pylibcamera ) is running on 2 of my telescopes. On both telescopes I use a Raspberry Pi Zero with HQ cameraas main camera for long exposures. Both telescopes also have a 2nd Raspberry Pi with guiding cameras (V1 camera on one telescope and HQ camera on the second). I tested both setups successfully with KStars/EKOS (including field solver) and PHD2 running on a Linux laptop.

From time to time the cameras got stuck. Reason was insufficient power supply of the Raspberry Pi (USB cables have too much resistance!). I fixed that with a 5V voltage regulator directly at the Raspberry Pi.
1 year 2 months ago #90599

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

  • Posts: 112
  • Thank you received: 33

Replied by Simon on topic INDI LibCamera Driver

Ronald, your achievement with indi libcamera driver is really amazing. Can you share with us setup you are using it on?
1 year 2 months ago #90601

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 unable to run jour driver, it is mentioning something about stack :( do I need to add dtoverlay to. boot/config?
1 year 2 months ago #90604

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

  • Posts: 27
  • Thank you received: 4
I will make a Wiki on GitHub with more details about my setup and detailed installation instructions. When I am ready I will post the link in this forum.

@Outta: I did not need to enable something camera related in boot/config. But I am using Raspberry Pi OS Bullseye 32bit in the latest version. Stellarmate had an too old libcamera version last December.
1 year 2 months ago #90612

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

Replied by Jasem Mutlaq on topic INDI LibCamera Driver

libcamera nd libcamera-apps are both built from Git on StellarMate, so it's literally bleeding-edge. I tried today to get back into the driver, but still getting crashes. I think libcamera-apps should probably be updated to make it more friendly to 3rd party driver development so we don't have to create our own libcamera manager which appears to be causing an issue.
1 year 2 months ago #90613

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

  • Posts: 27
  • Thank you received: 4
I made the first pages on the indi_pylibcamera wiki ( github.com/scriptorron/indi_pylibcamera/wiki ). There is a long page about setting up the Raspberry Pi.
1 year 2 months ago #90625

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 still do not understand what camera do I select in ekos profile? I do not have indiPiCamera as an option.

This is the error, but since you said it wont work on StellarMate anyhow....

INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media4 and ISP device /dev/media2
2023-02-19T19:40:39: Driver ./indi_pylibcamera.py: root-INFO- found cameras: [{'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}]
2023-02-19T19:40:39: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client:
2023-02-19T19:40:39: Driver ./indi_pylibcamera.py: <getProperties version="1.7"/>
2023-02-19T19:40:39: Driver ./indi_pylibcamera.py:
2023-02-19T19:40:39: Driver ./indi_pylibcamera.py: root-INFO- End client data
2023-02-19T19:45:10: Client 9: new arrival from 127.0.0.1:42400 - welcome!
2023-02-19T19:45:10: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client:
2023-02-19T19:45:10: Driver ./indi_pylibcamera.py: <getProperties version="1.7"/>
2023-02-19T19:45:10: Driver ./indi_pylibcamera.py:
2023-02-19T19:45:10: Driver ./indi_pylibcamera.py: root-INFO- End client data
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client:
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: <newSwitchVector device="indi_pylibcamera" name="CONNECTION">
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: <oneSwitch name="CONNECT">
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: On
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: </oneSwitch>
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: </newSwitchVector>
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py:
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: root-INFO- End client data
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: root-INFO- connecting to camera /base/soc/i2c0mux/i2c@1/imx477@1a
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: root-INFO- closing camera
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: root-INFO- closing camera
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: root-INFO- opening camera
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: [21:46:26.384960535] [2998] INFO Camera camera_manager.cpp:299 libcamera v0.0.1
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: [21:46:26.446112781] [3011] INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media4 and ISP device /dev/media2
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: picamera2.picamera2-ERROR- Camera __init__ sequence did not complete.
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: Traceback (most recent call last):
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 242, in __init__
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: self._open_camera()
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 434, in _open_camera
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: if not self._initialize_camera():
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 417, in _initialize_camera
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: self.sensor_resolution = (raw_mode.size.width, raw_mode.size.height)
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: RuntimeError: Non-owning holder (loaded_as_shared_ptr).
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py:
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: During handling of the above exception, another exception occurred:
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py:
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: Traceback (most recent call last):
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/home/stellarmate/Projects/indi_pylibcamera/././indi_pylibcamera.py", line 1155, in <module>
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: device.run()
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/home/stellarmate/Projects/indi_pylibcamera/indidevice.py", line 728, in run
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: self.message_loop()
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/home/stellarmate/Projects/indi_pylibcamera/indidevice.py", line 707, in message_loop
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: vector.set_byClient(values)
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/home/stellarmate/Projects/indi_pylibcamera/././indi_pylibcamera.py", line 124, in set_byClient
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: if self.parent.openCamera():
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/home/stellarmate/Projects/indi_pylibcamera/././indi_pylibcamera.py", line 783, in openCamera
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: self.CameraThread.openCamera(CameraIdx)
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/home/stellarmate/Projects/indi_pylibcamera/././indi_pylibcamera.py", line 370, in openCamera
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: self.picam2 = Picamera2(idx)
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 249, in __init__
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: raise RuntimeError("Camera __init__ sequence did not complete.")
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: RuntimeError: Camera __init__ sequence did not complete.
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: stderr EOF
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: read EOF
<delProperty device="indi_pylibcamera"/>
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: restart #0
2023-02-19T19:45:11: Driver ./indi_pylibcamera.py: pid=3016 rfd=7 wfd=7 efd=10
2023-02-19T19:45:11: Client 9: read EOF
2023-02-19T19:45:11: Client 9: shut down complete - bye!
2023-02-19T19:45:12: Driver ./indi_pylibcamera.py: [21:46:27.540194573] [3016] INFO Camera camera_manager.cpp:299 libcamera v0.0.1
2023-02-19T19:45:12: Driver ./indi_pylibcamera.py: [21:46:27.593878773] [3017] INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media4 and ISP device /dev/media2
2023-02-19T19:45:12: Driver ./indi_pylibcamera.py: root-INFO- found cameras: [{'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}]
2023-02-19T19:45:12: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client:
2023-02-19T19:45:12: Driver ./indi_pylibcamera.py: <getProperties version="1.7"/>
2023-02-19T19:45:12: Driver ./indi_pylibcamera.py:
2023-02-19T19:45:12: Driver ./indi_pylibcamera.py: root-INFO- End client data
1 year 1 month ago #90684

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

Time to create page: 1.294 seconds