Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Development - ASI Air Pro driver injection

  • Please log in to reply
102 replies to this topic

#26 nikivan

nikivan

    Explorer 1

  • -----
  • Posts: 81
  • Joined: 03 Feb 2019

Posted 16 February 2021 - 03:01 PM

..

I'm actually not certain if it's possible to integrate 3rd party product drivers into the ASIAir app ...

I wonder if it is be possible to mod the focuser arduino code to be compatible with EAF. In this case ASIAIR app should still work wit it. Probably too much work, though.

 

 

Spent the better part of 6 hours working on this and made no head way. After just trying to just inject the https://github.com/i...ter/indi-webcam drivers it still does not work...

Perhaps the communication with the camera is way too complex. A focuser functionality on the other hand is relatively simple. You could test any open source focuser by installing the firmware on an arduino board. There is no need to even connect a motor in order to test the communication routines. 



#27 KenS

KenS

    Apollo

  • *****
  • Posts: 1,103
  • Joined: 10 Jan 2015
  • Loc: Melbourne, Australia

Posted 16 February 2021 - 03:20 PM

From memory (and after a quick check), /usr/share/indi/drivers.xml contains the core INDI drivers while the individual XML files are for the 3rd party drivers. They are interchangeable. You could try changing the relevant XML file(s) and alter the "devgroup" to, say, Telescope. In drivers.xml you an just move around the relevant definitions. INDI should not care what the group is, it is just a hint to the client to organise the drivers.

If you want a driver to run under 1.7.8 I would suggest to roll back git to that relevant commit then rebuild the drivers you want. If you driver was not existing under 1.7.8 you can copy it to your repo once it is pointing to 1.7.8. There may be some minor code changes needed, dependingn on which version it is based on.



#28 joeytroy

joeytroy

    Viking 1

  • *****
  • topic starter
  • Posts: 741
  • Joined: 14 Aug 2020
  • Loc: Belen, NM, USA

Posted 16 February 2021 - 03:32 PM

From memory (and after a quick check), /usr/share/indi/drivers.xml contains the core INDI drivers while the individual XML files are for the 3rd party drivers. They are interchangeable. You could try changing the relevant XML file(s) and alter the "devgroup" to, say, Telescope. In drivers.xml you an just move around the relevant definitions. INDI should not care what the group is, it is just a hint to the client to organise the drivers.

If you want a driver to run under 1.7.8 I would suggest to roll back git to that relevant commit then rebuild the drivers you want. If you driver was not existing under 1.7.8 you can copy it to your repo once it is pointing to 1.7.8. There may be some minor code changes needed, dependingn on which version it is based on.

Kent,

 

Correct the issue comes down to the compile of the driver. I did inject by editing the xml which I believe was the first post. Issue right now is as soon as I compile the drivers on the local ASI Air it breaks everything. It might work better by trying to setup another SD with simply just Rasbain Buster and then compile the drivers and copy them over. Right now I am going to stop working on this for now as my ASI Air works with all my ZWO equipment. I was just interested to see if I could root the device and possible pave a path which I have done for others. Just need more people to jump in and assist.



#29 KenS

KenS

    Apollo

  • *****
  • Posts: 1,103
  • Joined: 10 Jan 2015
  • Loc: Melbourne, Australia

Posted 18 February 2021 - 06:50 PM

Just realised that another way to"inject" a driver is to use the INDI driver chaining facility. You need the desired INDI driver to be running on another INDI server. Then you need to add the remote connection to that driver into the INDI FIFO on the ASIAir. Whether the App can see it is another matter.

It does require, say, a RPi (a RPi2 is probably enough) to host the other driver. But it is less intrusive this way. 

echo "start driver@remotehost" > indiFIFO

You need to know the path to the INDI FIFO  - usually in \tmp

Also, the driver in the start command is its "friendly" name - not the name of the executable. If the friendly name has spaces then it needs to be quoted and those quotes need to be escaped in the echo command


  • Obs30 and joeytroy like this

#30 AnakChan

AnakChan

    Surveyor 1

  • -----
  • Moderators
  • Posts: 1,871
  • Joined: 01 Sep 2014
  • Loc: Oz

Posted 18 February 2021 - 09:28 PM

@KenS, per PM. After starting indiserver and some basic INDI drivers, I could connect from my Mac's KStars/EKOS client to the ASIAir Pro indiserver successfully. To clarify, that driver@remotehost is the INDI driver on the client side or ASIAir Pro host side? 'cos ASIAir didn't include quite a few of the CCD drivers (although the focuser, mount, powerboxes, some filterwheels, and weather INDI drivers are there).



