worlickwerx / sbig-util

Linux utility for Santa Barbara Instrument Group cameras for astronomy
GNU General Public License v3.0
5 stars 2 forks source link

Sbig-util and INDI #43

Open andrewtubbiolo opened 4 years ago

andrewtubbiolo commented 4 years ago

Hi:

I have the sbig-util packages working and I am able to command and obtain images over your virtual parallel port. That's really awesome. I'm looking at getting this package to interoperate with Ekos and while researching the INDI forums it seems to be a hanging issue left open in the "not working yet" state. I tried adding the camera to Ekos, but I don't have a good enough command of the K-stars.Ekos, INDI biosphere yet to know if the sbiglpt0 won't interoperate with the INDI world yet, or if I just don't know what I'm doing yet. Have you had any success or heard of anyone being successful in running their parallel port cameras via INDI/Ekos/K-Stars?

Thanks Andrew

garlick commented 4 years ago

Good to hear Andrew - congrats for getting it all going (no small effort)!

I wish I had my gear with me to confirm with the latest versions, but it did work within the last year for me. The INDI sbig driver uses the same "sbigudrv" camera support library that sbig-utils does, so you should be able to select that driver in the INDI dialog for Kstars/ekos and then tell it to use device "LPT1", and that will be passed through to libsbigudrv, which opens sbiglpt0 and communicates with the camera.

If you could drop a link to the forums post you're referring to that might jog my memory if there were any hurdles I'm not remembering.

I've not had a lot of time to dig into Kstars/ekos, but it looks like it has made a large leap forward in the last couple of years, so I'm motivated to be sure the combination of bits you're trying works, insofar as I can help.

One other combination I've played with is OpenPHD guiding with INDI. That worked quite well with a parallel port ST-5c camera.

p.s. I edited your comment above to remove paragraph indentation which (unreasonably) seems to cause github to render the paragraph as one line of monospace font.

andrewtubbiolo commented 4 years ago

Hitting some roadblocks. It seems I don't have the indi-sbig driver with my indi install, and it's not part of the stock distro. The ppa is rejecting things, and it seems as of Jan '19 there is no 64 bit version of indi-sbig. I can't even find out if my OS is 64 bit as uname -a is not reporting bit'ness. I think I'm going to re-install a 32 bit OS and start from scratch to build back up to where I am, or just write a python GUI front end to construct system calls to your sbig-util ecosystem. Which I'm not opposed to doing as it appears the future of sbig support is looking grim.

garlick commented 4 years ago

If still working on a pi, you do need to a 32-bit OS since (as far as I know, see #41) there is no sbigurv.so for 64-bit ARM. All raspbians are 32 bit, in case that helps.

I have a pi3 around here someplace. I'll see if I can get the ppas to work to at least get stuff installed (no camera or parallel port available at the moment though).

The config I had working was camera on the pi and kstars on a laptop elsewhere. So I may not have confronted whatever issues you're having with all the prereqs if you're trying to do it all on the pi... I'm getting nowhere googling on this stuff - everybody seems confused.

garlick commented 4 years ago

I'll see if I can get the ppas to work to at least get stuff installed

Oh duh, PPAs are for Ubuntu only.

I remember before there was a tarball of .debs that you could download that included everything built for raspbian, including the sbig driver. Given that the instructions online now just suggest apt-get install indi-bin on raspbian, and that doesn't include the sbig driver, we need to build debs from the github repo?

Well that's inconvenient. There are some recipes here:

https://indilib.org/forum/development/5379-update-for-indi-drivers-for-raspberry-pi.html

I'll try a couple things and see what works.

andrewtubbiolo commented 4 years ago

I'm on a Pi 3B+ and, of course I'm 32 bit, because my sbiggurv is working. Okay, I'll just go download a .deb and plunk the driver in the proper directory, or try harder with ppa. Honestly I can control the camera temp, and take images, I'm 90% functional. If I can't integrate it with the INDI universe it's not the end of the world.

Andrew

garlick commented 4 years ago

Oh right :-)

Rasbpian or ubuntu mate?

