×

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

Bi-monthly release with minor bug fixes and improvements

Building from source

  • Posts: 115
  • Thank you received: 7
I would like to try an write a 3rd party driver. Are there any instructions for building from  the source for Mac?

Thanks

kurt
2 years 8 months ago #74084

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

Replied by Jasem Mutlaq on topic Building from source

Driver for what? camera? mount? We have an example directory here: github.com/indilib/indi-3rdparty/tree/master/examples
2 years 8 months ago #74093

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

  • Posts: 115
  • Thank you received: 7

Replied by Kurt Lanes on topic Building from source

I should have included more details. I have the SDK from Sony for the A7R4 camera that can control the lens focus. I want to build an INDI focuser that can focus Sony cameras. The SDK code uses the Mac Xcode to compile it but the guts of the Sony SDK are supplied in a library and not in source form. I think I can take a generic INDI focuser and add the SDK code plus the few lines of code that I wrote to call the Sony lens interface and make a solution. I had found some instructions for compiling from source on the Mac on Github but they were old and the process didn't work. I am not a software developer and I was not smart enough to figure out why. I could also attempt this on Ubuntu as I have compiled the SDK software there also as Sony provides an linux version of the SDK. In the end tis may not work since the Sony SDK connects to the camera and INDI probably already has a persistant connection to the camera so running the SDK in the middle of that might wreak everything. Libphoto2 supposedly can control the camera focus but when I use gphoto2 to attempt this nothing happens and no errors are generated. So maybe the whole idea of doing this is not going to succeed.

Kurt
2 years 8 months ago #74100

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

  • Posts: 115
  • Thank you received: 7

Replied by Kurt Lanes on topic Building from source

Jasem

Just a quick follow up. I checked a couple of things this morning on kubuntu 20.04.2 LTS running Kstars 3.5.4 Stable, in the INDI panel for the Sony A7R4, under the actions tab is a manual focus field. This field is missing in 3.5.4 on the Mac.

  

When you set this field it indeed changes the focus. The range of values is -7 to 7. I you send a -7 it over the focus 7 steps. If you send another -7 it doesn't move as it stood because it must check that the value was no different from the last value set. I also checked this with gphoto2 and it works correctly if you use the command gphoto2 "--set-config=/main/actions/manualfocus=7" So it seems like the functionality is in INDI to create a focuser that will drive the camera.

Kurt
2 years 8 months ago #74112
Attachments:

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

Replied by Jasem Mutlaq on topic Building from source

What about the focus tab next to it? that should also send the command as well. Did you try that?
2 years 8 months ago #74127

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

  • Posts: 115
  • Thank you received: 7

Replied by Kurt Lanes on topic Building from source

Jasem

The only item on the focus tab is a switch that sets the autofocus mode.

Thanks

Kurt
2 years 8 months ago #74143

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

Replied by Jasem Mutlaq on topic Building from source

Currently it checks for manualfocusdrive while what you reported is manualfocus ... I pushed a change that will make it look for that as well. Not sure if it will work though. Please pull from Github 3rd party report (indi-gphoto) compile, install, and check again.
2 years 8 months ago #74152

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

  • Posts: 115
  • Thank you received: 7

Replied by Kurt Lanes on topic Building from source

Jasem

Thank for the time you are taking with me on this. I really appreciate it. So I set my camera to manual focus using a preset and INDI leaves it alone. The test I did was to focus by hand and then set the manual focus to +7 and observed tha the focus moves 7 steps and the set it to -7 and observed that it moved back. If I enter the same number twice the focus moves on the first and ignore the second and subsequent entries.

I actually do not know how to build code on a Mac or Linux system. I installed gphoto2 on the Mac using brew but this version seems stale. I installed in on ubuntu using ap after downloading the code.

There is this script github.com/JerryBlack/buildKstarsNightlyFromGit that was referenced in a post here. I was going to try this. I am unclear if is this is a ubuntu or Mac script.

How challenging would be to meld the code behind this indi tab with a generic focuser to get a sony focuser?

I can focus my Sony to get 2 pixel FWHM stars but it doesn't stay there for more than a hour and I have to disconnect from Indi to do it and that is a hazardous process.

Thanks

Kurt
2 years 8 months ago #74154

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

  • Posts: 115
  • Thank you received: 7

Replied by Kurt Lanes on topic Building from source

Jasem

I was able to use the script above to build Kstars on Kubuntu. That worked great. I tried the focus tab and the action tab.

If I put a number in the focus tab and click set I get:

Dispatch command error(-1): INDI: Could not find property ABS_FOCUS_POSITION in Sony DSLR DSC-A7r IV (Control)
<setNumberVector device="Sony DSLR DSC-A7r IV (Control)" name="ABS_FOCUS_POSITION" state="Busy" timeout="60" timestamp="2021-08-05T17:56:09">
<oneNumber name="FOCUS_ABSOLUTE_POSITION">
0
</oneNumber>
</setNumberVector>


If I go the the action tap and put a 6 in and click set the focus moves 6 steps in the far direction. If I put a -6 and click set nothing happens. Clicking set twice more causes the focus to return to the initial setting. Additional sets with out changing the value do nothing. It seems kind of erratic. I tried setting debug on but i get:
org.kde.kstars.indi: Sony DSLR DSC-A7r IV (Control) :  "[INFO] Debug is enabled. "
org.kde.kstars.ekos: "Re-disabling debug logging for Sony DSLR DSC-A7r IV (Control)..."
org.kde.kstars.indi: Sony DSLR DSC-A7r IV (Control) :  "[INFO] Debug is disabled. "


Thanks

Kurt


 
2 years 8 months ago #74175

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

Replied by Jasem Mutlaq on topic Building from source

You need to build and install indi-gphoto from Github, not KStars. Also, debug logs are toggled from Ekos --> Logs.
2 years 8 months ago #74186

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

  • Posts: 115
  • Thank you received: 7

Replied by Kurt Lanes on topic Building from source

Ok. I think that is over my head. I ran the script github.com/JerryBlack/buildKstarsNightlyFromGit to build this. Modifying the script to use a different repository is probably beyond my capabilities.

Thanks

Kurt
2 years 8 months ago #74189

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

  • Posts: 115
  • Thank you received: 7

Replied by Kurt Lanes on topic Building from source

Let me ask. If I have a Kstars installation and I build INDI from the nightly build and will Kstars use this build?

Thanks

Kurt
2 years 8 months ago #74205

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

Time to create page: 0.893 seconds