Staff Assigned: Adam Robichaud node.js SBIG control software

Discussion in 'General' started by Davide Ricci, Sep 17, 2019.

  1. Davide Ricci

    Davide Ricci Standard User

    Joined:
    Sep 17, 2019
    Messages:
    5
    Hello,

    our research group owns a SBIG STL-11000M with guiding probe, and can access to a STF-8300M for tests.
    We recently ordered a SBIG STX-16801 with FW-8, STX-Guider and AO-X.

    Our goal is to write a control software for these SBIG cameras under Linux using node.js and the libsbigudrv to control different SBIG cameras.

    The software is in an early development stage and can be found here.
    https://github.com/Nunkiii/seo
    In particular, the package interfacing with SBIG cameras is
    https://github.com/Nunkiii/node-sbig/
    We currently use the libsbigudrv 2.1, which comes with the indi-sbig software package in Ubuntu repositories. indi-sbig package also correctly installs the firmware.

    Tests with the STF-8300M and the STL-11000M indicate differences in the management of the fan.
    In the case of the STF, the fan is always on while taking exposures.
    In the case of the STL, the fan stops after the end of the first exposure.
    We investigated the issue and we wonder if it is related to this:
    https://github.com/garlick/sbig-util/issues/38

    We would like to ask you where we can find the latest version of libsbigudrv and the firmware in order to repeat the tests, and eventually an official documentation to install library and firmware on a Linux machine, so that we are independent from the release of the indi-sbig package.

    Cheers,
    Davide on behalf of the ORSA group
    http://www.orsa.unige.net/index.php/en/about/
     
  2. Colin Haig

    Colin Haig Staff Member

    Joined:
    Oct 27, 2014
    Messages:
    2,363
  3. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    694
    Location:
    Ottawa
    We're working on two installers: one is a Debian package (currently in beta), and the other is a tarball. Which would you prefer?

    -A
     
  4. Davide Ricci

    Davide Ricci Standard User

    Joined:
    Sep 17, 2019
    Messages:
    5
    If is it possible to test both, it would be great. Otherwise, tarball is OK.
     
  5. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    694
    Location:
    Ottawa
    The .deb package is here: https://www.dropbox.com/s/wwt1033njtamqns/sbigudrv_4.99_amd64.deb?dl=1

    You can install it using:
    sudo dpkg -i sbigudrv_4.99_amd64.deb
    sudo apt-get install -f


    The tarball, it turns out, is not currently being maintained. If you experience any issues installing the above deb package, let me know and I'll roll a new one for you.

    Let me know how it turns out!
    -A
     
    Last edited: Sep 19, 2019
  6. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    694
    Location:
    Ottawa
    FYI: I updated the instructions above.
     
  7. Davide Ricci

    Davide Ricci Standard User

    Joined:
    Sep 17, 2019
    Messages:
    5
    Thank you.

    I removed previously installed version of the library and the firmware:
    Code:
    sudo apt remove --purge indi-sbig libsbig libsbigudrv0 libsbigudrv-dev
    
    Than I downloaded and installed the version you provided:
    Code:
    sudo dpkg -i sbigudrv_4.99_amd64.deb
    sudo apt-get install -f
    
    Plugging the camera, the device is recognized. `dmesg`:
    Code:
    [  136.486217] usb 6-2: new full-speed USB device number 3 using uhci_hcd
    [  136.864247] usb 6-2: New USB device found, idVendor=0d97, idProduct=0002
    [  136.864251] usb 6-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    
    but the fan does not switch on.
    This behavior persists after
    - unplugging/replugging the USB cable,
    - unplugging/replugging the power cable,
    - rebooting the machine.

    The pc runs Ubuntu 18.04.1 LTS, Linux Kernel 4.15.0-64-generic
    The tested camera is the STL-11000M
    The behavior is consistent with the version of libsbig in Ubuntu repositories.
    Actually, the only way to let it work is with the indi-sbig package.

    I was then unable to proceed with the actual test: check if the fan stops after the first exposure.
     
  8. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    694
    Location:
    Ottawa
    It sounds like there's a problem with the firmware loader for older cameras. Let me do a quick check to make sure everything is wired up correctly in the installer.
     
  9. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    694
    Location:
    Ottawa
    OK, so the udev rules require fxload be installed before the camera will be detected—this doesn't appear to come stock with Ubuntu 18.04 (at least, it didn't with mine). I advise you run sudo apt install fxload, then power cycle the camera. If that doesn't work, you'll need to make sure the camera's firmware files are located in /lib/firmware. You can do that by verifying ls /lib/firmware | grep sbig returns the following:
    $ ls /lib/firmware | grep sbig
    sbigfcam.hex
    sbiglcam.hex
    sbigpcam.hex
    sbigucam.hex
     
  10. Davide Ricci

    Davide Ricci Standard User

    Joined:
    Sep 17, 2019
    Messages:
    5
    We installed fxload. The camera is now detected with the package you provided.
    Unfortunately, the behavior is the one we reported:
    In the case of the STF, the fan is always on while taking exposures.
    In the case of the STL, the fan stops after the end of the first exposure.
     
  11. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    694
    Location:
    Ottawa
    Re: the STF—that is as-designed. There is no manual control of the STF fan.
    Re: the STL—are you making any calls to CC_MISCELLANEOUS_CONTROL?
     
  12. Davide Ricci

    Davide Ricci Standard User

    Joined:
    Sep 17, 2019
    Messages:
    5
    We make two calls to CC_MISCELLANEOUS_CONTROL in the close_shutter method: (https://github.com/Nunkiii/node-sbig/blob/master/src/sbigcam.cpp#L2158)

    Code:
    
      void sbig::close_shutter(){                                                                                                                               
                                                                                                                                                               
        MiscellaneousControlParams mcp;                                                                                                                         
                                                                                                                                                               
        mcp.fanEnable=0;                                                                                                                                     
        mcp.ledState=LED_BLINK_HIGH;                                                                                                                           
        mcp.shutterCommand=SC_CLOSE_SHUTTER;                                                                                                                   
                                                                                                                                                               
        //    short int err;                                                                                                                                   
        //err=                                                                                                                                                 
        pcam->SBIGUnivDrvCommand(CC_MISCELLANEOUS_CONTROL, &mcp, NULL);                                                                                       
        check_error();                                                                                                                                         
                                                                                                                                                               
        mcp.fanEnable=0;                                                                                                                                     
        mcp.ledState=LED_ON;                                                                                                                                   
        mcp.shutterCommand=SC_CLOSE_SHUTTER;                                                                                                                   
        //err=                                                                                                                                                 
        pcam->SBIGUnivDrvCommand(CC_MISCELLANEOUS_CONTROL, &mcp, NULL);                                                                                       
        check_error();                                                                                                                                         
                                                                                                                                                               
        //    MINFO  << " Shutter closed !" << endl;                                                                                                           
      }             
    
    Commenting the mcp.fanEnable=0 lines, the fan still stops after the first exposure.
    Commenting the CC_MISCELLANEOUS_CONTROL call, the fan does not stop anymore, but then we are unsure whether the shutter closes.
     

Share This Page