Skip to content

Linux Driver for the Orion Starshoot Pro V2.0 Deep Space Color Imager

License

Notifications You must be signed in to change notification settings

compeoree/opensspro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Driver for the Orion Starshoot Pro V2.0 Deep Space Color Imager.

Background

I wanted a way to capture images, at a remote observatory, without lugging my laptop (running Windows) out into the field. And being remote, it doesn't have line power, so I am stuck running everything off of a finite supply.

It is anticipated that this driver will allow embedded systems the ability to capture images using this very capable camera.

 

Building

Folder Structure

  • src - C++ Source code
  • usb-logs - Wireshark and USBPcap capture files
  • examples - Simple demos to test the camera connection

 

Dependencies

  • libusb-1.0
  • cfitsio3410
  • CCfits-2.5

 

Compiling cfitsio Library

./configure --prefix=/usr/local make -j3 sudo make install

 

Compiling CCfits Library

./configure make -j3 sudo make install

 

Add local library to search path

sudo nano /etc/ld.so.conf.d/fits.conf

Add the following line to fits.conf /usr/local/lib

Save and exit then run sudo ldconfig

 

Indilib Support

indilib support is being worked on. Current progress can be found in the sspro branch of my indilib fork.

 

Technical Information

Basic information about the sensor and associated hardware can be found on the product page on Orion Telescopes & Binoculars Website.

CCD Chip Info

Pixel Size: 7.8 um  

Gb B Gb B
R Gr R Gr
Gb B Gb B
R Gr R Gr

 

Pixels H (Front / Back) V (Front / Back)
Total (Light+Black) 3110 2030
Black 70 (20/50) 6 (4/2)
Effective (Light) 3040 2024
Active 3032 2016
Recommended 3000 2000

 

USB Capture Software Configuration

USB information was gathered by capturing data on the USB port using the following software:

  • Wireshark and its bundled version of USBPcap
  • Windows 10 (or similar)
  • Bundled version of MaximDL

 

USB Endpoints

All Commands from the PC being sent to camera use the following USB endpoint and parameters:

URB Function 0x0009 (URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER)
Endpoint     0x08 
Type         0x03 (URB_BULK)
Data length  6

 

All Responses from the camera use the following USB endpoint and parameters:

URB Function 0x0009 (URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER)
Endpoint     0x82 
Type         0x03 (URB_BULK)
Data length  8 (data length may be up to 1024 for image data packets)

 

Packet Structure

All packets originating from the PC use the following format:

ID Command Data
0xA5 1 Byte 4 Bytes

 

Standard result packets from the camera use the following format:

ID Data 0 Command ACK Bulk Data
0xA5 1 Byte 1 Byte 5 Bytes

 

Image transfer packets use the following format (no ID or ACK):

ID Data 0 Command ACK Bulk Data
None None None <= 1024 Bytes

 

Command Reference

Get Camera Status

Return status byte and other data

Command: 0x02
TX Data: 0x00 0x00 0x00 0x00
RX Data: 0xA5 Data0 0x02 Data1 Data2 Data3 Data4 Data5

Data0, Data1, Data3, and Data5 = Usually 0x00.

Data2 = Status Byte

Data4 = Usually 0xBE

Examples:

TX RX Result
0xA5 0x02 0x00 0x00 0x00 0x00 0xA5 0x00 0x02 0x00 0x00 0x00 0xBE 0x00 Camera Idle
0xA5 0x02 0x00 0x00 0x00 0x00 0xA5 0x00 0x02 0x00 0x01 0x00 0xBE 0x00 Camera Exposing
0xA5 0x02 0x00 0x00 0x00 0x00 0xA5 0x00 0x02 0x00 0x02 0x00 0xBE 0x00 Frame Ready

 

Set Capture Mode and Frame Size

Define the subframe (may also set a binning flag, not sure yet)

Command: 0x0B
TX Data: Cmd0 Cmd1 Cmd2 Cmd3
RX Data: 0xA5 Data0 0x0B Data1 Data2 Data3 Data4 Data5

Cmd0-3 = Unknown definition of capture frame and possibly binning mode

Data0, Data1, Data3, and Data5 = Usually same as Cmd3 byte.

Data2 = Usually 0x01

Data4 = Usually 0x00

Examples:

