devDucks / astroarch

ArchLinux for astrophotography - made for raspberrypis, can run also on x64 machines
MIT License
60 stars 7 forks source link

Raspberry Pi High Quality Camera on AstroArch #71

Closed Olli781 closed 6 months ago

Olli781 commented 8 months ago

Hello everyone, I have successfully installed AstroArch on my Raspberry Pi 5 and everything is working well so far. Now I would like to use the Raspberry Pi High Quality Camera. Unfortunately this is not recognized in Kstars/EKOS. Also the command

libcamera-hello --list-cameras

does not show any camera. Does anyone have an idea how to activate the camera?

Tanks very much, Oliver

MattBlack85 commented 8 months ago

hi @Olli781 I am not sure about the problem here, I don't have a pi camera myself but I am willing to help you troubleshoot.

The package on astroarch is pretty old and I would start from compiling the latest version, after that you can upgrade and we can check if it was just that, if not we will check further.

In the meanwhile, can you report what v4l2-ctl --list-devices command says?

Olli781 commented 8 months ago

Hello Mattia, First of all, thank you very much for your help. As suggested, I updated all packages. Unfortunately the camera is still not working. Attached is the result of the command: v4l2-ctl --list-devices

astronaut@astroarch pispbe (platform:1000880000.pisp_be): /dev/video20 /dev/video21 /dev/video22 /dev/video23 /dev/video24 /dev/video25 /dev/video26 /dev/video27 /dev/video28 /dev/video29 /dev/video30 /dev/video31 /dev/video32 /dev/video33 /dev/video34 /dev/video35 /dev/video36 /dev/video37 /dev/media1 /dev/media2

rp1-cfe (platform:1f00128000.csi): /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/video4 /dev/video5 /dev/video6 /dev/video7 /dev/media0

It seems that the camera is recognized by Raspberry PI on the CSI port. Unfortunately, the "libcamera-hello" command doesn't work either.

Attached is an excerpt from my config.txt. I have added the passage in bold:


For more options and information see:

http://rptl.io/configtxt

initramfs initramfs-linux.img followkernel

Uncomment some or all of these to enable the optional hardware interfaces

dtparam=i2c_arm=on

dtparam=i2s=on

dtparam=spi=on

Additional overlays and parameters are documented

/boot/firmware/overlays/README

Automatically load overlays for detected cameras

camera_auto_detect=1

Automatically load overlays for detected DSI displays

display_auto_detect=1

Enable DRM VC4 V3D driver

dtoverlay=vc4-fkms-v3d max_framebuffers=2 framebuffer_depth=24

Uncomment if hdmi display is not detected and composite is being output

hdmi_force_hotplug=1

Uncomment if you want to disable wifi or bluetooth respectively

dtoverlay=disable-wifi

dtoverlay=disable-bt

Uncomment this to enable infrared communication.

dtoverlay=gpio-ir,gpio_pin=17

dtoverlay=gpio-ir-tx,gpio_pin=18

Run as fast as firmware / board allows

arm_boost=1

[cm4]

Enable host mode on the 2711 built-in XHCI USB controller.

This line should be removed if the legacy DWC2 controller is required

(e.g. for USB device mode) or if USB support is not required.

otg_mode=1

[all] dtparam=i2c_arm=on dtparam=audio=on disable_overscan=1 gpu_mem=256 start_file=start_x.elf fixup_file=fixup_x.dat initramfs initramfs-linux.img followkernel cma_lwm= cma_hwm= cma_offline_start= disable_splash=1 3dtparam=krnbt=on hdmi_drive=2 dtoverlay=i2c-rtc [pi5] dtparam=rtc_bbat_vchg=3000000


Best regards, Oliver

MattBlack85 commented 8 months ago

sorry @Olli781 , I didn't explain myself in a good way :) I must provide new packages for that to work.

I am investigating deeper this topic and I think I understand why you can't find your camera at the moment. The version of libcamera we use is the "normal" one which doesn't have any change for the raspberry (this is an over simplification, it has some, but not others). I am banging my head trying to compile the raspberry pi version of libcamera and have it fitting the system but it's a trial and errors thing and compiling that stuff on a raspberry is gargantually slow :snail:

I really hope I can come back to you in few days with a working solution, looking at how libcamera is packaged for Arch gives me a lot of headaches but I think at the end I'll be able to find a way to achieve the goal

MattBlack85 commented 8 months ago

hi again @Olli781

I cracked the compilation and it seems my trick works, can you try to run the following commands and report back if the camera is recognized? Please reboot the pi after installing the packages and before calling the camera

wget http://astromatto.com:9000/aarch64/libcamera-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/libcamera-docs-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/libcamera-ipa-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/libcamera-tools-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/rpicam-apps-1.4.3-1-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/gst-plugin-libcamera-0.2.0-2-aarch64.pkg.tar.xz
sudo pacman -U gst-plugin-libcamera-0.2.0-2-aarch64.pkg.tar.xz libcamera-0.2.0-2-aarch64.pkg.tar.xz libcamera-docs-0.2.0-2-aarch64.pkg.tar.xz libcamera-ipa-0.2.0-2-aarch64.pkg.tar.xz libcamera-tools-0.2.0-2-aarch64.pkg.tar.xz rpicam-apps-1.4.3-1-aarch64.pkg.tar.xz && sudo pacman -S libpisp

