Skip to content

Additional Hardware Drivers Installation

Anthony Horton edited this page Jul 10, 2018 · 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

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

Installation 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

Kernel module

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

  1. 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
  2. Extract the compressed archive to a convenient location, e.g. tar xvzf ~/Downloads/fliusb-1.3.2.tgz ~/Build/
  3. Change to the directory where you extracted the kernel module source, e.g. cd ~/Build/fliusb-1.3.2
  4. Build the kernel module using make. The directory should now contain a fliusb.ko file.
  5. 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 `)
  6. Run sudo depmod to register the module with the kernel.
  7. 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 3-7 (though it would probably be sufficient to repeat just step 5).

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. tar xvzf ~/Downloads/libfli-1.104.tgz ~/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).