garlick commented 4 years ago

Maybe the lack of pre-built packages for the pi is temporary. See indilib/indi#1029

andrewtubbiolo commented 4 years ago

Raspbian. I was looking thru the source for the sbig driver in the indi source .tgz. While I can't see indi-sbig listed in the driver file list during a global file search on 'sbig' or 'indi-', K-Stars is acting the way the Readme file says it's supposed to if the indi-sbig driver was there. I can select a SBIG CCD in K-stars -> Tools -> devices -> Device Manager -> SBIG CCD. But the only entry I can edit is PORT and I've tried LPT1 and sbiglpt0, nothing happens. No indication that the indi server is running let alone with the device driver, and when I go to Ekos the list of avail imaging devices is a small subset of what is listed in K-stars. I have to admit I'm massively ignorant about how these packages work. What I'd really like to do is work at the shell level and do things by hand, but I can't seem to find a document that leads me thru that process. I'm afraid at this point my ignorance of INDI and the way K-Stars and Ekos work is leaving me flailing with nothing to grasp onto as a constant. I think I should probably just hook up a web cam and get video4l going as a working pipeline, then come back at the sbig quest with fewer loose ends.

garlick commented 4 years ago

OK, I'm going to checkpoint my work today also and maybe come back when I have some hardware.

I didn't find any prepackaged raspbian debs that include the sbig driver. Installing indi-bin with apt seems to yield only part of the system.

The sbig driver is alive and well in the indi-3rdparty github repo. However, following instructions for a la carte build of libsbig and indi-sbig failed with compilation errors on the latter. It seems the installed libindi is too old.

Uninstalling the packaged libindi stuff, and building from indi seemed like it was going to work when I trashed my system doing something unrelated. My plan was to install the result unpackaged and go back to the indi-sbig build and see if it worked, then install that.

At this point verifying that the camera works with sbig-util would have been useful, but I don't have hardware.

Assuming everything went OK, I was going to try to install Indi Web Manager on the pi, which I had used successfully before. Through its web interface you can select the sbig driver and have it run the indi server.

https://indilib.org/support/tutorials/162-indi-web-manager.html

Then what I did before was point Kstars/ekos on another system at the IP:PORT of the indi server on the pi.

I got briefly excited by the way when I found a python binding for INDI. But sadly it doesn't insulate you from the rather strange way that the drivers are accessed (with properties and so forth). It's just a swig translation of the C++ API, which is usually a red flag in my book. However, you mentioned wanting to wrap sbig-util in python, so...

https://indilib.org/develop/indi-python-bindings.html

One advantage of doing it this way over sbig-util is that the INDI server is persistent. That is, it makes a connection to the camera and keeps it open while you do multiple operations. sbig-util starts over for each command, and incurs an annoying delay each time.

andrewtubbiolo commented 4 years ago

For my ego I'm glad to see the problem is not my lack of basic understanding. If YOU are running into the same nature of problems I am, it at least makes me only frustrated with the problem and not myself. :) Thanks for those links I'll explore them in depth as my homework this week. Thanks for the excellent pointers and help.

knro commented 4 years ago

SBIG does not provide arm64 version of their library. We asked them for years to no avail. There are in fact the last camera manufacturer that does not have 64bit support.

StefanBaar commented 4 years ago

SBIG does not provide arm64 version of their library. We asked them for years to no avail. There are in fact the last camera manufacturer that does not have 64bit support.

I opened a arm64 driver request in the diffractionlimited forum a few weeks ago: https://forum.diffractionlimited.com/threads/linux-drivers-for-arm-v8-64bit.6290/

I got a quick response, saying that their currently working on compiling a driver .... but haven't heard anything since ... :-(

knro commented 4 years ago

Sounds a lot like what I heard a couple of years ago. I even offered to compile the library for them under arm64.

garlick commented 4 years ago

@krno and @shissler1987 - FYI: Adam at DL just posted arm64 and armhf binaries of the sbigudrv v4.99 over here:

https://forum.diffractionlimited.com/threads/linux-drivers-for-arm-v8-64bit.6290/