Please note the the package rpicams-apps provides both libcamera-* and rpicam-* as valid binaries

Olli781 commented 8 months ago

Hi Mattia, thank you for the fast feedback. I was able to download the packages. However, when running the Pacman command I get the following error message:

_[root@astroarch ~]# pacman -U gst-plugin-libcamera-0.2.0-2-aarch64.pkg.tar.xz libcamera-0.2.0-2-aarch64.pkg.tar.xz libcamera-docs-0.2.0-2-aarch64.pkg.tar.xz libcamera-ipa-0.2.0-2-aarch64.pkg.tar.xz libcamera-tools-0.2.0-2-aarch64.pkg.tar.xz rpicam-apps-1.4.3-1-aarch64.pkg.tar.xz loading packages... warning: gst-plugin-libcamera-0.2.0-2 is up to date -- reinstalling warning: libcamera-0.2.0-2 is up to date -- reinstalling warning: libcamera-docs-0.2.0-2 is up to date -- reinstalling resolving dependencies... looking for conflicting packages... warning: dependency cycle detected: warning: libcamera-ipa will be installed before its libcamera dependency

Packages (9) boost-1.83.0-5 boost-libs-1.83.0-5 gtest-1.14.0-1 gst-plugin-libcamera-0.2.0-2 libcamera-0.2.0-2 libcamera-docs-0.2.0-2 libcamera-ipa-0.2.0-2 libcamera-tools-0.2.0-2 rpicam-apps-1.4.3-1

Total Installed Size: 229.82 MiB Net Upgrade Size: 197.61 MiB

:: Proceed with installation? [Y/n] y (9/9) checking keys in keyring [----------------------------------------------------------------] 100% (8/9) checking package integrity [----------------------------------------------------------------] 100% (8/9) loading package files [----------------------------------------------------------------] 100% (9/9) checking for file conflicts [----------------------------------------------------------------] 100% error: failed to commit transaction (conflicting files) gtest: /usr/include/gmock/gmock-actions.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock-cardinalities.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock-function-mocker.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock-matchers.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock-more-actions.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock-more-matchers.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock-nice-strict.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock-spec-builders.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/gmock.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/internal/custom/README.md exists in filesystem (owned by phd2) gtest: /usr/include/gmock/internal/custom/gmock-generated-actions.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/internal/custom/gmock-matchers.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/internal/custom/gmock-port.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/internal/gmock-internal-utils.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/internal/gmock-port.h exists in filesystem (owned by phd2) gtest: /usr/include/gmock/internal/gmock-pp.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-assertion-result.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-death-test.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-matchers.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-message.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-param-test.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-printers.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-spi.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-test-part.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest-typed-test.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest_pred_impl.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/gtest_prod.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/custom/README.md exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/custom/gtest-port.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/custom/gtest-printers.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/custom/gtest.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-death-test-internal.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-filepath.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-internal.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-param-util.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-port-arch.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-port.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-string.h exists in filesystem (owned by phd2) gtest: /usr/include/gtest/internal/gtest-type-util.h exists in filesystem (owned by phd2) gtest: /usr/lib/cmake/GTest/GTestConfig.cmake exists in filesystem (owned by phd2) gtest: /usr/lib/cmake/GTest/GTestConfigVersion.cmake exists in filesystem (owned by phd2) gtest: /usr/lib/cmake/GTest/GTestTargets.cmake exists in filesystem (owned by phd2) gtest: /usr/lib/pkgconfig/gmock.pc exists in filesystem (owned by phd2) gtest: /usr/lib/pkgconfig/gmock_main.pc exists in filesystem (owned by phd2) gtest: /usr/lib/pkgconfig/gtest.pc exists in filesystem (owned by phd2) gtest: /usr/lib/pkgconfig/gtestmain.pc exists in filesystem (owned by phd2) Errors occurred, no packages were upgraded.

It appears that the existing packages are read-only. But maybe my Linux skills aren't enough either :-)

MattBlack85 commented 8 months ago

Oh, seems there are some duplicated files around, please as a quick test remove phd2 and retry that command, to remove it sudo pacman -R phd2 if you don't use it at all you can live without it.

Will try to fix the libcamera packages to avoid conflicts in the next days

Let me know if that works @Olli781

Olli781 commented 8 months ago

Hello Matt, we are a small step further. The libcamera-hello command works, but a library is still missing:

~ » libcamera-hello libcamera-hello: error while loading shared libraries: libpisp.so.1: cannot open shared object file: No such file or directory

Any idea how you can reinstall this?

MattBlack85 commented 8 months ago

@Olli781 forgive me, I installed that yesterday but forgot to add it to the commands, to install it

sudo pacman -Sy && sudo pacman -S libpisp

Olli781 commented 7 months ago

Hi Matt, first of all I have to apologize for the late reply. The command "libcamera-hello" works:

_Mode selection for 1640:1232:12:P SRGGB10_CSI2P,640x480/0 - Score: 4504.81 SRGGB10_CSI2P,1640x1232/0 - Score: 1000 SRGGB10_CSI2P,1920x1080/0 - Score: 1541.48 SRGGB10_CSI2P,3280x2464/0 - Score: 1718 SRGGB8,640x480/0 - Score: 5504.81 SRGGB8,1640x1232/0 - Score: 2000 SRGGB8,1920x1080/0 - Score: 2541.48 SRGGB8,3280x2464/0 - Score: 2718 Stream configuration adjusted [0:12:24.939976720] [1267] INFO Camera camera.cpp:1183 configuring streams: (0) 1640x1232-YUV420 (1) 1640x1232-BGGR16_PISP_COMP1 [0:12:24.940103590] [1268] INFO RPI pisp.cpp:1405 Sensor: /base/axi/pcie@120000 /rp1/i2c@80000/imx219@10 - Selected sensor format: 1640x1232-SBGGR101X10 - Sele cted CFE format: 1640x1232-PC1B dmaHeap allocation failure for rpicam-apps0 ERROR: failed to allocate capture buffers for stream

Only the preview doesn't work, but that's not a bad thing. The camera is not yet recognized under kstars. I think for this you still have to install the "indi pylibcamera - driver":

_https://github.com/scriptorron/indi_pylibcamera_

Is it possible under astroarch?

MattBlack85 commented 7 months ago

Hi @Olli781 great success! Indi pylibcamera is already available, you can try to install and have a go with sudo pacman -S indi_pylibcamera

I am not sure it works, this was compiled a long time ago, if you can test is tho and report back it is not working I will recompile a more recent version tomorrow 🙂

MattBlack85 commented 7 months ago

hi @Olli781 if you installed the package indi_pylibcamera I suggest to remove it using sudo pacman -R indi_pylibcamera and install the newest version with sudo pacman -Sy indi-pylibcamera

I recompiled a few packages and I added also the dev rule to allow video users to use the pi allocator (without sudo I couldn't get indi pylibcamera to work). indi pylibcamera seems to work(ish) although I am using a normal camera and it's failing with some weird error, maybe it will work with a pi camera?

Olli781 commented 7 months ago

Hey Matt, it partially works. If I use the command "indiserver -v indi_pylibcamera" the indi driver starts:

_2024-03-22T18:59:58: startup: indiserver -v indi_pylibcamera 2024-03-22T18:59:58: Driver indi_pylibcamera: pid=1395 rfd=6 wfd=6 efd=7 2024-03-22T18:59:58: listening to port 7624 on fd 5 2024-03-22T18:59:58: Local server: listening on local domain at: @/tmp/indiserve r 2024-03-22T18:59:59: Driver indi_pylibcamera: [0:03:54.891807630] [1395] ERROR I PAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found 2024-03-22T18:59:59: Driver indi_pylibcamera: [0:03:54.891831316] [1395] ERROR I PAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info 2024-03-22T18:59:59: Driver indi_pylibcamera: [0:03:54.891859318] [1395] INFO C amera camera_manager.cpp:284 libcamera v0.2.0 2024-03-22T18:59:59: Driver indi_pylibcamera: [0:03:54.902340682] [1397] INFO R PI pisp.cpp:662 libpisp version v1.0.4 2e1ad45c8f0e-dirty 19-03-2024 (12:49:28) 2024-03-22T18:59:59: Driver indi_pylibcamera: [0:03:54.914271682] [1397] INFO R PI pisp.cpp:1121 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 to CFE device /dev/media2 and ISP device /dev/media0 using PiSP variant BCM2712 _C0 2024-03-22T18:59:59: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- found cameras: [{'Model': 'imx219', 'Location': 2, 'Rotation': 180, 'Id': '/base /axi/pcie@120000/rp1/i2c@80000/imx219@10', 'Num': 0}] 2024-03-22T18:59:59: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO-selected logging level: LOGGINGINFO

Unter KSTARS the pylibcamera is also available. But when I chose the pylibcamera, KSTARS crashed. I'm trying to completely reinstall Astroach and see if it works. We are definitely getting closer to our goal :-)

MattBlack85 commented 7 months ago

I believe is the same error I am seeing then. Can you kindly turn on CCD logging and paste me the error?

For me it was python crashing because a prop INDI_RAW doesn't exist

Olli781 commented 7 months ago

Hi Matt, I tried another way: I started the Indi driver on the PI5 and then connected to the PI5 via my Windows computer and KSTARS. A connection is also established there:

_2024-03-23T08:51:40: [INFO] configuration /home/astronaut/.indipylibcamera/CONFIG1.json does not exist 2024-03-23T08:51:39: [INFO] camera properties: {'Model': 'imx219', 'UnitCellSize': (1120, 1120), 'ColorFilterArrangement': 0, 'Location': 2, 'Rotation': 180, 'PixelArraySize': (3280, 2464), 'PixelArrayActiveAreas': [(8, 8, 3280, 2464)], 'ScalerCropMaximum': (0, 0, 0, 0), 'SystemDevices': (20738, 20740, 20742, 20744, 20746, 20748, 20750, 20741, 20743, 20745, 20747, 20749)} 2024-03-23T08:51:39: [INFO] opening camera 2024-03-23T08:51:39: [INFO] closing camera 2024-03-23T08:51:39: [INFO] connecting to camera /base/axi/pcie@120000/rp1/i2c@80000/imx219@10

But when I want to take a picture, it doesn't work. Here is an excerpt from PUTTY:

_~ » indiserver -v indi_pylibcamera astronaut@astroarch 2024-03-23T08:44:17: startup: indiserver -v indi_pylibcamera 2024-03-23T08:44:17: Driver indi_pylibcamera: pid=1182 rfd=6 wfd=6 efd=7 2024-03-23T08:44:17: listening to port 7624 on fd 5 2024-03-23T08:44:17: Local server: listening on local domain at: @/tmp/indiserve r 2024-03-23T08:44:19: Driver indi_pylibcamera: [0:00:59.297232535] [1182] ERROR I PAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found 2024-03-23T08:44:19: Driver indi_pylibcamera: [0:00:59.297265554] [1182] ERROR I PAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info 2024-03-23T08:44:19: Driver indi_pylibcamera: [0:00:59.297304721] [1182] INFO C amera camera_manager.cpp:284 libcamera v0.2.0 2024-03-23T08:44:19: Driver indi_pylibcamera: [0:00:59.314660219] [1184] INFO R PI pisp.cpp:662 libpisp version v1.0.4 2e1ad45c8f0e-dirty 19-03-2024 (12:49:28) 2024-03-23T08:44:19: Driver indi_pylibcamera: [0:00:59.343032495] [1184] INFO R PI pisp.cpp:1121 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 to CFE device /dev/media0 and ISP device /dev/media1 using PiSP variant BCM2712 _C0 2024-03-23T08:44:19: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- found cameras: [{'Model': 'imx219', 'Location': 2, 'Rotation': 180, 'Id': '/base /axi/pcie@120000/rp1/i2c@80000/imx219@10', 'Num': 0}] 2024-03-23T08:44:19: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- selected logging level: LOGGING_INFO 2024-03-23T08:44:53: Client 9: new arrival from 192.168.178.52:52396 - welcome! 2024-03-23T08:44:53: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- connecting to camera /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 2024-03-23T08:44:53: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- closing camera 2024-03-23T08:44:53: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- opening camera 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.027540807] [1182] ERROR I PAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.027561955] [1182] ERROR I PAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.027591622] [1182] INFO C amera camera_manager.cpp:284 libcamera v0.2.0 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.042728139] [1188] INFO R PI pisp.cpp:662 libpisp version v1.0.4 2e1ad45c8f0e-dirty 19-03-2024 (12:49:28) 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.055101805] [1188] INFO R PI pisp.cpp:1121 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 to CFE device /dev/media0 and ISP device /dev/media1 using PiSP variant BCM2712 _C0 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.056552082] [1182] ERROR I PAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.056572082] [1182] ERROR I PAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.056597675] [1182] INFO C amera camera_manager.cpp:284 libcamera v0.2.0 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.068840600] [1191] INFO R PI pisp.cpp:662 libpisp version v1.0.4 2e1ad45c8f0e-dirty 19-03-2024 (12:49:28) 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.081000969] [1191] INFO R PI pisp.cpp:1121 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 to CFE device /dev/media0 and ISP device /dev/media1 using PiSP variant BCM2712 _C0 2024-03-23T08:44:53: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- camera properties: {'Model': 'imx219', 'UnitCellSize': (1120, 1120), 'ColorFilte rArrangement': 0, 'Location': 2, 'Rotation': 180, 'PixelArraySize': (3280, 2464) , 'PixelArrayActiveAreas': [(8, 8, 3280, 2464)], 'ScalerCropMaximum': (0, 0, 0, 0), 'SystemDevices': (20738, 20740, 20742, 20744, 20746, 20748, 20750, 20741, 20 743, 20745, 20747, 20749)} 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.085830636] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 640x480-BGGR 16_PISP_COMP1 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.085949302] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 640x480-SBGGR10_1X10 - Selected CFE format: 640x480-PC1B 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.090366321] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 1640x1232-BG GR16_PISP_COMP1 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.090462117] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 1640x1232-SBGGR10_1X10 - Selected CFE format: 1640x1232-PC1B 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.094644468] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 1920x1080-BG GR16_PISP_COMP1 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.094747153] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 1920x1080-SBGGR10_1X10 - Selected CFE format: 1920x1080-PC1B 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.098900190] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 3280x2464-BG GR16_PISP_COMP1 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.098981135] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 3280x2464-SBGGR10_1X10 - Selected CFE format: 3280x2464-PC1B 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.106393245] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 640x480-SBGG R16 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.106512967] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 640x480-SBGGR8_1X8 - Selected CFE format: 640x480-BYR2 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.111695523] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 1640x1232-SB GGR16 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.111802467] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 1640x1232-SBGGR8_1X8 - Selected CFE format: 1640x1232-BYR2 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.117874467] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 1920x1080-SB GGR16 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.117972763] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 1920x1080-SBGGR8_1X8 - Selected CFE format: 1920x1080-BYR2 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.124528392] [1182] INFO C amera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 3280x2464-SB GGR16 2024-03-23T08:44:53: Driver indi_pylibcamera: [0:01:33.124620855] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 3280x2464-SBGGR8_1X8 - Selected CFE format: 3280x2464-BYR2 2024-03-23T08:44:53: Client 10: new arrival from 192.168.178.52:52397 - welcome! 2024-03-23T08:44:53: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- configuration /home/astronaut/.indi_pylibcamera/CONFIG1.json does not exist 2024-03-23T08:45:48: Driver indi_pylibcamera: indipylibcamera.indidevice-INFO- exposure settings: CameraSettings: FastExposure=False, DoRaw=True, ProcSize=(328 0, 2464), RawMode={'label': '3280x2464 RGGB 10bit', 'size': (3280, 2464), 'true size': (3280, 2464), 'camera_format': 'SRGGB10', 'bit_depth': 10, 'binning': (1, 1)}, CameraControls={'ExposureTime': 1000000, 'AnalogueGain': 10.66666698455810 5, 'AeEnable': False, 'AeConstraintMode': <AeConstraintModeEnum.Normal: 0>, 'AeE xposureMode': <AeExposureModeEnum.Normal: 0>, 'AeMeteringMode': <AeMeteringModeE num.CentreWeighted: 0>, 'AwbEnable': False, 'AwbMode': <AwbModeEnum.Auto: 0>, 'B rightness': 0.0, 'ColourGains': (2.0, 2.0), 'Contrast': 1.0, 'ExposureValue': 0. 0, 'NoiseReductionMode': <NoiseReductionModeEnum.Off: 0>, 'Saturation': 1.0, 'Sh arpness': 0.0} 2024-03-23T08:45:48: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- reconfiguring camera 2024-03-23T08:45:48: Driver indi_pylibcamera: [0:02:28.400229446] [1195] INFO C amera camera.cpp:1183 configuring streams: (0) 224x190-BGR888 (1) 3280x2464-SBGG R16 2024-03-23T08:45:48: Driver indi_pylibcamera: [0:02:28.400415594] [1191] INFO R PI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx219@10 - Selecte d sensor format: 3280x2464-SBGGR10_1X10 - Selected CFE format: 3280x2464-BYR2 2024-03-23T08:45:49: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- got exposed frame 2024-03-23T08:45:55: Driver indi_pylibcamera: WARNING: IERSWarning: malformed IE RS table from https://datacenter.iers.org/data/9/finals2000A.all: [Errno 2] No s uch file or directory: '/usr/lib/python3.11/site-packages/astropy_iers_data/data /ReadMe.finals2000A' [astropy.utils.iers.iers] 2024-03-23T08:46:04: Driver indi_pylibcamera: WARNING: IERSWarning: failed to do wnload https://maia.usno.navy.mil/ser7/finals2000A.all: <urlopen error [Errno -5 ] No address associated with hostname> [astropy.utils.iers.iers] 2024-03-23T08:46:04: Driver indi_pylibcamera: WARNING: IERSWarning: unable to do wnload valid IERS file, using local IERS-B [astropy.utils.iers.iers] 2024-03-23T08:46:04: Driver indi_pylibcamera: Exception in thread Thread-2 (Ex posureLoop): 2024-03-23T08:46:04: Driver indi_pylibcamera: Traceback (most recent call last): 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/thread ing.py", line 1045, in _bootstrap_inner 2024-03-23T08:46:04: Driver indi_pylibcamera: self.run() 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/thread ing.py", line 982, in run 2024-03-23T08:46:04: Driver indi_pylibcamera: self._target(*self._args, **se lf._kwargs) 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/indi_pylibcamera/CameraControl.py", line 886, in ExposureLoop 2024-03-23T08:46:04: Driver indi_pylibcamera: hdul = self.createRawFits(arra y=array, metadata=metadata) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/indi_pylibcamera/CameraControl.py", line 572, in createRawFits 2024-03-23T08:46:04: Driver indi_pylibcamera: self.snooped_FitsHeader(), 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/indi_pylibcamera/CameraControl.py", line 486, in snooped_FitsHeader 2024-03-23T08:46:04: Driver indi_pylibcamera: cAltAz = c.transform_to(astrop y.coordinates.AltAz(obstime=astropy.time.Time.now(), location=ObsLoc)) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/coordinates/sky_coordinate.py", line 692, in transform_to 2024-03-23T08:46:04: Driver indi_pylibcamera: new_coord = trans(self.frame, generic_frame) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/coordinates/transformations.py", line 1537, in call 2024-03-23T08:46:04: Driver indi_pylibcamera: curr_coord = t(curr_coord, cur r_toframe) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/coordinates/transformations.py", line 1027, in call 2024-03-23T08:46:04: Driver indi_pylibcamera: return supcall(fromcoord, tofr ame) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/coordinates/builtin_frames/icrs_observed_transforms.py", line 33 , in icrs_to_observed 2024-03-23T08:46:04: Driver indi_pylibcamera: astrom = erfa_astrom.get().apc o(observed_frame) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/coordinates/erfa_astrom.py", line 53, in apco 2024-03-23T08:46:04: Driver indi_pylibcamera: xp, yp = get_polar_motion(obst ime) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^ ^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/coordinates/builtin_frames/utils.py", line 45, in get_polar_moti on 2024-03-23T08:46:04: Driver indi_pylibcamera: iers_table = iers.earth_orient ation_table.get() 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/state.py", line 58, in get 2024-03-23T08:46:04: Driver indi_pylibcamera: return cls.validate(cls._value ) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ ^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/iers/iers.py", line 1001, in validate 2024-03-23T08:46:04: Driver indi_pylibcamera: value = IERS_Auto.open() 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/iers/iers.py", line 822, in open 2024-03-23T08:46:04: Driver indi_pylibcamera: cls.iers_table = IERS_B.open() 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/iers/iers.py", line 274, in open 2024-03-23T08:46:04: Driver indi_pylibcamera: cls.iers_table = cls.read(kw args) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^ ^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/iers/iers.py", line 739, in read 2024-03-23T08:46:04: Driver indi_pylibcamera: table = super().read(file, for mat="cds", readme=readme, data_start=data_start) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/table/connect.py", line 62, in call 2024-03-23T08:46:04: Driver indi_pylibcamera: out = self.registry.read(cls, *args, kwargs) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/io/registry/core.py", line 221, in read 2024-03-23T08:46:04: Driver indi_pylibcamera: data = reader(args, kwargs) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/io/ascii/connect.py", line 19, in io_read 2024-03-23T08:46:04: Driver indi_pylibcamera: return read(filename, kwargs ) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ ^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/decorators.py", line 604, in wrapper 2024-03-23T08:46:04: Driver indi_pylibcamera: return function(args, kwarg s) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ ^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/decorators.py", line 604, in wrapper 2024-03-23T08:46:04: Driver indi_pylibcamera: return function(*args, *kwarg s) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ ^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/decorators.py", line 604, in wrapper 2024-03-23T08:46:04: Driver indi_pylibcamera: return function(args, **kwarg s) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^^^^ ^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: [Previous line repeated 2 more t imes] 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/io/ascii/ui.py", line 463, in read 2024-03-23T08:46:04: Driver indi_pylibcamera: dat = reader.read(table) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/io/ascii/cds.py", line 357, in read 2024-03-23T08:46:04: Driver indi_pylibcamera: return super().read(table) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/io/ascii/core.py", line 1414, in read 2024-03-23T08:46:04: Driver indi_pylibcamera: self.lines = self.inputter.get _lines(table, newline=newline) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/io/ascii/core.py", line 335, in get_lines 2024-03-23T08:46:04: Driver indi_pylibcamera: with get_readable_fileobj(tabl e, encoding=self.encoding) as fileobj: 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/contex tlib.py", line 137, in enter 2024-03-23T08:46:04: Driver indi_pylibcamera: return next(self.gen) 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: File "/usr/lib/python3.11/site-p ackages/astropy/utils/data.py", line 364, in get_readable_fileobj 2024-03-23T08:46:04: Driver indi_pylibcamera: fileobj = io.FileIO(name_or_ob j, "r") 2024-03-23T08:46:04: Driver indi_pylibcamera: ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ 2024-03-23T08:46:04: Driver indi_pylibcamera: FileNotFoundError: [Errno 2] No su ch file or directory: '/usr/lib/python3.11/site-packages/astropy_iersdata/data/ eopc04.1962-now'

