×

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

Bi-monthly release with minor bug fixes and improvements

Two FlipFlats at the same time (solved)

  • Posts: 20
  • Thank you received: 6
Hello,

this is maybe kind of a stupid question, but I could not figure out how to have two FlipFlats or FlatMan in the same Ekos profile at the same time.
I am running an indiserver on a RPi4 thats has a /dev/flipflat and a /dev/flatman connected as USB-devices.
I am running KStars/Ekos on a different VM that connects to the RPi4.

The indiserver on the RPi4 is started with one indi_flipflat driver on the command line.
In the Ekos profile I have two Aux entries with one "Flip Flap" each.
When I start Ekos it shows me only one "Flip Flat" in the INDI control panel.

I also tried to create a Custom Driver with an alias to the "Flip Flat" driver and a different label in the hope there is some magic abstraction layer on top of the device management or the indiserver is forking another process for the same driver with a different naming scheme :)

But when i look at the source code of flip_flat.cpp i don't see any support for multiple instances.
So I guess its just not possible to have two devices with this driver running.
Also because the getDefaultName() will always return "Flip Flat".

Is it the only way to compile another copy of the driver binary and give it different namings?

My cheap workaround at the moment is changing the port in the INDI control panel and reconnecting the other device.
Maybe there are other suggestions :)

Norman
Last edit: 8 months 3 weeks ago by Norman.
8 months 4 weeks ago #94293

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

Actually Custom Driver would resolve this exact issue. Did you try it? what doesn't work exactly?
8 months 3 weeks ago #94320

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

  • Posts: 20
  • Thank you received: 6
Hi Jasem, thanks for your reply!

I tried it with the custom driver:




But the new Alias is not showing up in the INDI Control Panel:



I even tried to start two instances of the indi_flipflat driver on the server but i think this is not the correct approach.
Even both drivers actually found one Flip Flat USB device and attached to it but Ekos seems to see only one instance of the driver and connects to either one randomly.

indiserver pi02-eth:
indiserver -l /home/norman/indi/ -vv -d 0 -m 1000 \
indi_lx200_10micron \
indi_asi_ccd \
indi_pegasus_focuscube \
indi_qhy_ccd \
indi_manual_wheel \
indi_pegasus_uch \
indi_pegasus_ppba \
indi_flipflat \
indi_flipflat

lrwxrwxrwx 1 root root 7 Aug 1 20:49 /dev/flipflat -> ttyUSB1
lrwxrwxrwx 1 root root 7 Aug 2 10:11 /dev/flatman -> ttyUSB5

# fuser /dev/ttyUSB5
/dev/ttyUSB5: 3148
# fuser /dev/ttyUSB1
/dev/ttyUSB1: 3147

# ps auxw | grep indi_flipflat
norman 3148 0.0 0.1 41172 14860 ? S 10:17 0:00 indi_flipflat
norman 3147 0.0 0.1 41160 14768 ? S 10:17 0:00 indi_flipflat

I guess there is something missing in the driver itself.
I found an older discussion about multiple asi_focuser where they told that you added some code to support custom drivers for it.
When I look at asi_focuser.cpp code I see a class Loader at the very top which seems to account for multiple instances of the driver.
I can't see this in the flip_flat.cpp. Maybe thats why it doesn't work there.

Or I am completely wrong and just did a silly mistake in my config :)
Didn't have the time to dive deeper into driver development and understand how everything goes together yet.
So its just a wild guess.

Many thanks, Norman
8 months 3 weeks ago #94323
Attachments:

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

You can't use this approach. Use INDI FIFO which allows you to pass the LABEL for each driver you start up. This is how Ekos launches INDI server, by using INDI server in FIFO mode.

Check documentation here: www.indilib.org/developers/deveioper-manual/92-indi-server.html
8 months 3 weeks ago #94353

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

  • Posts: 20
  • Thank you received: 6
Holy crap, I wasn't aware of this for the last 3 years :)

Now I have everything online in the same profile!
Not that I need everything there but its possible and everything makes a lot more sense now to me.



This is my new startup script \o/

#!/bin/sh

PATH=/home/norman/bin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin
export PATH

# slow, high compresion: LIBXISF_COMPRESSION="lz4hc+sh:9"
# export LIBXISF_COMPRESSION

cp ~/.indi/REF/*.xml ~/.indi/
echo > ~/indi/log

FIFO=/tmp/INDIFIFO
rm -f $FIFO
mkfifo $FIFO

indiserver -l /home/norman/indi/ -v -d 0 -m 1000 -f $FIFO > ~/indi/log 2>&1 &

echo 'start indi_lx200_10micron -n "10micron"' > $FIFO
echo 'start indi_asi_ccd' > $FIFO
echo 'start indi_asi_wheel' > $FIFO
echo 'start indi_lynx_focus' > $FIFO
echo 'start indi_pegasus_uch' > $FIFO
echo 'start indi_pegasus_ppba' > $FIFO
echo 'start indi_pegasus_focuscube' > $FIFO
echo 'start indi_qhy_ccd' > $FIFO
echo 'start indi_manual_wheel' > $FIFO
echo 'start indi_flipflat -n "Flip Flat" -c "/home/norman/.indi/flipflat_config.xml"' > $FIFO
echo 'start indi_flipflat -n "Flat Man" -c "/home/norman/.indi/flatman_config.xml"' > $FIFO


Thanks so much Jasem!
8 months 3 weeks ago #94368
Attachments:

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

Time to create page: 0.270 seconds