#31 KenS

KenS

    Apollo

  • *****
  • Posts: 1,103
  • Joined: 10 Jan 2015
  • Loc: Melbourne, Australia

Posted 18 February 2021 - 10:32 PM

Thats good. It  means any INDI client can access the ASIAirPro INDI drivers so most of the restrictions can be worked around.

driver@remotehost is neither client side nor ASIAir Pro side. It is an INDI driver running on another indiserver - say another RPi.

It could be the client if that client is Linux and runs an indiserver. But it does not have to be.

So you now have two (more) options:

  1. If you have an INDI driver you want to make visible to the ASIAir app, you would run it on another RPi. Then add it as driver@remotehost to the FIFO on the ASiAir Pro. Be aware that the ASIAir app may choose to not recognise the driver.
  2. If you want to use functionality not in the ASIAir app using an INDI driver not in the ASIAir app then its even easier. Lets say you want to run latest PHD2 with multistar guiding using your QHY guide cam but you want to do everything else on the ASIAir app. You can run indiserver on another Rpi with the QHY driver then chain in the mount driver from the ASIAir indiserver. PHD2 can connect to your RPi indiserver and see both the mount and QHY camera.
  3. And if you want to use functionality not in the ASIAir app but all the drivers are available, just connect your client to the ASIAir indiserver like you did with Kstars/Ekos

 

So the upshot is you can use any INDI driver you want without having to install on the ASIAir Pro. At worst you need to write to the FIFO which is a temporary named pipe that can be written to by a regular user. At best you do nothing on the ASIAir pro and simply access the INDI drivers already running.


  • joeytroy likes this

#32 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • Posts: 1,161
  • Joined: 03 Jun 2004

Posted 18 February 2021 - 11:06 PM

You can install the indi web manager to start individual drivers. To do so, you will need to install lighttpd as a web server. There are INDI client apps for iOS (iINDI) and Android (Telescope.Touch, aka IPARCOS).


Edited by anat, 18 February 2021 - 11:08 PM.


#33 joeytroy

joeytroy

    Viking 1

  • *****
  • topic starter
  • Posts: 741
  • Joined: 14 Aug 2020
  • Loc: Belen, NM, USA

Posted 18 February 2021 - 11:22 PM

You can install the indi web manager to start individual drivers. To do so, you will need to install lighttpd as a web server. There are INDI client apps for iOS (iINDI) and Android (Telescope.Touch, aka IPARCOS).

Other option is just to install the INDI web manager

 

https://github.com/knro/indiwebmanager


Edited by joeytroy, 18 February 2021 - 11:23 PM.


#34 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • Posts: 1,161
  • Joined: 03 Jun 2004

Posted 18 February 2021 - 11:28 PM

Other option is just to install the INDI web manager

 

https://github.com/knro/indiwebmanager

Yes. The INDI web manager doesn't need another web server.



#35 nikivan

nikivan

    Explorer 1

  • -----
  • Posts: 81
  • Joined: 03 Feb 2019

Posted 20 February 2021 - 02:35 AM

Is there a way to install INDIGO SKY along with ASIAIR? The web interface is pretty good.



#36 KenS

KenS

    Apollo

  • *****
  • Posts: 1,103
  • Joined: 10 Jan 2015
  • Loc: Melbourne, Australia

Posted 20 February 2021 - 04:15 AM

INDIGO Sky is a Raspberry Pi image so it will run on the hardware. But you cannot run the two systems together.

INDIGO can utilise some INDI drivers so it might be compatible with the INDI driver for the power ports on the ASI Air Pro. But that is not a certainty. The driver is close to being added to the INDI library or can be built from source.



#37 spiantino

spiantino

    Vostok 1

  • *****
  • Posts: 112
  • Joined: 24 Jun 2020

Posted 13 April 2021 - 02:58 PM

Picking up this thread as there is a lot of promising work here! 

 

It sounds like ASIAir uses indi for some things (i.e. mount control) but relies on it's own SDKs for other things (e.g. EAF). Any indication which method it uses for filter wheels? I have a backfocus requirement that I can't meet with the EFW but can with the QHY ultra slim filter wheel, so if injecting drivers for that would make it work that would be a plus.

 

Aside from driver injection, I assume running full PHD2 now becomes an option as well. ASIAir has very few guiding parameters to set, so getting full multi-star guiding would be a win. Maybe it's even possible to upgrade the phd2 within the ASIAir and get some extra features in the native interface.

 

