INDIGO AstroImager & AstroDSLR

merous
Posts: 32
Joined: Thu Dec 13, 2018 6:18 pm

Re: INDIGO AstroImager & AstroDSLR

Post by merous »

OK.

Gphoto2 does connect to the camera, but does not respond to any command from the server web portal or through AstroDSLR.
Again, it is slow but works with the SAAG driver and camera.

Since the Raspberry Pi INDIGOsky version is a bit slow and clunky to use, I tried the INDIGO server on second Macbook, just to compare, and I get the server "quitting unexpectedly" as soon as I tried to use the Canon camera.
I had to reinstall it after a few crashes, as it would disappear as soon as I connected the camera.

No problems at all using the Canon camera on that MacBook with AstroDSLR...
Not sure what's going on.

Any tips?
User avatar
Peter Polakovic
Posts: 2741
Joined: Thu Apr 21, 2016 9:38 am

Re: INDIGO AstroImager & AstroDSLR

Post by Peter Polakovic »

As for Mac-to-Mac experiment, I'll try it myself. For RPi-to-Mac, Thomas, any idea? Peter
merous
Posts: 32
Joined: Thu Dec 13, 2018 6:18 pm

Re: INDIGO AstroImager & AstroDSLR

Post by merous »

I tried it the indigo server on the Mint Linux version.
I could get more info, maybe it can help.. (sorry it's a screenshot).

gphoto2 seems to report failing to connect with the camera...
Attachments
20190529_195336.jpg
20190529_195336.jpg (812.68 KiB) Viewed 1348 times
tstibor
Posts: 8
Joined: Sun Mar 17, 2019 1:09 pm

Re: INDIGO AstroImager & AstroDSLR

Post by tstibor »

Can you please try to take an image with gphoto2 console program, so one can verify the problem is in INDIGO gphoto2 driver

Code: Select all

gphoto2 --capture-image-and-download
Moreover, can you start indigo_server in full debug mode that is,

Code: Select all

indigo_server -vvv indigo_ccd_gphoto2
and provide the logs.

Thanks,
Thomas
JohanB
Posts: 268
Joined: Thu Apr 21, 2016 5:55 pm

Re: INDIGO AstroImager & AstroDSLR

Post by JohanB »

I installed gphoto a while ago and remember there was an issue when the camera was auto-mounted by the OS as a USB device. If this was the case gphoto would report an error on the connection attempt with the camera. Don't remember how to prevent USB auto-mount on linux, but i'm sure you guys will know :)
merous
Posts: 32
Joined: Thu Dec 13, 2018 6:18 pm

Re: INDIGO AstroImager & AstroDSLR

Post by merous »

Hi Thomas,

Here is the output:

Code: Select all

$ gphoto2 --capture-image-and-download
                                                                               
*** Error ***              
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
ERROR: Could not capture image.
ERROR: Could not capture.
*** Error (-53: 'Could not claim the USB device') ***      

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --capture-image-and-download

Please make sure there is sufficient quoting around the arguments.
And from the server:

Code: Select all

