Welcome, Guest
Username: Password: Remember me
27 Feb 2017
INDI development team is happy to announce the release of INDI Library v1.4.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers. Several improvements and enhancements are included in this release including native support for Cygwin and MacOS platforms in addition to Linux, BSD, and Windows (Client only).
Read More...
  • Page:
  • 1

TOPIC: Using a starlight camera with a c++ program

Using a starlight camera with a c++ program 3 days 10 hours ago #16860

  • Ben
  • Ben's Avatar Topic Author
  • Away
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
I'm trying to write a C++ program that can communicate with a Starlight Xpress Ultrastar camera and tell it to take a picture. I'm using a linux vm right now but the final product will be running on a raspberry pi zero. Can the Starlight Xpress driver be used directly from a C++ program? If I can do this from a C++ program then how would I get started? And do I have to first run the indiserver command in the terminal for the driver to work or can it be done without starting a server? I'm new to pretty much all of this so as much information as possible, even if it seems basic, would be extremely helpful.

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

Using a starlight camera with a c++ program 3 days 9 hours ago #16862

Well, there are many ways to do it. You can adapt the existing driver to your needs and take photos with it (no need for INDI or INDI server), or you can write an a simple INDI client (if you plan to use indiserver), or use indi_getprop/indi_setprop commands from any program.

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

Using a starlight camera with a c++ program 2 days 22 hours ago #16869

Ben, as Jasem wrote, it is not necessary to use INDI for this at all. Look at sxccdtest ( github.com/indilib/indi/blob/master/3rdp...ndi-sx/sxccdtest.cpp ) for example how to use interface library ( github.com/indilib/indi/blob/master/3rdp...indi-sx/sxccdusb.cpp ) directly. Peter

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

Using a starlight camera with a c++ program 1 day 8 hours ago #16904

  • Ben
  • Ben's Avatar Topic Author
  • Away
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Thanks for the links! I hadn't had any luck finding the driver source code since I accidentally overlooked the 3rd party folder of the git repo. I was able to get the sxccdtest file running, and it correctly identified the connected device as an ultrastar camera! The only issue is that a lot of the tests output LIBUSB_ERROR_IO. For example the output from the get camera model portion reads as follows:

sxGetCameraModel: libusb_control_transfer -> LIBUSB_ERROR_IO
sxGetCameraModel: libusb_control_transfer -> LIBUSB_ERROR_IO
sxGetCameraModel: INTERLACED COLOR model 16
sxGetCameraModel: -> 36080

Have you seen this problem before where most of the tests have an io error from libusb? From my limited knowledge of usb one thing that seems off is that the output says libusb_control_transfer, but in the source code a bulk transfer is being performed, is that alright?

Also is there any documentation for the driver source files (sxccdusb.ccp/h)? I can follow the code alright, but documentation would help quite a bit. I haven't been able to find any documentation so far. Thanks in advance!

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

Using a starlight camera with a c++ program 23 hours 36 minutes ago #16909

I suspect that USB device is in read-only mode. Did you installed USB rules?

github.com/indilib/indi/blob/master/3rdp.../indi-sx/99-sx.rules

And yes, it is historical typo in the source code, it is actually bulk transfer :) Peter

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

Using a starlight camera with a c++ program 6 hours 57 minutes ago #16922

  • Ben
  • Ben's Avatar Topic Author
  • Away
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
I tried copying the 99-sx.rules file into /etc/udev/rules.d but I still get the libusb io errors when I run the test program. Is that the proper way to install the USB rules? I'm not familiar with .rules files so I'm just going off of what I could find online.

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

Using a starlight camera with a c++ program 3 hours 46 minutes ago #16924

Maybe try /lib/udev/rules.d instead and reload rules by "sudo udevadm control --reload-rules" command. Peter

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

  • Page:
  • 1
Time to create page: 0.305 seconds

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!

Gallery

Replica

Why INDI

Replica