Thanks for entertaining my question, and happy to put some work in myself as I have an ASIAir and am not new to hacking open a Linux box (though I don't know much about indi)



#38 joeytroy

joeytroy

    Viking 1

  • *****
  • topic starter
  • Posts: 741
  • Joined: 14 Aug 2020
  • Loc: Belen, NM, USA

Posted 13 April 2021 - 03:36 PM

Thanks for entertaining my question, and happy to put some work in myself as I have an ASIAir and am not new to hacking open a Linux box (though I don't know much about indi)

I stopped working on this project as even after injecting drives I could not get items to load from those drivers. I installed the webcam INDI driver and had the XML updated to show it in the list in ASIAir mobile app but I suspect we would need to decompile their internal apps and edit the code to be able to load those said drivers kind of like what INDI Web does. Now you can run INDI on top of the ASI Air but you will need to control that portion of it from INDI and the rest from ASIAir which could be troublesome. However your best bet is to run INDI, INDIGO, Astroberry or Stellarmate. The sweet thing is because you have the ASIAir you have power ports and KenS wrote a driver which should work with any of those systems. More information is on this thread

 

https://www.cloudyni...-functionality/



#39 msacco

msacco

    Viking 1

  • *****
  • Posts: 582
  • Joined: 13 Aug 2018

Posted 26 April 2021 - 04:14 PM

Hi Joey!

 

Very nice thread, glad to find it. I was pretty much on a similar boat as you, trying to mess with the system, except I don't have a ZWO focuser and therefore trying to make it somehow work for my case.

 

I actually tried most of what you tried a few months ago, including decompiling the apk and trying to see how it works, but unfortunately I did not have much progress.

I think that spiantino about what he said regarding the drivers.

Unuder /home/pi/ASIAIR/lib you can find the followings:

libASICamera2.so
libEAFFocuser.so
libEFWFilter.so

 

I assume that if one could compile their SDK's API to other drivers it might work, but I'm not sure how easy that is, and it looks like the libraries and not really open source, so you have already compiled library that you need to use for that, which makes it a bit harder.

I wonder if it might be easier just starting fresh from an astroberry image / clean raspbian with compiled INDI drivers and then try to work out the apk-ASIAIR API step by step and maybe get these things working somehow.

 

I'm currently thinking of either ditching the ASIAIR for astroberry/StellerMate, but as you said, "I have been spoiled by ZWO".

I really like the ASIAIR app, I haven't tried the StellarMate app though, astroberry is great but being able to work on the ASIAIR using your phone/tablet is really nice, with astroberry it's slightly less comfortable due to the web interface.

 

Let me know what you think and if you'd like to try and work on it together.



#40 kvastronomer

kvastronomer

    Mariner 2

  • -----
  • Posts: 254
  • Joined: 11 Nov 2020

Posted 26 April 2021 - 06:29 PM

There was a thread recently where the default white balance settings for ASI533MC PRO were discussed when using with AsiAir Pro.

It was said that AsiAir Pro uses default settings which are something like 95 blue and 50 red instead of 50/50.

 

It is possible to somehow replace these settings on AAP without getting too deep into SD cards, different images and etc.?


  • Dan_I likes this

#41 joeytroy

joeytroy

    Viking 1

  • *****
  • topic starter
  • Posts: 741
  • Joined: 14 Aug 2020
  • Loc: Belen, NM, USA

Posted 26 April 2021 - 08:07 PM

Hi Joey!

 

Very nice thread, glad to find it. I was pretty much on a similar boat as you, trying to mess with the system, except I don't have a ZWO focuser and therefore trying to make it somehow work for my case.

 

 

libASICamera2.so
libEAFFocuser.so
libEFWFilter.so

 

Let me know what you think and if you'd like to try and work on it together.

msacco,

 

I am always open to working on a project to poke the bear. I think the ASIAir is hands down the best platform out there as it's so simple and has such a nice application to manage your gear from your coach with ease. Other apps like APT, or NINA don't currently offer features like that even though they are more robust applications. One thing I will say is I am looking forward to the multi-star and also planned session with the ASIAir, I am hoping mosaics will be coming down the pipe as well.

 

So why did I leave the list of the drivers you listed? Well I have an SD card loaded with Ubuntu Server 64bit and manually installed INDI. Poking on the SD Card I found the following drivers

 

writable/usr/lib/aarch64-linux-gnu

libASICamera2.so
libEAFFocuser.so
libEFWFilter.so

 

While digging more here is all the open source code for the ZWO products

 

https://github.com/i...master/indi-asi - This is the INDI driver for the ZWO Optics ASI cameras.

https://github.com/i...e/master/libasi - This is for the EAF / EFW drover

https://github.com/i.../indi-asi-power - 12/v Power ports driver written by our very own KenS on CN!!

 

So why do mention this? Well I was thinking it's possible maybe we can wrap these drivers with other drivers for say QHY or other vendors? Mind you I have never compiled a driver like this but maybe KenS can chime and and then maybe we can replace these drivers and create XML files, maybe this is a good starting point?

 

Ken?



#42 joeytroy

joeytroy

    Viking 1

  • *****
  • topic starter
  • Posts: 741
  • Joined: 14 Aug 2020
  • Loc: Belen, NM, USA

Posted 26 April 2021 - 08:15 PM

There was a thread recently where the default white balance settings for ASI533MC PRO were discussed when using with AsiAir Pro.

It was said that AsiAir Pro uses default settings which are something like 95 blue and 50 red instead of 50/50.

 

It is possible to somehow replace these settings on AAP without getting too deep into SD cards, different images and etc.?

Hard to say. I just looked as the SD card and I am not finding anything my guess is it's in the Android/IOS application where they have these settings. Might be worth to open a support ticket with ZWO and see if they can update this.



#43 msacco

msacco

    Viking 1

  • *****
  • Posts: 582
  • Joined: 13 Aug 2018

Posted 27 April 2021 - 06:31 AM

msacco,

 

I am always open to working on a project to poke the bear. I think the ASIAir is hands down the best platform out there as it's so simple and has such a nice application to manage your gear from your coach with ease. Other apps like APT, or NINA don't currently offer features like that even though they are more robust applications. One thing I will say is I am looking forward to the multi-star and also planned session with the ASIAir, I am hoping mosaics will be coming down the pipe as well.

 

So why did I leave the list of the drivers you listed? Well I have an SD card loaded with Ubuntu Server 64bit and manually installed INDI. Poking on the SD Card I found the following drivers

 

writable/usr/lib/aarch64-linux-gnu

libASICamera2.so
libEAFFocuser.so
libEFWFilter.so

 

While digging more here is all the open source code for the ZWO products

 

https://github.com/i...master/indi-asi - This is the INDI driver for the ZWO Optics ASI cameras.

https://github.com/i...e/master/libasi - This is for the EAF / EFW drover

https://github.com/i.../indi-asi-power - 12/v Power ports driver written by our very own KenS on CN!!

 

So why do mention this? Well I was thinking it's possible maybe we can wrap these drivers with other drivers for say QHY or other vendors? Mind you I have never compiled a driver like this but maybe KenS can chime and and then maybe we can replace these drivers and create XML files, maybe this is a good starting point?

 

Ken?

I actually thought of it as well, will need to try and spend more time on it, as I haven't done it myself as well.

I think I'll try to start with the connected part and see if it's even possible to detect other things using the SDK, the only thing I'm not sure about is the some of the functions of the SDK which we still don't have access to them, in the indilib we utilize them but I don't think we can actually know what's the source behind it as it's being read from the dynamic library(I think?), not sure if that's even needed or if it's an issue..

 

Anyhow, I'll try to play with that a bit and see how it goes :)



#44 AnakChan

AnakChan

    Surveyor 1

  • -----
  • Moderators
  • Posts: 1,871
  • Joined: 01 Sep 2014
  • Loc: Oz

Posted 27 April 2021 - 10:34 AM

The thing is that the zwo_imager/guider daemons read those libraries natively. So even if you do recompile those libraries for QHY, or some other brand, you'd also need to work on the zwo_imager/guider daemons. Those processes would talk to the native library protocols.



#45 msacco

msacco

    Viking 1

  • *****
  • Posts: 582
  • Joined: 13 Aug 2018

Posted 27 April 2021 - 10:45 AM

The thing is that the zwo_imager/guider daemons read those libraries natively. So even if you do recompile those libraries for QHY, or some other brand, you'd also need to work on the zwo_imager/guider daemons. Those processes would talk to the native library protocols.

Generally speaking, it seems like the asi camera library is pretty huge....supporting other cameras might be really really hard, but the EAF for example seems much more simple and easier to possibly do.

 

Do you think these daemons also rely on the EAF? If it's only relevant for the main/guiding camera, maybe it would still be somewhat possible.

I can find some EAF references on the zwoair_imager though, but that's not really readable so can't say much..



#46 AnakChan

AnakChan

    Surveyor 1

  • -----
  • Moderators
  • Posts: 1,871
  • Joined: 01 Sep 2014
  • Loc: Oz

Posted 27 April 2021 - 10:56 AM

I believe those daemons would call the EAFFocuser library too. There aren't other daemons that handle the focusing. I'll boot up the ASIAir Pro tomorrow and will dig in further. But IMHO, without the source or without the ability to deconstruct/decompile to modify, it's going to be quite a daunting task to try. That's kinda why I started the other Astroberry on ASIAir Pro H/W thread after I dug into the ASI software.



#47 moshen

moshen

    Apollo

  • *****
  • Posts: 1,384
  • Joined: 17 May 2006
  • Loc: San Francisco, CA

Posted 27 April 2021 - 02:25 PM

I tried Astroberry & Stellarmate on my ASIAir Pro because I wanted to use another EAF (Optec DirectSync). Neither come close to the stability and ease of use of ASIAir for field use.

 

Porting a different focuser would be the best place to start since there's relatively few commands.

 

If it looks like libEAFFocuser.so that ASIAir uses is the same library as the open source INDI driver (can probably check to see if the function symbols in both libraries are the same) then recompiling that library so it uses the same symbols but instead talks to another EAF could work. For example you can move some of the code in the Optec INDI library (or whatever third party EAF you have access to) over just as a proof of it working. Once that's done it can be relatively quick for others to pitch in and port out whatever hardware they want working.


  • Obs30 likes this

#48 msacco

msacco

    Viking 1

  • *****
  • Posts: 582
  • Joined: 13 Aug 2018

Posted 27 April 2021 - 04:31 PM

I tried Astroberry & Stellarmate on my ASIAir Pro because I wanted to use another EAF (Optec DirectSync). Neither come close to the stability and ease of use of ASIAir for field use.

 

Porting a different focuser would be the best place to start since there's relatively few commands.

 

If it looks like libEAFFocuser.so that ASIAir uses is the same library as the open source INDI driver (can probably check to see if the function symbols in both libraries are the same) then recompiling that library so it uses the same symbols but instead talks to another EAF could work. For example you can move some of the code in the Optec INDI library (or whatever third party EAF you have access to) over just as a proof of it working. Once that's done it can be relatively quick for others to pitch in and port out whatever hardware they want working.

Yeah I guess it would be a good place to start with, but as AnakChan said, the EAF/EFW are HID's and the ASIAIR probably talks to these natively.

But I guess I'll try to give it a shot :)


  • moshen likes this

#49 KenS

KenS

    Apollo

  • *****
  • Posts: 1,103
  • Joined: 10 Jan 2015
  • Loc: Melbourne, Australia

Posted 27 April 2021 - 05:05 PM

The INDI ASI drivers provide a wrapper around the native ASI drivers to standardise the interface. Likewise with QHY and other makes. There are some devices, e.g. mounts, where the INDI driver controls the device directly.

As I understand it, the ASIAir (I don't have one) provides a limited set of functionality to make it simpler to set up and use than, say, EKOS. And it provides it via a browser/app interface. It seems that what is needed is an EKOS "lite", ideally with a browser interface. There is EKOS live that is cloud based and needs a subscription. There is also a kind of Ekos Lite https://www.indilib....e-ekos-web.html

There is also a KStars Lite but I can't find anything on how to install or use it

I think what is needed is probably some kind of adaptation of one of these


  • AnakChan likes this

#50 joeytroy

joeytroy

    Viking 1

  • *****
  • topic starter
  • Posts: 741
  • Joined: 14 Aug 2020
  • Loc: Belen, NM, USA

Posted 27 April 2021 - 05:30 PM

The INDI ASI drivers provide a wrapper around the native ASI drivers to standardise the interface. Likewise with QHY and other makes. There are some devices, e.g. mounts, where the INDI driver controls the device directly.

As I understand it, the ASIAir (I don't have one) provides a limited set of functionality to make it simpler to set up and use than, say, EKOS. And it provides it via a browser/app interface. It seems that what is needed is an EKOS "lite", ideally with a browser interface. There is EKOS live that is cloud based and needs a subscription. There is also a kind of Ekos Lite https://www.indilib....e-ekos-web.html

There is also a KStars Lite but I can't find anything on how to install or use it

I think what is needed is probably some kind of adaptation of one of these

For INDI there is also KStars Android application but it's pretty poorly designed and it's not user friendly at all and doesn't work on all devices. I had to find an older version to work on my Google Nexus 6 which is all stock Android?!?!?! I was thinking of looking at the code to play around with it but again I spend 100% of my time on the ASIAir and I own all ZWO equipment. I am sure other manufactures offer solid stuff but it's all I know, like IKON who spent all that money on their name (I Know One Name) and it's how I feel about ZWO, nothing I have seen so far has shown me to move else where.

 

KStars for Android

https://m.apkpure.co...kde.kstars.lite

 

KStars Source Code

https://github.com/K.../README.android




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics