Resolved SBIG-340 protocol

Discussion in 'Scripting and Programming' started by Edward, Mar 14, 2017.

  1. Edward

    Edward Standard User

    Joined:
    Mar 14, 2017
    Messages:
    5
    I have a trouble with all-sky camera SBIG-340 using my utility. After writing a wrong data sequence into port (starting boltwood's daemon on port, belonging to all-sky) I can't get image: in any image format the first data portion have less bytes than need and after the first data portion transfer stops. All other communications (get version, send commands) works fine.

    I see that protocol from camera's homepage isn't full.
    Is there a place, where I can found full protocol description for this all-sky camera? Or at least can someone to clarify, how can I return camera to its original state? Reset didn't help me.

    I need to run this camera under linux to have ability of raw FITS files archiving (including header with boltwood's data) & posting color image to web page.
     
  2. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    3,527
  3. Edward

    Edward Standard User

    Joined:
    Mar 14, 2017
    Messages:
    5
    Yes, and according to reply on random commands it isn't full.
    The problem with broken images solved by a strange way: if I run fits_capture.py, image readout goes well. After that my daemon have no troubles with reading. It's quite strange...
     
  4. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    3,527
    This is a list of all commands from the firmware, except those used for production test. If you need any additional details on one of the commands, just ask.

    case 'A': // Abort exposure
    case 'B': // Baud rate
    case 'E': // Echos an 'O' back
    case 'F': // Find guide star
    case 'G': // Guide
    case 'g': // Enable/disable the heater in the all-sky camera.
    case 'H': // Calibrate guiding
    case 'I': // Guide
    case 'K': // Turn off shutter
    case 'k': // Read I2C
    case 'L': // Write I2C
    case 'l': // returns LED state
    case 'M': // Set MaxMove
    case 'm': // Get MaxMove
    case 'N': // Set MinMove
    case 'n': // Get MinMove
    case 'O': // Open shutter
    case 'P': // Reprogram firmware
    case 'r': // Get serial number
    case 'S': // set subframe
    case 'T': // Take image
    case 't': // request image
    case 'U': // Set shutter cycle mode
    case 'V': // Get version number
    case 'x': // Transfer selected image
    case 'X': // Transfer Image!
    case 'Y': // Set Y Agressiveness
    case 'y': // Get Y Agressiveness
    case 'Z': // Set X Agressiveness
    case 'z': // Get X Agressiveness
     
  5. Edward

    Edward Standard User

    Joined:
    Mar 14, 2017
    Messages:
    5
    That's interesting, thanks!
    But is there some documentation for these commands? For example, 'k', 'L', 't' and 'x'?
     
  6. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    3,527
    I have to read the firmware to provide more information. So please only ask for a command that you have a specific need for.
     
  7. Edward

    Edward Standard User

    Joined:
    Mar 14, 2017
    Messages:
    5
    OK, please, explain me specific of commands 't' and 'x'.
     
  8. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    3,527
    I'm not sure these two messages are actually useful... they might be for debug/test or something.

    't' command: 2 bytes
    first byte is ignored
    second byte <> 0 means requesting image.
    The command just turns on the flag saying a PC image download is requested, with out actually taking an image.

    'x' command: 4 bytes
    first byte is ignored
    second byte Binning
    third byte Frame Type
    After that it works just like 'X'
     
  9. Edward

    Edward Standard User

    Joined:
    Mar 14, 2017
    Messages:
    5
    Thank you. So, these are service commands?
    I deal with my problem, it was when I tried to save old tty state by ioctl(comfd, TCGETA, &oldtty). Without it all works fine. Debayering done by libraw. So, the "hardware part" is done.
     
  10. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    3,527
    Yes.

    Glad you figured it out; I will mark this as resolved.
     

Share This Page