What exactly do you mean by "CCD logging"? If you briefly describe what you mean, I can send you the error report.

By the way, thank you for your great support!

MattBlack85 commented 7 months ago

hi @Olli781! Thank you very much for trying again, I believe yesterday crashes were due to the udev rules not triggering when you installed pylibcamera (my fault :| ) a reboot likely fixed it.

When you start ekos, there is a series of icons (where also the indi one is) and there should be a button called "Logs", if you click there you can enable/disable logging and the logging level for specific components (and decide if you want to log to file), if you choose verbose logging to file and mark the CCD, the camera logs will flow to the logfile Kstars makes (Kstars logs files are found under ~/.local/share/kstars/logs).

Anyway, it seems starting indiserver by hand also logs all python errors, so we are fine here :)

It seems to me that astropy does some magic stuff and is trying to download some files but it's not able to do so, it seems those URLs are working, is your Pi connected to the internet?

MattBlack85 commented 7 months ago

or maybe packaged astropy is missing some files, I will check that

MattBlack85 commented 7 months ago

ah yes, this seems indeed to be an error directly related to the astropy-iers-data package, give me a while to figure it out

MattBlack85 commented 7 months ago

@Olli781 I packaged a corrected version of astropy iers data, if you update the system with update-astroarch it should pull the newest version which should fix your issue. Let me know!