$ indigo_server -vv indigo_ccd_gphoto2
19:28:12.278332 indigo_server: INDIGO server 2.0-90 built on May 17 2019 18:01:09
19:28:12.282677 indigo_server: Driver indigo_ccd_gphoto2 2.0.0.9 loaded
19:28:12.283467 indigo_server: indigo_ccd_gphoto2: libgphoto2 version: 2.5.16
19:28:12.574418 indigo_server: indigo_ccd_gphoto2: auto-detected device 'Canon EOS 200D 04a9:32cc (bus 001, device 003)'
19:28:12.604768 indigo_server: indigo_ccd_gphoto2[2556, device_connect, 0x7f7c369ebf40]: [rc:-53] gp_camera_init failed
19:28:12.604893 indigo_server: indigo_ccd_gphoto2[2656, device_attach, 0x7f7c369ebf40]: connecting failed slot '0' device 'Canon EOS 200D 04a9:32cc (bus 001, device 003)'
19:28:13.440508 indigo_server: indigo_ccd_gphoto2[2785, indigo_ccd_gphoto2, 0x7f7c369ebf40]: libusb_hotplug_register_callback ->  OK
19:28:13.440767 indigo_server: Resource /mng.html (1633, text/html) added
19:28:13.440868 indigo_server: Resource /mng.png (7867, image/png) added
19:28:13.440958 indigo_server: Resource /ctrl.html (1207, text/html) added
19:28:13.441124 indigo_server: Resource /ctrl.png (10561, image/png) added
19:28:13.441194 indigo_server: Resource /indigo.js (1930, text/javascript) added
19:28:13.441260 indigo_server: Resource /components.js (5043, text/javascript) added
19:28:13.441324 indigo_server: Resource /indigo.css (782, text/css) added
19:28:13.441387 indigo_server: Resource /bootstrap.min.css (21089, text/css) added
19:28:13.441450 indigo_server: Resource /bootstrap.min.js (14002, text/javascript) added
19:28:13.441513 indigo_server: Resource /popper.min.js (7266, text/javascript) added
19:28:13.441576 indigo_server: Resource /glyphicons.css (7107, text/css) added
19:28:13.441647 indigo_server: Resource /glyphicons-regular.ttf (125747, font/ttf) added
19:28:13.441710 indigo_server: Resource /jquery.min.js (23995, text/javascript) added
19:28:13.441772 indigo_server: Resource /vue.min.js (31573, text/javascript) added
19:28:13.441834 indigo_server: Resource /imager.html (2848, text/html) added
19:28:13.441896 indigo_server: Resource /imager.png (18162, image/png) added
19:28:13.441958 indigo_server: Resource /mount.html (5928, text/html) added
19:28:13.442020 indigo_server: Resource /mount.png (13978, image/png) added
19:28:13.442082 indigo_server: Resource /celestial.min.js (37255, text/javascript) added
19:28:13.442144 indigo_server: Resource /d3.min.js (53548, text/javascript) added
19:28:13.442207 indigo_server: Resource /celestial.css (1748, text/css) added
19:28:13.442271 indigo_server: Resource /data/constellations.json (4436, application/json; charset=utf-8) added
19:28:13.442334 indigo_server: Resource /data/constellations.bounds.json (9007, application/json; charset=utf-8) added
19:28:13.442396 indigo_server: Resource /data/mw.json (178122, application/json; charset=utf-8) added
19:28:13.442529 indigo_server: Resource /data/planets.json (1514, application/json; charset=utf-8) added
19:28:13.528995 indigo_server: Resource /data/stars.json (97352, application/json; charset=utf-8) added
19:28:13.536577 indigo_server: Resource /data/dsos.json (4319, application/json; charset=utf-8) added
19:28:13.569378 indigo_server: Resource /data/constellations.lines.json (5233, application/json; charset=utf-8) added
19:28:13.574625 indigo_server: Resource /guider.html (3605, text/html) added
19:28:13.574682 indigo_server: Resource /guider.png (13849, image/png) added
19:28:13.574759 indigo_server: Server attached
19:28:13.574825 indigo_server: Server started on 7624
19:29:54.366468 indigo_server: indigo_ccd_gphoto2[2677, device_detach, 0x7f7c3272c700]: no slot found for device 04a9:32cc (bus 001, device 003) to be detached

Let me know if you need other info.
Thanks!
User avatar
Peter Polakovic
Posts: 2741
Joined: Thu Apr 21, 2016 9:38 am

Re: INDIGO AstroImager & AstroDSLR

Post by Peter Polakovic »

The camera is mounted by some other process, that's why you can't open it by INDIGO. Peter
tstibor
Posts: 8
Joined: Sun Mar 17, 2019 1:09 pm

Re: INDIGO AstroImager & AstroDSLR

Post by tstibor »

As Johan and Peter wrote, the DSLR usb connection is kept by another process and thus gphoto2 as well as indigo_ccd_gphoto2 driver have no
exclusive access to the device. The most simplest approach is to umount via your file browser the device, or to make it persistent by setting up
the following udev rules:

Code: Select all

# Disable automount by setting envrionment variable for UDISK2.
# Canon
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04a9", ENV{UDISKS_AUTO}="0"
Another option is using our INDIGO Sky Raspberry PI image.