TX RX Description
0xA5 0x0B 0x00 0x00 0x03 0xF9 0xA5 0xF9 0x0B 0xF9 0x01 0xF9 0x00 0xF9 Light Frame Raw/Color 1x1 Binning
0xA5 0x0B 0x00 0x00 0x03 0xFA 0xA5 0xFA 0x0B 0xFA 0x01 0xFA 0x00 0xFA Light Frame Mono 2x2 Binning
0xA5 0x0B 0x01 0x52 0x00 0x70 0xA5 0x70 0x0B 0x70 0x01 0x70 0x00 0x70 Light Frame Mono 2x2 Binning, subframe 95,338 to 706,444

 

Start Capture

Set readout speed, shutter time, and other data

Command: 0x03
TX Data: Cmd0 Cmd1 Cmd2 Cmd3

Cmd0 Cmd1 & Cmd2 Cmd3
Bits 7-4 = Always 0 0x0001 to 0xFFFF 0x00 or 0x01 - Time <= 8.000s
Bits 3-1 = Readout Speed (Fast=0...Slow=7) Time value 0x02 - Time >= 8.001s
Bit 0 = Time Units (0=ms, 1=0.1s) 0x03 - 2x2 Binning?

**RX Data:** ```0xA5 Data0 0x0B Data1 Data2 Data3 Data4 Data5```

Data0, Data1, Data3, and Data5 = Usually same as Cmd3 byte.

Data2 = Usually 0x01

Data4 = Usually 0x00

Description:

Units are milliseconds when time is less than 10s.

Time value seems offset by some random value, which appears to change after a restart of MaximDL. One example uses a setpoint of 6696.9s in MaximDL which produces a packet value of 0xfffe.

When time is 8 seconds or less, MaximDL/camera takes two individual frames of equal exposure time. Cmd3 byte == 0x00 for first exposure and 0x01 for second exposure. Don't know if it's odd/even frames or full frames for each exposure (data length suggests odd/even frames).

Example:

TX RX Description
0xA5 0x03 0x01 0x04 0x92 0x02 0xA5 0x02 0x03 0x02 0x01 0x02 0x00 0x02 120s Light Frame Raw/Color 1x1 Binning

 

Start Image Transfer/Download

Tell the camera we're ready to copy the image data

Command: 0x04
TX Data: 0x00 0x00 0x00 0x00
RX Data: 0xA5 Data0 0x04 Data1 Data2 Data3 Data4 Data5

Data0, Data1, Data3, Data4, and Data5 = Usually 0x00

Data2 = Usually 0x01

Description:

This command is followed up by bulk reads until the return packet is less than 1024 bytes in length. Image data is sent as rows. For a full sensor image, each row starts with 18 bytes of zeros and is followed by 3110 pixels (2 bytes per pixel). 2032 rows are transmitted, 1016 odd rows first, followed by evens. alt text

alt text

Example:

TX RX
0xA5 0x04 0x00 0x00 0x00 0x00 0xA5 0x00 0x04 0x00 0x01 0x00 0x00 0x00

 

Abort Capture

Stop imaging

Command: 0x05
TX Data: 0x00 0x00 0x00 0x00
RX Data: 0xA5 Data0 0x05 Data1 Data2 Data3 Data4 Data5

Data0, Data1, Data3, Data4, and Data5 = Usually 0x00

Data2 = Usually 0x01

Example:

TX RX
0xA5 0x05 0x00 0x00 0x00 0x00 0xA5 0x00 0x05 0x00 0x01 0x00 0x00 0x00

 

Set DIO

Turn on/off PEC cooler and set fan speed

Command: 0x0C
TX Data: Cmd0 0x00 0x00 0x00

Cmd0
Bits 7-2 = Always 0
Bit 1 = Fan Low/High (1=High)
Bit 0 = Cooler Enable (1=On)

**RX Data:** ```0xA5 Data0 0x0C Data1 Data2 Data3 Data4 Data5```

Data0, Data1, Data2, Data3, Data4, and Data5 = Usually 0x00

Example:

TX RX Description
0xA5 0x0C 0x03 0x00 0x00 0x00 0xA5 0x00 0x0C 0x00 0x00 0x00 0x00 0x00 Set Fan High and Cooler On

 

Unknown Command 9

Read current timer tick?

Command: 0x09
TX Data: 0x00 0x00 0x00 0x00
RX Data: 0xA5 Data0 0x09 Data1 Data2 Data3 Data4 Data5

Data0, Data1, Data3, and Data5 = Usually 0x00

_Data2 = Ever incrementing value

_Data4 = Ever changing value (could be lower byte of fast timer)

Example:

TX RX
0xA5 0x09 0x00 0x00 0x00 0x00 0xA5 0x00 0x09 0x00 0xE2 0x00 0x7A 0x00

About

Linux Driver for the Orion Starshoot Pro V2.0 Deep Space Color Imager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages