GithubHelp home page GithubHelp logo

last_zwoasicamera's Introduction

LAST_ZWOASICamera

LAST hardware driver for ZWO cameras.

Tested with ASI_linux_mac_SDK_V1.14.1227, downloaded from ZWO site, on Ubuntu 18 and 19, and an ASI6200MM camera.

Installation and troubleshooting

Upon simple connection of the camera, even without installing software, dmesg -wH should show something like

[  +9.144051] usb 1-2: new high-speed USB device number 15 using xhci_hcd
[  +0.149413] usb 1-2: New USB device found, idVendor=04b4, idProduct=6572
[  +0.000002] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  +0.000001] usb 1-2: Product: USB2.0 Hub
[  +0.000782] hub 1-2:1.0: USB hub found
[  +0.000321] hub 1-2:1.0: 4 ports detected
[  +1.965565] usb 2-2: new SuperSpeed USB device number 7 using xhci_hcd
[  +0.024923] usb 2-2: New USB device found, idVendor=03c3, idProduct=620b
[  +0.000002] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  +0.000002] usb 2-2: Product: ASI6200MM Pro
[  +0.000001] usb 2-2: Manufacturer: ZWO

(the ASI6200MM has both an USB3 camera connection and an USB2 hub).

Installation of the SDK:

All is needed from the SDK package is:

  1. the shared library file for the relevant platform (e.g. ASI_linux_mac_SDK_V1.14.1227/lib/x64/libASICamera2.so.1.14.1227 for x64).

  2. a (patched copy) of the header file, i.e. ASI_linux_mac_SDK_V1.14.1227/include/ASICamera2.h

In principle they can be copied anywhere the command loadlibrary in the instantiator method of the class can find them. The present writeup assumes they are copied into +inst/@ZWOASICamera/lib.

  • A symbolic link libASICamera2.so to the actual library file has also to be created in that directory. E.g.,
ln -s libASICamera2.so.1.14.1227 libASICamera2.so

however,

that alone may be not enough for the camera to work. Rule files in /etc/udev/rules.d are probably necessary for the camera to be connected. Installing ASIStudio does it. ASIStudio is convenient also as independent camera-control interface, just big (134MB, bundles several libraries for good).

The rule files which result are asi.rules, eaf.rules, efw.rules. Only the first is the one relevant to the camera, the others are for other ZWO hardware. asi.rules spells:

ACTION=="add", ATTR{idVendor}=="03c3", RUN+="/bin/sh -c '/bin/echo 200 >/sys/mod
ule/usbcore/parameters/usbfs_memory_mb'"
# All ASI Cameras and filter wheels
SUBSYSTEMS=="usb", ATTR{idVendor}=="03c3", MODE="0666"

Note that if the rule is not in place, the matlab binding finds the camera, but is not able to open it (ASIOpenCamera() returns ASI_ERROR_CAMERA_CLOSED), and that ASIGetCameraProperty() would return IsUSB3Host: ASI_FALSE.

Specific experiences on the ASI6200MM

  • The cooler and the fan stop when disconnect() is called, i.e. when the class object is deleted. They also stop when the USB cable is pulled off.
  • However, most of the ASI functions don't return errors if the cable has been pulled, they just return the previous values. This is deceiving. And can hang takeExposureSeq(), even when the cable is attached back in. The safe action is disconnect()/connect(), but the loss of connection may pass undetected.
  • I've found from the forum an indirect way to determine if a previously connected camera is still there, which I've implemented in the hidden property isConnected (pending to be tested with multiple ZWO cameras). This could perused by a periodical watchdog.
  • A disconnection of the power supply turns off fan and cooler, but leaves the camera alive and connected, as long as the USB cable is in.
  • After changing bitDepth or binning (both involve calls to set ROI functions), the first image(s) taken may be empty, or it may take a longer time to retrieve images, or to set the camera in video mode.
  • CamStatus is "unknown" when the camera is operated in video mode and after it. For this reason takeExposure is allowed to start also when status is "unknown".

last_zwoasicamera's People

Contributors

easteriq avatar polishookdavid avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.