Cheers
Thomas
merous
Posts: 32
Joined: Thu Dec 13, 2018 6:18 pm

Re: INDIGO AstroImager & AstroDSLR

Post by merous »

You are correct guys.

I could have sworn it wasn't mounted, but hey seems like I was wrong.

So gphoto2 seems to work:

Code: Select all

$ gphoto2 --capture-image-and-download
New file is in location /capt0000.cr2 on the camera                            
Saving file as capt0000.cr2
Deleting file /capt0000.cr2 on the camera
But there is still an issue with indigo. Hopefully this time the error msg is more informative:

Code: Select all

$ indigo_server -vv indigo_ccd_gphoto2
07:37:31.091713 indigo_server: INDIGO server 2.0-90 built on May 17 2019 18:01:09
07:37:31.183720 indigo_server: Driver indigo_ccd_gphoto2 2.0.0.9 loaded
07:37:31.184675 indigo_server: indigo_ccd_gphoto2: libgphoto2 version: 2.5.16
07:37:31.650796 indigo_server: indigo_ccd_gphoto2: auto-detected device 'Canon EOS 200D 04a9:32cc (bus 001, device 002)'
07:37:31.810330 indigo_server: indigo_ccd_gphoto2: attach device 'Canon EOS 200D 04a9:32cc (bus 001, device 002)' in slot '0'
07:37:31.817915 indigo_server: port_type(): path = /dev/tty, type = 0, res = -1 error = 'Inappropriate ioctl for device'
07:37:32.086930 indigo_server: indigo_ccd_gphoto2: widget 'Bulb Mode' is not available for camera 'CANON EOS 200D'
07:37:32.099506 indigo_server: indigo_ccd_gphoto2: widget 'Canon EOS Remote Release' is available for camera 'CANON EOS 200D'
07:37:32.112186 indigo_server: indigo_ccd_gphoto2: widget 'Capture Target' is available for camera 'CANON EOS 200D'
07:37:32.631471 indigo_server: indigo_ccd_gphoto2[2785, indigo_ccd_gphoto2, 0x7f720e018f40]: libusb_hotplug_register_callback ->  OK
07:37:32.631540 indigo_server: Resource /mng.html (1633, text/html) added
07:37:32.631549 indigo_server: Resource /mng.png (7867, image/png) added
07:37:32.631554 indigo_server: Resource /ctrl.html (1207, text/html) added
07:37:32.631557 indigo_server: Resource /ctrl.png (10561, image/png) added
07:37:32.631561 indigo_server: Resource /indigo.js (1930, text/javascript) added
07:37:32.631564 indigo_server: Resource /components.js (5043, text/javascript) added
07:37:32.631568 indigo_server: Resource /indigo.css (782, text/css) added
07:37:32.631571 indigo_server: Resource /bootstrap.min.css (21089, text/css) added
07:37:32.631576 indigo_server: Resource /bootstrap.min.js (14002, text/javascript) added
07:37:32.631586 indigo_server: Resource /popper.min.js (7266, text/javascript) added
07:37:32.631589 indigo_server: Resource /glyphicons.css (7107, text/css) added
07:37:32.631593 indigo_server: Resource /glyphicons-regular.ttf (125747, font/ttf) added
07:37:32.631596 indigo_server: Resource /jquery.min.js (23995, text/javascript) added
07:37:32.631599 indigo_server: Resource /vue.min.js (31573, text/javascript) added
07:37:32.631603 indigo_server: Resource /imager.html (2848, text/html) added
07:37:32.631606 indigo_server: Resource /imager.png (18162, image/png) added
07:37:32.631609 indigo_server: Resource /mount.html (5928, text/html) added
07:37:32.631615 indigo_server: Resource /mount.png (13978, image/png) added
07:37:32.631619 indigo_server: Resource /celestial.min.js (37255, text/javascript) added
07:37:32.631622 indigo_server: Resource /d3.min.js (53548, text/javascript) added
07:37:32.631626 indigo_server: Resource /celestial.css (1748, text/css) added
07:37:32.631629 indigo_server: Resource /data/constellations.json (4436, application/json; charset=utf-8) added
07:37:32.631633 indigo_server: Resource /data/constellations.bounds.json (9007, application/json; charset=utf-8) added
07:37:32.631636 indigo_server: Resource /data/mw.json (178122, application/json; charset=utf-8) added
07:37:32.631641 indigo_server: Resource /data/planets.json (1514, application/json; charset=utf-8) added
07:37:32.729003 indigo_server: Resource /data/stars.json (97410, application/json; charset=utf-8) added
07:37:32.733912 indigo_server: Resource /data/dsos.json (4332, application/json; charset=utf-8) added
07:37:32.764836 indigo_server: Resource /data/constellations.lines.json (5235, application/json; charset=utf-8) added
07:37:32.764941 indigo_server: Resource /guider.html (3605, text/html) added
07:37:32.764980 indigo_server: Resource /guider.png (13849, image/png) added
07:37:32.765062 indigo_server: Server attached
07:37:32.765128 indigo_server: Server started on 7624
07:37:52.499336 indigo_server: indigo_ccd_gphoto2[1001, ctx_error_func, 0x7f7201a0c700]: The property 'Custom Functions Ex' / 0xd1a0 was not set (0x02ff: PTP I/O Error).
07:37:52.499396 indigo_server: indigo_ccd_gphoto2: 'Mirror lockup (customfuncex)' is not available for camera 'CANON EOS 200D'
07:38:32.580634 indigo_server: indigo_ccd_gphoto2[870, gphoto2_set_key_val, 0x7f7201a0c700]: [camera:0x1858b80,context:0x1855570] camera get config failed
07:38:32.580684 indigo_server: indigo_ccd_gphoto2: CCD_IMAGE_FORMAT_PROPERTY JPEG uses compression format 'Large Fine JPEG'
07:38:32.580693 indigo_server: indigo_ccd_gphoto2: CCD_IMAGE_FORMAT_PROPERTY FITS/RAW uses compression format 'RAW'
^C07:38:54.991472 indigo_server: Shutdown initiated (signal 2)...
07:38:54.991559 indigo_server: Server detached
07:38:54.991567 indigo_server: indigo_ccd_gphoto2: 'Canon EOS 200D' detached
07:38:54.991648 indigo_server: indigo_ccd_gphoto2[2791, indigo_ccd_gphoto2, 0x7f720e018f40]: libusb_hotplug_deregister_callback
07:38:54.991663 indigo_server: Driver indigo_ccd_gphoto2 unloaded
And once this happens, the camera does not appear mounted, but failes to mount again, which is probably what happened before:

