Ben replied to the topic 'Using a starlight camera with a c++ program' in the forum. 2 months ago

Yeah, I was indeed working with Virtualbox. I didn't think that the vm was the problem though because I was getting the device descriptor and whatnot just fine, I even got a GET_ENDPOINT_STATUS control transfer to successfully execute. I figured if the vm was going to be an issue then nothing would work at all. But I stand corrected haha. Thank you for your patience and help with all of this, I really appreciate it!

Read More...

Ben replied to the topic 'Using a starlight camera with a c++ program' in the forum. 2 months ago

Been a little while, but I think I finally figured it out. I have been using a linux VM to develop and test code. After hitting a few more walls I realized I had never tried running the code on a native linux machine. I had assumed that since the program was getting the PID and a handle to the camera successfully that it couldn't be the VM's fault because otherwise I wouldn't have gotten that far. But as a sanity check I tried running the indi-sx driver code on my raspberry pi zero, and it worked perfectly! I'm not sure what the problem is, but having the program run through a virtual machine seems to be the reason why the camera commands were failing.

Read More...

Ben replied to the topic 'Using a starlight camera with a c++ program' in the forum. 3 months ago

It might be prudent to quickly run through what I've done to make sure I didn't simply overlook something obvious. I copied 99-sx.rules into /etc/udev/rules.d and into /lib/udev/rules.d and reloaded the udev rules using udevadm control --reload-rules. I have downloaded libusb-1.0. After downloading the repo I navigated to the 3rdparty/indi-sx folder and compiled the test program with the following command: g++ sxccdtest.cpp sxccdusb.cpp sxccdusb.h sxconfig.h -lusb-1.0
That compiles successfully and produces the executable a.out. When I run a.out it successfully gets the device descriptor (presumably) because it displays the expected PID and VID along with the camera name 'ultrastar'. Each command in the test program uses a bulk transfer, but each attempt at a bulk transfer results in the libusb io error. All data that is printed on the screen is inconsistent and presumably garbage data. I've attached the output from one of the runs of the program.

Does any step of that process seem off? I'll start looking at how to get the INDI driver running and see if that provides different results.

Read More...

Ben replied to the topic 'Using a starlight camera with a c++ program' in the forum. 3 months ago

I've tried running sudo ./a.out, and I still get LIBUSB_ERROR_IO every time a bulk transfer is attempted, and whatever data I do get back is all garbage data that is inconsistent between runs of the program. I noticed that the 99-sx.rules file didn't have a line with the PID for an ultrastar so I created a line for that matching the VID and PID to an ultrastar. Still no luck there. I navigated there and unplugged and re-plugged in the camera and identified the new file, and viewed the file properties and under the permissions tab is says Owner: root and Access: read and write. The read and write part is part of a drop down box that cannot be edited. So, assuming that's a proper check for read/write access, does that mean that the device is write-able and that the issue lies elsewhere?

Read More...

Ben replied to the topic 'Using a starlight camera with a c++ program' in the forum. 3 months ago

I tried copying the 99-sx.rules file into /lib/udev/rules.d instead and ran the reload rules command, but no such luck. I still get a lot of libsub IO errors. I tried deleting the 99-sx.rules file from /etc/udev/rules.d just to make sure they weren't somehow interfering with each other, but still nothing. I'll be looking into libusb to see if I can get more information about the error for troubleshooting. If you have any more suggestions they would be greatly appreciated!

Read More...

Ben replied to the topic 'Using a starlight camera with a c++ program' in the forum. 3 months ago

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.

Read More...

Ben replied to the topic 'Using a starlight camera with a c++ program' in the forum. 3 months ago

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!

Read More...

Ben created a new topic ' Using a starlight camera with a c++ program' in the forum. 3 months ago

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.

Read More...

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!