Skip to content

Additional Hardware Drivers Installation

Wilfred Tyler Gee edited this page Jun 25, 2019 · 16 revisions

Introduction

The standard POCS installation instructions assume you will be using the standard PANOPTES hardware, i.e. DSLR cameras controlled via the gphoto2 library. POCS does include support for a range of other hardware, however some require the installation of additional drivers. This page provides instructions on how to do this.

Cameras

ZWO ASI

POCS includes support for ZWO cameras. The vendor supplied drivers must be installed first.

Linux (including Raspberry Pi)

  1. Download the SDK for linux, available from the Software and Drivers page of their website. Go the the "For Developers" tab on the far right and select the Download link for the latest version. As of this writing the current version is v1.14.0425.
  2. Move the file to its own directory and extract the compressed archive, e.g.
mkdir ASIBuild
cd ASIBuild
mv ~/Downloads/ASI_linux_mac_SDK_V1.14.0425.tar.bz2 .
tar xvzj ~/Downloads/ASI_linux_mac_SDK_V1.14.0425.tar.bz2
  1. Find the driver library for your system. These are distributed as compiled shared (dynamically linked) library files (.so). From the lib/README.txt:
    • ubuntu:x86, x64
    • armv7: raspberry pi2
    • armv8: arm 64bit
  2. Either copy the appropriate libASICamera2.so file to /usr/local/lib/ or make a symbolic link, e.g. sudo ln -s ~/ASIBuild/lib/x64/libASICamera2.so /usr/local/lib/
  3. Change to the lib/ directory and run sudo install asi.rules /etc/udev/rules.d.
  4. Disconnect and reconnect the camera and then run cat /sys/module/usbcore/parameters/usbfs_memory_mb. A correct result should show 200.

SBIG/Diffraction Limited

POCS includes support for SBIG cameras from Diffraction Limited. The vendor supplied drivers must be installed first.

Linux (including Raspberry Pi)

  1. Download the Linux Dev Kit. At the time of writing this is only available via the SBIG ftp site, at ftp://ftp.sbig.com/pub/devsw/LinuxDevKit.tar.gz
  2. Extract the compressed archive to a convenient location, e.g. tar xvzf ~/Downloads/LinuxDevKit.tar.gz ~/Build/
  3. Find the driver library for your system. These are distributed as compiled shared (dynamically linked) library files (.so).
    • For x86_64 use LinuxDevKit/x86/c/lib64/libsbigudrv.so
    • For 32 bit x86 use LinuxDevKit/x86/c/lib32/libsbigudrv.so
    • For 32 bit ARM (e.g. Raspberry Pi) use LinuxDevKit/arm/c/lib/libsbigudrv.so
  4. Either copy the appropriate libsbigudrv.so file to /usr/local/lib/ or make a symbolic link, e.g. sudo ln -s ~/Build/LinuxDevKit/arm/c/lib32/libsbigudrv.so /usr/local/lib/
  5. Either copy or link the LinuxDevKit/udev/51-sbig-debian.rules file to /etc/udev/rules.d/, e.g. sudo ln -s ~/Build/LinuxDevKit/udev/51-sbig-debian.rules /etc/udev/rules.d/

Mac OS X

  1. Download the current SBIG Universal Driver for OS X, either by going to the Diffraction Limited website, navigating to a camera product page (e.g. STF-8300M), clicking the 'DOWNLOADS' tab, and scrolling down to 'SBIGUDrv', or downloading it directly from the SBIG ftp site at ftp://ftp.sbig.com/pub/SBIGDriverInstallerUniv.dmg
  2. Double click the downloaded disk image file to mount it, or Ctrl-click > Open with > Disk Image Mounter. If that doesn't work you may have to open the Disk Utility app and use File > Open Disk Image
  3. Once the disk image is mounted open it in Finder. There will be a .pkg file inside.
  4. Ctrl-click > Open with > Package Installer to open the .pkg file. You may be prompted to confirm that you really want to open it.
  5. The installer will now open. Follow the prompts to complete the installation.

Finger Lake Instruments

POCS includes support for cameras from Finger Lake Instruments (FLI). Some modification/configuration of the vendor supplied drivers is required first.

Linux (including Raspberry Pi)

Installating the currently releases version on Linux requires installing a kernel module and building a shared library from the SDK.

NOTE: Changes to the Linux kernel timer API in version 4.15 mean that the FLI kernel module is not compatible with Linux kernels from 4.15 onwards. For Linux systems with recent kernels see the alternative, libusb based FLI SDK at the bottom of this page.

Kernel module