Olli781 commented 7 months ago

Hi Matt, it works!!! The camera is recognized correctly and the driver runs stable. Here is the log file:

[2024-03-24T22:17:36.844 UTC INFO ][ org.kde.kstars.ekos.capture] - "Capture exposure = 1 sec, type = Light, filter = , upload mode = 0, batch mode = false, seq prefix = %t%T%F%t%T_%F_Light, format = RAW, encoding = , binning = 1x1, Cannot subframe" [2024-03-24T22:17:36.847 UTC INFO ][ org.kde.kstars.ekos.capture] - "Capturing 1.000-second image..." [2024-03-24T22:17:36.892 UTC INFO ][ org.kde.kstars.indi] - indi_pylibcamera : "[INFO] exposure settings: CameraSettings: FastExposure=False, DoRaw=True, ProcSize=(3280, 2464), RawMode={'label': '3280x2464 RGGB 10bit', 'size': (3280, 2464), 'true_size': (3280, 2464), 'camera_format': 'SRGGB10', 'bit_depth': 10, 'binning': (1, 1)}, CameraControls={'ExposureTime': 1000000, 'AnalogueGain': 10.666666984558105, 'AeEnable': False, 'AeConstraintMode': <AeConstraintModeEnum.Normal: 0>, 'AeExposureMode': <AeExposureModeEnum.Normal: 0>, 'AeMeteringMode': <AeMeteringModeEnum.CentreWeighted: 0>, 'AwbEnable': False, 'AwbMode': <AwbModeEnum.Auto: 0>, 'Brightness': 0.0, 'ColourGains': (2.0, 2.0), 'Contrast': 1.0, 'ExposureValue': 0.0, 'NoiseReductionMode': <NoiseReductionModeEnum.Off: 0>, 'Saturation': 1.0, 'Sharpness': 0.0} " [2024-03-24T22:17:36.893 UTC INFO ][ org.kde.kstars.indi] - indi_pylibcamera : "[INFO] reconfiguring camera " [2024-03-24T22:17:38.087 UTC INFO ][ org.kde.kstars.indi] - indi_pylibcamera : "[INFO] got exposed frame " [2024-03-24T22:17:39.396 UTC INFO ][ org.kde.kstars.indi] - indi_pylibcamera : "[INFO] preparing frame as BLOB: 16171200 bytes " [2024-03-24T22:17:39.396 UTC INFO ][ org.kde.kstars.indi] - indipylibcamera : "[INFO] sending BLOB " [2024-03-24T22:17:40.364 UTC INFO ][ org.kde.kstars.ekos.capture] - "Captured /tmp/kstars.fQWnNX" [2024-03-24T22:17:40.367 UTC INFO ][ org.kde.kstars.ekos.capture] - "Download Time: 0.60 s, New Download Time Estimate: 0.60 s." [2024-03-24T22:17:41.060 UTC WARN ][ kf.notifications] - Failed to play sound with canberra: File or data not found

