Axel replied to the topic 'INDI LibCamera Driver' in the forum. 2 months ago

Hi Outta,

could you probably be a little bit more concrete :-)

- Did you build (!) the indi-libcamera?
- What means "pulled"? - from where?
- You write "And then it installed" - what exactly did you install (your built indi-libcamera ...?)

I think this would help people to understand what you exactly did and why :-)

THX and cheers,
Axel

Read More...

Hi,

I wrote this down a longer time ago and scripted the task: I also like to back up all files in the home directory. I find rsync the most appropriate solution, because it copies only those files, that really changed. And thus I can back up via network. Though it is very powerful, it can also destroy a lot, you should carefully define the target directory. But, if you keep a backup, this is no problem.

Be careful not to overwrite the ekoslive directory. This can lead to trouble with the registration of the machine.

Since this is Debian based, you can also clone your installation packages with the super cow power of apt. This way I keep two stellarmate appliances, one is a StellarMateX (Intel ThinClient) and one is a Stellarmate OS (Raspberry Pi 4) in sync.

Only for experienced Linux users:
github.com/apos/ksta

Cheers, Axel

Read More...

Hi Bryan,

I just read your answer and had the idea to test "stellarmate.local" instead of the IP. I accidentally did this in my SS7 Pro on the iPad (I own it for Android and iOS). iOS, if I remember right, was the first OS on which SkySafari had been released. So it's softeware genes come from this OS.

First setup of SM:
- Pi4 with Stellarmate (most actual software) and connected the OnStep mount (V4.x, not OnStepX - but should make no difference).
- The PI's WLAN is connected to my Home-WLAn (no Hotspot mode)
- The SkySafari module is loaded with defaults (uses "Telescope" in Options Tab and "localhost" in Main Tab.

iPad (2018th)
- Selecting a new INDI connection, IP: stellarmate.local
- Pressing the "Check IP and Port" -> Finds the SM device and automatically chooses LX200 OnStep for the device
- Pressing "next" and Save"
- connection successful
- the IP is automatically resolved and is automatically set instead of "stellarmate.local"

iPhone (X)
- same as above:Connection OK, no problems at all.
- I also can connect both devices simultaneously without any problems

Restarted the app on both iOS devices.
- the app remembered the connection and it could be esstablished without problems.


Android (Samsung S2 tablet)
- same settings as above
- tried both "stellarmate.local" and IP
=> absolute no chance to connect at all.

- Restarted the Android SS7 app
-- Connection could not be established,
- I tried the IP -> not possible

- Again restarted the app
- no connection, because the app did not remember the correct connection (probably because it was not successful)
- I choosed the right connection -> went into configuration, checked the IP
=> connection could be established
- I Again restarted the app:
=> the correct Settings had been automatically reused by the app and the connection was successful

In Germany we would say "da brat mir einer nen storch" (no translatable :-) ).
Could this be an Android-related issue? Could have been merely luck. I remember this did not work either on the iOS in former times.
This drives me crazy - really.

Cheers, Axel

Read More...

Hi Bryan,

> I'll try it on the indi driver for paramount tonight in ss7
The INDI driver is not mount specific and just needs IP/Port. Any Indi-Mount driver will work. You also do need clear skies to test this. Just an EKOS configuration with the mount driver and a network connection to SM. This drives the mount via the LX200 protocol. And gets its camera information also via Indi. As I said: this works, but not reliable. I also had problems connecting my DSC oder PiFinder which both do the same (LX200).

> [i 30USD in the toilet
Not so fst :-) it's a pretty good program.


I'll dig deeper and will also file a bug a SkySafari. I'll report.

Cheers, Axel


Read More...

Axel replied to the topic 'INDI LibCamera Driver' in the forum. 2 months ago

Hi Jasem,

thanks a lot.

> Jasem Mutlaq post=98771: I pushed an update to indi-libcamera package yesterday, did you install that version? There was an update to rpicam-apps as well. Make sure to run this:
<code>sudo apt-get update && sudo apt-get -y dist-upgrade
</code>[/quote]

I did my test yesterday (here is CEST, so only 2 hours difference). Probably things got mixed up. Now I just did an upgrade and got a lot of indi drivers, but no indi-libcamera. And I now know why ...

stellarmate@stellarmate:~ $ dpkg -l indi-libcamera
dpkg-query: no packages found matching indi-libcamera
stellarmate@stellarmate:~ $ apt-cache search libcam | grep indi
python3-libcamera - complex camera support library (Python bindings)
indi-libcamera - INDI driver for cameras accessible via libcamera.
indi-libcamera-dbg - INDI driver for cameras accessible via libcamera.

:huh: Seems there had been no such module installed. Me culpa mea maxima culpa.
stellarmate@stellarmate:~ $ sudo apt install indi-libcamera
[...]
The following NEW packages will be installed:
  indi-libcamera