The FLI kernel module is distributed as source code. The installation process is standard but manual.

  1. Make sure you have the Linux kernel headers installed. On most distributions this will be a package called linux-headers or similar, for Raspberry Pi make sure to install raspberrypi-kernel-headers instead, i.e. sudo apt-get install raspberrypi-kernel-headers.
  2. Download the latest Linux kernel module from the FLI Software page, in the 'Development' column on the right. At the time of writing this was version 1.3.2, at http://www.flicamera.com/downloads/sdk/fliusb-1.3.2.tgz
  3. Extract the compressed archive to a convenient location, e.g. tar xvzf ~/Downloads/fliusb-1.3.2.tgz ~/Build/
  4. Change to the directory where you extracted the kernel module source, e.g. cd ~/Build/fliusb-1.3.2
  5. Build the kernel module using make. The directory should now contain a fliusb.ko file.
  6. Copy the kernel module into the running kernel's module directories, e.g. sudo cp fliusb.ko /lib/modules/`uname -r`/kernel/drivers/usb/misc/ (note the backticks `)
  7. Run sudo depmod to register the module with the kernel.
  8. Check that the kernel module has been successfully installed & registered with modinfo fliusb. This should produce output similar to this:
    version:        1.3.2
    license:        Dual BSD/GPL
    author:         Finger Lakes Instrumentation, L.L.C. <[email protected]>
    srcversion:     8C80657CCB0A10B52275612
    alias:          usb:v0F18p000Ad*dc*dsc*dp*ic*isc*ip*in*
    alias:          usb:v0F18p0007d*dc*dsc*dp*ic*isc*ip*in*
    alias:          usb:v0F18p0006d*dc*dsc*dp*ic*isc*ip*in*
    alias:          usb:v0F18p0005d*dc*dsc*dp*ic*isc*ip*in*
    alias:          usb:v0F18p0002d*dc*dsc*dp*ic*isc*ip*in*
    depends:        
    vermagic:       4.9.59-v7+ SMP mod_unload modversions ARMv7 p2v8 
    parm:           buffersize:USB bulk transfer buffer size (uint)
    parm:           timeout:USB bulk transfer timeout (msec) (uint)
    

When the Linux kernel is updated then you should repeat steps 4-8 (though it would probably be sufficient to repeat just step 6).

When you connect an FLI camera to the computer the fliusb module should be automatically loaded, and it will create a device node for the camera of the form /dev/fliusbX, i.e. dev/fliusb0, /dev/fliusb1, etc.

By default this device node will only be accessible to the root user, but you can change this by creating a udev rules file. For example, to grant access to all users create a file /etc/udev/rules.d/52-fliusb.rules with the following contents:

# Attempt to have FLI camera device nodes (/dev/flibusbX) created with global read/write permissions
SUBSYSTEM=="usb", ATTR{idVendor}=="0f18", ATTR{idProduct}=="000a", MODE="0666", GROUP="plugdev"

Alternatively to grant access only to users in the plugdev group change the MODE from 0666 to 0660.

SDK

The FLI software development kit contains a driver library, distributed as C source code. The included Makefile is configured to build only a statically linked library (libfli.a) but POCS needs a shared (dynamically linked) library (libfli.so), which requires some modifications to the Makefile.

  1. Download the latest SDK from the FLI Software page, in the 'Development' column on the right. At the time of writing this was version 1.104, at http://www.flicamera.com/downloads/sdk/libfli-1.104.zip
  2. Extract the compressed archive to a convenient location, e.g. unzip ~/Downloads/libfli-1.104.zip ~/Build/
  3. Change to the directory where you extracted the kernel module source, e.g. cd ~/Build/libfli-1.104
  4. Edit the Makefile as follows:
    1. Add -fPIC to the CFLAGS (line 20), i.e. change CFLAGS = -Wall -O2 -g $(patsubst %, -I%, $(INC)) to CFLAGS = -Wall -O2 -g $(patsubst %, -I%, $(INC)) -fPIC
    2. Add a target for the shared library by adding these two lines at line 50 (between the libfli and doc targets):
      libfli.so: libfli.o $(ALLOBJ)
           $(CC) -o $@ $^ $(CFLAGS) -lm -nostartfiles -shared
      
    3. Add libfli.so to the clean target, i.e. change line 67 from rm -f $(ALLOBJ) libfli.o libfli.a to rm -f $(ALLOBJ) libfli.o libfli.a libfli.so
  5. Build the object files and statically linked library with make.
  6. Build the shared library with make libfli.so.
  7. Either copy the libfli.so file to /usr/local/lib/ or make a symbolic link, e.g. sudo ln -s libfli.so /usr/local/lib/.

Mac OS X

Installation on OS X requires building a shared library from the SDK.

SDK

At the time of writing we have been unable to successfully build a shared (dynamically linked) library from the the current version of the SDK (1.104).

Alternative: pre-release FLI SDK

FLI have an as yet unreleased (at the time of writing) version of the FLI SDK that uses libusb instead of the custom kernel module. This avoids the problem of incompatibility of the fliusb kernel module with recent Linux kernel versions and also works on Mac OS X.

Linux SDK

The pre-release FLI software development kit contains a driver library, distributed as C source code. The included Makefile is still only configured to build a statically linked library (libfli.a) but POCS needs a shared (dynamically linked) library (libfli.so), which requires some modifications to the Makefile.

  1. Ensure that libusb-1.0 and the corresponding development files are installed, e.g. for Ubuntu/Raspbian/etc. sudo apt install libusb-1.0.0 libusb-1.0.0-dev
  2. Download the latest pre-release SDK. At the time of writing this was only available by email from FLI.
  3. Extract the compressed archive to a convenient location, e.g. unzip ~/Downloads/libfli-1.999.1-180223.zip ~/Build/
  4. Change to the directory where you extracted the kernel module source, e.g. cd ~/Build/libfli-1.104
  5. Edit the Makefile as follows:
    1. Add a target for the shared library by adding these two lines at line 73 (between the libfli and doc targets):
      libfli.so: libfli.o $(ALLOBJ)
           $(CC) -o $@ $^ $(CFLAGS) -lm -nostartfiles -shared -l usb-1.0
      
    2. Add libfli.so to the clean target, i.e. change line 93 from rm -f $(ALLOBJ) libfli.o libfli.a to rm -f $(ALLOBJ) libfli.o libfli.a libfli.so
  6. Build the object files and statically linked library with make.
  7. Build the shared library with make libfli.so.
  8. Either copy the libfli.so file to /usr/local/lib/ or make a symbolic link, e.g. sudo ln -s libfli.so /usr/local/lib/.