Code: Select all

$ indigo_server -vv indigo_ccd_gphoto2
07:39:24.500033 indigo_server: INDIGO server 2.0-90 built on May 17 2019 18:01:09
07:39:24.505088 indigo_server: Driver indigo_ccd_gphoto2 2.0.0.9 loaded
07:39:24.505230 indigo_server: indigo_ccd_gphoto2: libgphoto2 version: 2.5.16
07:39:24.797411 indigo_server: indigo_ccd_gphoto2: auto-detected device 'Canon EOS 200D 04a9:32cc (bus 001, device 002)'
07:39:29.349774 indigo_server: indigo_ccd_gphoto2[1001, ctx_error_func, 0x7f524956bf40]: PTP Timeout
07:39:29.380859 indigo_server: indigo_ccd_gphoto2[2556, device_connect, 0x7f524956bf40]: [rc:-10] gp_camera_init failed
07:39:29.380898 indigo_server: indigo_ccd_gphoto2[2656, device_attach, 0x7f524956bf40]: connecting failed slot '0' device 'Canon EOS 200D 04a9:32cc (bus 001, device 002)'
07:39:30.240340 indigo_server: indigo_ccd_gphoto2[2785, indigo_ccd_gphoto2, 0x7f524956bf40]: libusb_hotplug_register_callback ->  OK [snip] 
User avatar
Peter Polakovic
Posts: 2741
Joined: Thu Apr 21, 2016 9:38 am

Re: INDIGO AstroImager & AstroDSLR

Post by Peter Polakovic »

Well, gphoto doesn't allow to recover the camera state. Once it will hang, the only way is to turn it off and on again. Peter
Locked