Only one warning appears when updating: warning: gst-plugin-libcamera: local (0.2.0-2) is newer than extra (0.2.0-1) warning: libcamera: local (0.2.0-2) is newer than extra (0.2.0-1) warning: libcamera-docs: local (0.2.0-2) is newer than extra (0.2.0-1) warning: libcamera-ipa: local (0.2.0-2) is newer than extra (0.2.0-1) warning: libcamera-tools: local (0.2.0-2) is newer than extra (0.2.0-1) there is nothing to do

Next I will try to install astroarch on an SSD. That should bring a performance gain.

Thank you again for your great support. Astroarch is a really great project!

MattBlack85 commented 7 months ago

@Olli781 I am happy it finally works :D it's been fun digging into libcamera and other stuff.

The warning are fine for now, those packages are unstable - please ignore them and remember, if you make a new installation on a SSD you will need to pull the libcamera custom packages with

wget http://astromatto.com:9000/aarch64/libcamera-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/libcamera-docs-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/libcamera-ipa-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/libcamera-tools-0.2.0-2-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/rpicam-apps-1.4.3-1-aarch64.pkg.tar.xz
wget http://astromatto.com:9000/aarch64/gst-plugin-libcamera-0.2.0-2-aarch64.pkg.tar.xz
sudo pacman -U gst-plugin-libcamera-0.2.0-2-aarch64.pkg.tar.xz libcamera-0.2.0-2-aarch64.pkg.tar.xz libcamera-docs-0.2.0-2-aarch64.pkg.tar.xz libcamera-ipa-0.2.0-2-aarch64.pkg.tar.xz libcamera-tools-0.2.0-2-aarch64.pkg.tar.xz rpicam-apps-1.4.3-1-aarch64.pkg.tar.xz && sudo pacman -S libpisp

This week I will work on automating this step in a similar fashion I did for bleeding packages so it will be easy to install them and possibly they will be the official ones for raspberris in one of the next release.

I will let you know once this shortcut to install the rpi libcamera packages will be ready!

and last but not least, thanks for your support! :heart: great to hear people like this project

MattBlack85 commented 7 months ago

this should be done, in theory now, if one runs sudo pacman -S indi-pylibcamera it should pull libcamera for the raspberry directly

ripkrizbi commented 7 months ago

Ciao Mattia, great work on the astroarch, your effort is highly appreciated!

I have the same setup as Oli (but on Ras4B), and I tried following the instructions in this thread to enable the HQ camera. I got the libcam-hello working and libcam-still taking snapshots, but I'm struck at getting the INDI driver to run, I get the following error:

