SBIG Linux drivers

Discussion in 'Scripting and Programming' started by Jasem Mutlaq, Dec 6, 2015.

  1. Jasem Mutlaq

    Jasem Mutlaq Standard User

    Joined:
    Dec 5, 2014
    Messages:
    9
    While SBIG Linux drivers are overall working OK, there are some issues when it comes to arm-based single board computers such as Raspberry PI. I don't believe SBIG has a current Linux driver maintainer, and I would like to volunteer my time to maintain & test SBIG Linux drivers to ensure they all work as expected. I have over 10 years experience in Linux and hardware drivers development, and currently maintain the INDI SBIG driver.

    Another issue is that the software page does not include at all any section for Linux. A simple section can be added with the following information:

    INDI (Instrument Neutral Distributed Interface)

    INDI is a cross-platform system designed for automation and control of astronomical instruments. INDI drivers are available for SBIG CCD cameras & filter wheels. INDI supports autoguiding and runs on multiple clients on Linux, OSX, and Android. Read more about INDI and download the latest version directly from the INDI web site>>
     
  2. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,093
    I've reorganized the page slightly so the link to the developers kit includes a reference to Linux.
     
  3. Jasem Mutlaq

    Jasem Mutlaq Standard User

    Joined:
    Dec 5, 2014
    Messages:
    9
    Great thanks! But the INDI Linux driver (based on SBIG Universal driver) is not listed there. You have a "Windows Users" section followed by a "Macintosh OS X Users", can we have a "Linux Users" section as well?
     
  4. Chris Ryan

    Chris Ryan Standard User

    Joined:
    Dec 14, 2015
    Messages:
    1
    +1

    I'd like to see more Linux support please.
     
  5. mckechg

    mckechg Standard User

    Joined:
    Apr 24, 2016
    Messages:
    3
  6. Jakabfi Tamás

    Jakabfi Tamás Standard User

    Joined:
    Jun 7, 2016
    Messages:
    3
    Wiht INDI, is it possible to use ST-7E via parallel port? If yes, how?

    Thank you,
    Tamás
     
  7. Jan Soldan

    Jan Soldan Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    239
    Location:
    Czech Republic
    I would say no, becase INDI driver is based on linux sbigudrv shared library.
    Jan
     
  8. Jakabfi Tamás

    Jakabfi Tamás Standard User

    Joined:
    Jun 7, 2016
    Messages:
    3
    But the documentation said, that the universal driver can support parallel port.

    Or is it supported only under Windows?

    If yes, is there an ASCOM driver for ST-7E?

    Thank you,
    Tamás
     
  9. Jan Soldan

    Jan Soldan Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    239
    Location:
    Czech Republic
    Tamas,
    the first sbig driver was able to talk to parallel port cameras because very old Microsoft Windows allowed that.
    Now, for security reason, you cannot go from user application to the kernel mode and control some hardware there,
    ie. parallel port in our case _without_ a special low level kernel driver.

    SBIG's driver is in fact user mode dynamic link library (sbigudrv.dll), which talks to Window's low level kernel USB driver.
    Under Linux, where an INDI operates, there is libsbigudrv.so (linux shared library), which is mostly the same as dll on Windows, but
    utilizes libusb.so library which communicates with Linux kernel. So, the dll and shared libraries talk to some special USB
    underlying kernel mode USB drivers, not to parallel one. Please ask Jasem Mutlaq which type of sbig library they
    use.

    You can download an old SBIG driver from sbig web page which supports LPT cameras, but I think it works on 32 bit Windows
    only and there may be some further restrictions on Windows OS, I do not know.

    Regards,
    Jan
     
  10. Jakabfi Tamás

    Jakabfi Tamás Standard User

    Joined:
    Jun 7, 2016
    Messages:
    3
    Dear Jan!

    Thank you for your answer.

    Tamás
     
  11. rlancaste

    rlancaste Standard User

    Joined:
    Dec 7, 2015
    Messages:
    25
    Hi I have been extremely impressed with how well INDI works on a Raspberry Pi 3. Jasem has done a fantastic job. My SBIG camera works extremely well with this system and I have already taken some great astrophotos using this setup. Since the Raspberry Pi is small and cheap I have no fear of strapping it with velcro to my telescope and going inside to image over wifi using my laptop on the couch. Or at a star party, I can connect to the telescope over wifi and have no wires strung across the field. I can give my laptop an active role and use it as an INDI client or program software on the raspberry pi to control the whole imaging session and just check in from my laptop using VNC every now and then.

    I was hoping that I could get an ODroid C2 to do the same thing, but I ran into an issue with the arm64 architecture. INDI works just fine in this environment, but the indi SBIG driver relies on the linux binary released by Diffraction Limited/SBIG. While this driver works fine in the current 32 bit environment (armhf) on the Raspberry Pi, it is not compiled in 64-bit (arm64), so I have had some trouble getting it to work on the ODroid. Would it be possible for SBIG to compile this file for the ARM64 architecture as well?

    Thank you!

    Rob
     
  12. aaron archibald

    aaron archibald Standard User

    Joined:
    Sep 14, 2016
    Messages:
    6
    Hello rlancaste,

    Im trying to get an SBIG allsky camera to work with SBIG INDI and eventually a raspberry pi. Im wnodering if you could provide any insight on how to get the drivers to see the device on the correct port. From the SBIG INDI driver download page:

    but it doesn't say how to make it so...

    right now I plug in the device and it shows up as ttyUSB0 and I cannot connect through kstar-ekos. It seems like I need to somehow tell the INDI drivers to look at ttyusb0 for the device, but I have no idea how to do that.

    any help would be appreciated...

    thanks,
    -Aaron
     
  13. Jan Soldan

    Jan Soldan Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    239
    Location:
    Czech Republic
    Aeron,
    as far as I know, SBIG AllSky camera doesn't use SBIG linux driver (libsbigudrv.so). That camera uses its own special I/O serial protocol written by an external developer
    and I am not sure if that protocol is ever publicly available.
    Regards,
    Jan
     
    aaron archibald likes this.
  14. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,093
    The protocol was published. See ftp://sbig.com/pub/devsw/SG4_AllSky-340_SerialSpec.pdf
     
    aaron archibald likes this.
  15. rlancaste

    rlancaste Standard User

    Joined:
    Dec 7, 2015
    Messages:
    25
    Aaron,

    I agree with Jan on this. I would expect the allsky camera to work with a different driver. I do not know because my camera is an 8300M, but I expect that is correct. If so and if the INDI driver does not exist, then I think somebody would need to write the INDI driver to work with it. My recommendation would be to post on the INDI forums to see if anybody knows about such a driver, is working on one, or would be interested in making one. The community is extremely active and helpful. You should get a response very fast.

    http://www.indilib.org/forum.html

    Thanks,

    Rob
     
    aaron archibald likes this.
  16. aaron archibald

    aaron archibald Standard User

    Joined:
    Sep 14, 2016
    Messages:
    6
    Hey Jan, Doug and Rob,

    Thanks for your quick replies.

    thanks to the serial protocol shared by Doug I will be able to make my own simple app to read frames over to my pi, save them as images and upload them to the cloud over wifi.

    Might be reinventing the wheel on the GUI but at least I will know exactly what is going on with each pixel.

    Doug: is there anyone I could ask specific questions about the protocol?

    So far I am able to open and close the shutter, energize and de-energize the shutter, set baud rate, use about all the get functions, define a sub frame, take an image at a specified exposure time.

    What I haven't been able to do is:

    1. toggle the heater (not mentioned at all in the protocol)
    2. transfer the image!! : (

    I can get the first 2049 bytes of the image (1024 pixels + 1 checksum byte ) exactly as expected, but can't figure out how to tell the camera to continue sending.

    The protocol says to send "K"
    So, I'm able to XOR all the received pixels and confirm I get the correct checksum value, but when I send "K" I get no response at all.

    Also, sending "R"
    doesn't get the camera to resend the same batch of pixels. I'm wondering if some detail missing from the protocol or if there is just an error ("K" is already the command to de-energize the shutter)

    If you could shed some light on this that would be great, or if you could point me to the correct person to ask, I would greatly appreciate it.

    I'm soooo close here!

    thanks for your help guys,

    -aaron
     
  17. aaron archibald

    aaron archibald Standard User

    Joined:
    Sep 14, 2016
    Messages:
    6
    ok I have this sorted out now. It was just a timing issue. I was trying to read in the bytes and the send "K" manually from the command line.

    I had to make a script to do it all automatically, so that the "K" would be sent only a few hundred milliseconds after the receipt of the last checksum byte, or the camera will require another "X" command and start sending the image from the beginning again.

    So far my code isn't efficient enough to calculate and verify the checksum and send "K" before the camera resets, but I was able to get all the pixels arranged into a matrix by just tossing out the checksums and sending "K"

    -aaron
     
  18. Stanley Fertig

    Stanley Fertig Cyanogen Customer

    Joined:
    Oct 21, 2014
    Messages:
    13
    So if it exists, where can I download the INDI Linux driver?

    Thanks,
    sf
     
  19. rlancaste

    rlancaste Standard User

    Joined:
    Dec 7, 2015
    Messages:
    25
  20. Stanley Fertig

    Stanley Fertig Cyanogen Customer

    Joined:
    Oct 21, 2014
    Messages:
    13
    Thanks, Rob, for the very quick reply.

    The indilib.org instructions require installing Ubuntu on your computer just to download the file. I find that coercive, I have zero intention of installing a complete OS on my Mac just to download a driver for an SBIG camera. I will either give up the idea of using kstars or sell my SBIG camera and filter if I decide their software is worth doing so.
     

Share This Page