×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Driver for the ZWO Optics ASI Cameras

  • Posts: 18
  • Thank you received: 3
Hi,

I've written the INDI driver for the cameras mentioned in the subject. You can find the sources here: github.com/chripell/indi_asicam I'm new to INDI so I would like to have other people trying it and confirm it's OK. I tested it with OpenPHD and KStars/EKOS, it looks right, but it's better to check. Afterwards I would like it to be included in the 3rdparty directory of the official distribution, if possible. I have to do some clean-up and use cmake instead of a simple Makefile of course.

Please refer to the README.md for further information.

Thanks!
10 years 1 month ago #693

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

Great! Thanks for the driver chripell. After you utilize cmake, let me know so I can include it in the 3rd party repo. Furthermore, it would be better to include libASICamera.h and libASICamera.a as well instead of asking users to download them, and have CMake install them properly. Is the source code for libASICamera available or just the binary blob? If ZWO Optics only provides the binaries, then we need x86 & x86-64 binaries at minimum, and preferably one for armhf.
10 years 1 month ago #695

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

  • Posts: 712
  • Thank you received: 174
...and one for MacOS X as well :-)
10 years 1 month ago #697

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

  • Posts: 18
  • Thank you received: 3
Unfortunately there is no source available, but there are static libraries available for i386, amd64, armel compiled for armv5 and armhf compiled for armv6 (I'm testing on OpenRD and other people are using it on Raspberry PI). I don't know much about MacOSX but I successfully used them on Android. The dependences are libusb-1.0 and the basic GCC C++ support.

While I'm waiting feedback from other users I'll do the modification asked by krno.
10 years 1 month ago #698

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

Any update on the driver? I plan to release the next version of INDI Library soon and would like to include the driver in the 3rd party package.
The following user(s) said Thank You: Thomas Seckler
10 years 2 weeks ago #767

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

  • Posts: 18
  • Thank you received: 3
Hi, of course! :-)

As you can see in the master branch of: github.com/chripell/indi_asicam

1) I ported everything to cmake. It took me some time to learn but cmake is quite cool, i will consider it even for other projects.

2) debugging output is now optional as described in README.md

3) I included the binaries needed to compile it as you asked (I asked permission to ZWO Optical for this). I tested compilation on i386, amd64 and armel. I don't have any armhf systems right now lying around.

4) fixed bugs

These days I was doing as much testing as possible (we had nearly 3 months of rain rain rain here in Italy, so I'm using every good night, even with the nearly full moon, at least for testing gear). So, I think that coed is in good shape to be considered beta and available to the general public. Let me know if you see other problems with code style that I should fix. Thank you very much!
Last edit: 10 years 2 weeks ago by Christian Pellegrin.
10 years 2 weeks ago #772

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

Great! I imported the code into INDI 3rd party repo and made quite a few changes. So please Check out the code and let me know if it is still working or whether I have broken it :-)
svn co svn://svn.code.sf.net/p/indi/code/trunk/3rdparty/indi-asicam

Also, if you have a SourceForge username let me know so I can add you to the project in case you need to make any future modifications to the branch. A launchpad project was also created so that Ubuntu packages get built for ASICAM (launchpad.net/indi-asicam).
10 years 2 weeks ago #774

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

  • Posts: 18
  • Thank you received: 3
Hi, I made a new account chripellsf on SF.

I checked out and tested and found just 2 minor problems and one a bit more important:

1) the .a files are missing

2) with your code reorganization openCamera and friends is called after isAvailable(CONTROL_GAIN) so gain is not exported. To say the truth all ASI Cams support gain so you can just do if(1):

// gain
if (1) {
IUFillNumber(&GainN[0], "GAIN", "Gain", "%0.f", getMin(CONTROL_GAIN), getMax(CONTROL_GAIN), 1., getValue(CONTROL_GAIN, &is_auto));
IUFillNumberVector(&GainNP, GainN, 1, getDeviceName(), "CCD_GAIN", "Gain", IMAGE_SETTINGS_TAB, IP_RW, 60, IPS_IDLE);
}

otherwise registration of the Gain knob has to be moved in connect.

3) Now it's not possible to differentiate between 2 cameras because just one is registered. Or at least I don't see how to do it.

Otherwise I tested the single camera configuration and everything is OK.

I saw you did a lot of code style changes. Sorry for that, next time I will adhere more to the coding standards of the project.
10 years 2 weeks ago #775

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

  • Posts: 18
  • Thank you received: 3

perhaps you intended to solve this by having 2 indiservers on different port if someone needs 2 ASI cameras? I know it's a rather particular user case, so I think your solution is OK in the 99% of the time.
10 years 2 weeks ago #776

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

Ok, I added you to INDI SF now so you can make commits to the repo. I also added the missing .a files and made a change so that the Gain min, max, and value are set in UpdateProperties() function after Connect is complete. Regarding differentiating cameras, it is possible to rename the camera by setting INDIDEV environment variable before starting the driver, or by using INDI Server in FIFO mode and setting the name accordingly. However, is there a way to enumerate the list of available cameras and present them perhaps in a switch property so that the user can select which camera to connect to? I think this is better than relying on the exec name to figure out which camera to connect to. What do you think?
10 years 2 weeks ago #777

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

  • Posts: 18
  • Thank you received: 3
But if you have a switch you can use just one camera from every INDI client, because there is just one driver, right? For example in the OpenPHD menu ("ASI CCD" in the Camera driver menu) I can select just one. Anyway I think it's OK, because the meaningful user case is having one camera for guiding and one for acquiring. So OpenPHD connects to one and Ekos to the other.

The snippet of code for enumerating the cameras is simply:

#include <stdio.h>

#include "ASICamera.h"

int main(void) {
int numDevices, i;

numDevices = getNumberOfConnectedCameras();
if(numDevices <= 0) {
fprintf(stderr, "no camera connected\n");
return -1;
}
else {
printf("attached cameras:\n");
}
for(i = 0; i < numDevices; i++)
printf("%d %s\n",i, getCameraModel(i));
return 0;
}

and you get:

chri@fudoh:~/t/enum_asi$ ./enum_asi
attached cameras:
0 ZWO ASI120MC
1 ZWO ASI120MM

Let me know if I should do the change before or after you do a release. Today I'm busy with my daily job, I can do it tomorrow.
10 years 2 weeks ago #779

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

Ideally, one driver should be able to operate multiple cameras. But looking as ASICamera.h it looks that all subsequent calls is only applicable to the last opened camera and not one in particular and therefore it wouldn't be possible to support multiple cams in one driver using their API. Is that the case?
10 years 2 weeks ago #782

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

Time to create page: 0.862 seconds