~ » indiserver indi_pylibcamera                                                                                astronaut@astroarch
2024-04-16T07:12:51: startup: indiserver indi_pylibcamera
2024-04-16T07:12:54: Driver indi_pylibcamera: Traceback (most recent call last):
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/bin/indi_pylibcamera", line 33, in <module>
2024-04-16T07:12:54: Driver indi_pylibcamera:     sys.exit(load_entry_point('indi-pylibcamera==2.6.0', 'console_scripts', 'indi_pylibcamera')())
2024-04-16T07:12:54: Driver indi_pylibcamera:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/bin/indi_pylibcamera", line 25, in importlib_load_entry_point
2024-04-16T07:12:54: Driver indi_pylibcamera:     return next(matches).load()
2024-04-16T07:12:54: Driver indi_pylibcamera:            ^^^^^^^^^^^^^^^^^^^^
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
2024-04-16T07:12:54: Driver indi_pylibcamera:     module = import_module(match.group('module'))
2024-04-16T07:12:54: Driver indi_pylibcamera:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
2024-04-16T07:12:54: Driver indi_pylibcamera:     return _bootstrap._gcd_import(name[level:], package, level)
2024-04-16T07:12:54: Driver indi_pylibcamera:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/lib/python3.11/site-packages/indi_pylibcamera/indi_pylibcamera.py", line 12, in <module>
2024-04-16T07:12:54: Driver indi_pylibcamera:     from picamera2 import Picamera2
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/lib/python3.11/site-packages/picamera2/__init__.py", line 9, in <module>
2024-04-16T07:12:54: Driver indi_pylibcamera:     from .picamera2 import Picamera2, Preview
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/lib/python3.11/site-packages/picamera2/picamera2.py", line 26, in <module>
2024-04-16T07:12:54: Driver indi_pylibcamera:     from picamera2.encoders import Encoder, H264Encoder, MJPEGEncoder, Quality
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/lib/python3.11/site-packages/picamera2/encoders/__init__.py", line 21, in <module>
2024-04-16T07:12:54: Driver indi_pylibcamera:     from .h264_encoder import H264Encoder
2024-04-16T07:12:54: Driver indi_pylibcamera:   File "/usr/lib/python3.11/site-packages/picamera2/encoders/h264_encoder.py", line 3, in <module>
2024-04-16T07:12:54: Driver indi_pylibcamera:     from v4l2 import (V4L2_CID_MPEG_VIDEO_H264_I_PERIOD,
2024-04-16T07:12:54: Driver indi_pylibcamera: ImportError: cannot import name 'V4L2_CID_MPEG_VIDEO_H264_PROFILE' from 'v4l2' (/usr/lib/python3.11/site-packages/v4l2.py)
2024-04-16T07:12:54: Driver indi_pylibcamera: read: Connection reset by peer

The indi-pylibcamera version installed is 2.6.0-4 Any help in resolving the issue is most welcome, many thanks!

MattBlack85 commented 7 months ago

hi @ripkrizbi thanks for the report, I noticed I may have packaged a wrong version of python-v4l2 which is indeed missing that attribute. Will have a look soon

MattBlack85 commented 7 months ago

hi @ripkrizbi can you try to run update-astroarch and tell me if that is fixed? I shipped the newest version (0.3.4) of python-v4l2 now which brings in the failed attr V4L2_CID_MPEG_VIDEO_H264_PROFILE

ripkrizbi commented 7 months ago

It does seem to have fixed the problem, wow, lightning fast reactions, many many thanks!

~ » indiserver -v indi_pylibcamera                                                        astronaut@astroarch
2024-04-16T07:59:08: startup: indiserver -v indi_pylibcamera
2024-04-16T07:59:08: Driver indi_pylibcamera: pid=1894 rfd=6 wfd=6 efd=7
2024-04-16T07:59:08: listening to port 7624 on fd 5
2024-04-16T07:59:08: Local server: listening on local domain at: @/tmp/indiserver
2024-04-16T07:59:12: Driver indi_pylibcamera: [0:07:25.438481707] [1894] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
2024-04-16T07:59:12: Driver indi_pylibcamera: [0:07:25.438568039] [1894] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
2024-04-16T07:59:12: Driver indi_pylibcamera: [0:07:25.438644538] [1894]  INFO Camera camera_manager.cpp:284 libcamera v0.2.0
2024-04-16T07:59:12: Driver indi_pylibcamera: [0:07:25.481760208] [1897]  WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
2024-04-16T07:59:12: Driver indi_pylibcamera: [0:07:25.485092574] [1897]  INFO RPI vc4.cpp:447 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media2 and ISP device /dev/media1
2024-04-16T07:59:12: Driver indi_pylibcamera: [0:07:25.485176221] [1897]  INFO RPI pipeline_base.cpp:1144 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
2024-04-16T07:59:12: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- found cameras: [{'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a', 'Num': 0}]
2024-04-16T07:59:12: Driver indi_pylibcamera: indi_pylibcamera.indidevice-INFO- selected logging level: LOGGING_INFO
MattBlack85 commented 7 months ago

happy it works!

MattBlack85 commented 6 months ago

think it's time to close this one as fixed :)

feel free to re-open if I missed something