[...]
Setting up indi-libcamera (1.1+z+stable~202402051324) ...

Test:
- After starting Stellarmate I could select the driver LibCamera imx477 (see photo). Good.
- Taking photo leads to an abort
- I changed the image type in the Stellarmate App from DNG (default) to JPG and could take a photo.
- After fidling around with the filetype in EKOS (VNC), I got only "scrambled eggs" :-)
- rebooted. Captured OK (JPG) - > but after 4 or 5 times the capture aborts:
[ERROR] Error opening camera: failed to allocate capture buffers for stream
- rebooted. capture OK (JPG and DNG) ... after some tries: scrambled eggs or [ERROR]:-)


So this is a big step forward - Tux likes it :) But it needs some work to really beeing stable.

I'll try further on.

Read More...


I could repeatedly reproduce this behavior (SS7 Pro) this evening again. I started Stellarmate, I started SS7. I
- tried to connect. It throws an error.

I went into the SS7 config for the mount, edit, push the "test the connection" button and the connection sometimes can be established, sometimes not. It's unfortunately not predictable.
What is more irritating: when I slew the mount (GoTo with KStars), sometimes it can connect spontaneously.
Yes exactly. This all occurs with the INDI driver :-) That was the main reason, I bought the SS7 update (not only, but one big reason).

Really weird and not reproducible, unfortunately. Sometimes works (then stable), sometimes not.

I'll investigate further.

Read More...

Success stories:

I first tried yesterday indoors with simulators on a second OnStep mount (a Astrophysics CNC 400): worked like expected. I controlled the limits. I had +5 degrees set for Meridian W and E in OnStep.

Today, I had a few hours clear skies. So I could try on my Lichtenknecker M100B. So I again checked the limits. Due to the fact, that the mount can slew far upon the meridian and it is mounted on a balcony, I prefer the pier west. So my meridian limit west is +60 degrees. My meridian limit east is -45, so the mount should not slew too much in direction east, but more to the west. When I start near Dec/Meridian (pier west), I have much space to travel the 30 degree for polar alignment.

Out of a sudden, this eventing this worked fine without any problems.
I really do not know why.

- Slew speed was correct (high)
- mount limits are not problems, because I am using pier west and slewing to the west. So if I start near meridian, I have 60 degrees travel way without a meridian flip will occour, so plenty enough for the slew
- this evening an update occured on both, my iPad app and the Stellarmatex pc.

@Ettore: check your mount limits in OnStep (not KStars!).
- If you set them to POSITIVE values, this means for West: "I going upon West and the mount is hitting the meridian line", it will go further on without doing a meridian flip exactly the given additonal amount of positive degrees. The meridian flip happens AFTER this amount of degrees. And when slewing East, the same in this direction.
- If you set them to NEGATIVE values, this means for slewing e.g., West: “Do a meridian flip this amount of degrees, BEFORE (!) you reach the Meridian.” This will hinder the mount to slew in the desired direction, if this is intended because the telescope or parts of the mount would hit something.

So I declare this solved for now.

Cheers Axel

Read More...

Axel replied to the topic 'Sky watcher AZ-GTi mount driver' in the forum. 2 months ago

If anyone stumbles upon this thread and still likes to use WiFi: Jasem made a great video about the network theme:

Connecting StellarMate to Mount WiFi:
www.youtube.com/watch?v=uuDk1x7XgwE

Read More...

Axel replied to the topic 'INDI LibCamera Driver' in the forum. 2 months ago


Hi there,

I am currently in a project of uniting PiFinder (pifinder.io) and Stellarmate. This is not possible at the moment because I wait for the PiFinder to be elevated to Bookworm. I'll report on succeed (you can follow on PiFinders Discord channel, if interested: "PiFinder in Stellarmate" on Discord . My discord name there is HeyApos :-). But that's another story.

Back to topic:

That's why I currently dual boot Stellarmate and the PiFinder on the same hardware and a Raspberry Pi HD cam is attached (datasheets.raspberrypi.com/hq-camera/hq-...ra-product-brief.pdf) It works fine with the Pifinder (which uses a pyhthon library and another OS version). So the camera itself and hardware is OK.

The new Stellarmate 1.8.1. claims to support the (official) Raspberry Pi cameras with Libcamera. I know there had been a lot of work by Jasem and others to get this work :-) Thanks for that. I tried to carefully read here and understand how to debug this.

Problem:
When I select the LibCamera driver in a new SM profile, the profile does not start at all.

- Stellarmate App v2.6.80 (Android) - also tried with iPad
- Stellarmate OS 64bit 1.8.1.
- Drivers: Telescope Simulator and Raspberry Pi Cam HD (LibCamera)

Any Idea, what I am doing wrong?

Logging:
Dmesg gives me nothing. And the indi log dir is empty. the other log files I attached.

stellarmate@stellarmate:~ $ libcamera-hello --version
rpicam-apps build: 9ae39f85ae6b 30-01-2024 (13:24:24)
libcamera build: v0.1.0+118-563cd78e

apt list --installed | grep libcamera
libcamera-ipa/stable,now 0.1.0+rpt20231122-1 arm64 [installed,automatic]
libcamera-tools/stable,now 0.1.0+rpt20231122-1 arm64 [installed]
libcamera0.1/stable,now 0.1.0+rpt20231122-1 arm64 [installed,automatic]
python3-libcamera/stable,now 0.1.0+rpt20231122-1 arm64 [installed,automatic]

apt list --installed | grep picamera
python3-picamera2/stable,stable,now 0.3.16-1 all [installed]

libcamera-hello --list-cameras
Available cameras
-----------------
0 : imx477 [4056x3040 12-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx477@1a)
    Modes: 'SRGGB10_CSI2P' : 1332x990 [30.00 fps - (0, 0)/0x0 crop]
           'SRGGB12_CSI2P' : 2028x1080 [30.00 fps - (0, 0)/0x0 crop]
                             2028x1520 [30.00 fps - (0, 0)/0x0 crop]
                             4056x3040 [30.00 fps - (0, 0)/0x0 crop]


Troubleshoot


I followed this bug description: github.com/raspberrypi/picamera2/issues/502 and the test python code gives me the following, so this seems to work.
Opening camera 0: {'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a', 'Num': 0}
[1:20:28.197096230] [11781]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e
[1:20:28.229802128] [11791]  WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[1:20:28.232379551] [11791]  INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media1 and ISP device /dev/media2
[1:20:28.232457346] [11791]  INFO RPI pipeline_base.cpp:1142 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[1:20:28.235057231] [11781]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e
[1:20:28.267695056] [11794]  WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[1:20:28.270162722] [11794]  INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media1 and ISP device /dev/media2
[1:20:28.270281868] [11794]  INFO RPI pipeline_base.cpp:1142 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Success.
>>> print('Finished.')
Finished.


When I turn on logging in EKOS (VNC) in "verbose" mode and "file" the error is:
[2024-02-04T21:09:03.079 CET WARN ][           org.kde.kstars.indi] - Driver "LibCamera" failed to start. Retrying in 5 seconds...
[2024-02-04T21:09:08.079 CET WARN ][           org.kde.kstars.indi] - Driver "LibCamera" failed to start. Retrying in 5 seconds...
[2024-02-04T21:09:13.087 CET WARN ][           org.kde.kstars.indi] - Driver "LibCamera" failed to start. Retrying in 5 seconds...
[...]

libcamera-still -r -o test.jpg WORKS (temporarily shut down EKOS / Indi-Webmanager)

libcamera-still -r -o test.jpg
[0:01:23.547791788] [1796] INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e
[0:01:23.604749367] [1820] WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:01:23.607778920] [1820] INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:01:23.607872746] [1820] INFO RPI pipeline_base.cpp:1142 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Preview window unavailable
Mode selection for 2028:1520:12:P
SRGGB10_CSI2P,1332x990/0 - Score: 3456.22
SRGGB12_CSI2P,2028x1080/0 - Score: 1083.84
SRGGB12_CSI2P,2028x1520/0 - Score: 0
SRGGB12_CSI2P,4056x3040/0 - Score: 887
Stream configuration adjusted
[0:01:23.610184360] [1796] INFO Camera camera.cpp:1183 configuring streams: (0) 2028x1520-YUV420 (1) 2028x1520-SBGGR12_CSI2P
[0:01:23.610655825] [1820] INFO RPI vc4.cpp:608 Sensor: /base/soc/i2c0mux/i2c@1/imx477@1a - Selected sensor format: 2028x1520-SBGGR12_1X12 - Selected unicam format: 2028x1520-pBCC
#0 (0.00 fps) exp 29999.00 ag 2.52 dg 1.63
#1 (30.00 fps) exp 29999.00 ag 2.52 dg 1.63
#2 (30.01 fps) exp 29999.00 ag 2.52 dg 1.63
[...]
Mode selection for 4056:3040:12:P
SRGGB10_CSI2P,1332x990/0 - Score: 10552.2
SRGGB12_CSI2P,2028x1080/0 - Score: 8179.84
SRGGB12_CSI2P,2028x1520/0 - Score: 7096
SRGGB12_CSI2P,4056x3040/0 - Score: 0
[0:01:29.203971624] [1796] INFO Camera camera.cpp:1183 configuring streams: (0) 4056x3040-YUV420 (1) 4056x3040-SBGGR12_CSI2P
[0:01:29.211876560] [1820] INFO RPI vc4.cpp:608 Sensor: /base/soc/i2c0mux/i2c@1/imx477@1a - Selected sensor format: 4056x3040-SBGGR12_1X12 - Selected unicam format: 4056x3040-pBCC
Still capture image received
Bayer format is BGGR-12


Cheers, Axel







Read More...