×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Indi and EKOS with Canon M3/10/100/6

  • Posts: 68
  • Thank you received: 2
Hello.

I currently have a Canon Hybride M3 that I partially defiltered.
Unfortunately it does not have a connector for the intervalometer. So I installed CHDK to have an integrated intervalometer.
I would like to be able to go further and so I saw that it was gphoto2 compatible.

Unfortunately it is not fully compatible. Via gphoto2 you cannot modify the parameters of the hybrid.
This is also valid for the M2, M10, M100, M6 Canon.

But you can still download the image and control a long exposure via the USB port.

I found a bash code capable of controlling my Canon : github.com/gphoto/gphoto2/issues/442#issuecomment-986237167

I would like to use EKOS for autoguiding, dithering and astrometry. But unfortunately impossible to use the indi Gphoto2/Canon DSLR driver.

The driver connects well but impossible to launch a pose because the driver absolutely wants to modify a barrel parameter.

Do you have an idea of ​​the procedure to follow to operate my hybrid with EKOS ?

The gphoto2 ISSUE github link: github.com/gphoto/gphoto2/issues/442
1 year 6 months ago #87270

Please Log in or Create an account to join the conversation.

This has to be fixed upstream in libgphoto2. There is nothing we can do at the INDI level (as you already found out).
1 year 6 months ago #87279

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 2
Thank you for the quick reply.
I wondered if it would be possible to add a kind of checkbox to prevent the indi driver from modifying the parameters of the hybrid and just launching the requested poses?
1 year 5 months ago #87291

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 1
Hello. I have a Canon M10 and I would dearly like it to work with Ekos.

The situation is more complicated than it being an issue with gphoto. These cameras are actually well-supported by gphoto2. The reason for the crash is the camera firmware itself, which is not supported by the Canon API.

These cameras are designed to be controlled by a smartphone app over WiFi using the PTPIP protocol. This works very well - a gphoto-based app can change settings and operate the camera remotely when connected via WiFi. This is done by manually passing the port (in the format “ptpip:xxx.xxx.xxx.xxx”) and camera model string to gphoto on connection, then it works normally. Unfortunately the Indi driver does not have a way to override the port and camera model, it only connects to cameras it detects via USB.

These cameras have no USB support. Gphoto2 has reverse engineered some kind of USB connection but you can only trigger the shutter and it is impossible to change any settings, otherwise the camera will crash. This is what the OP is seeing.

CHDK firmware DOES allow a USB connection, but I believe it requires use of the CHDK API. I don’t believe Indi uses this API.

I think the easiest way to support these cameras would be to allow users to manually override the connection port and camera model, which would allow WiFi connections. There might be other issues though, because these cameras are missing some other functionality such as a true bulb mode.

Another approach might be a CHDK driver of some sort.

Or finally, some kind of simple bridge driver that can send commands to a script that calls the gphoto2 or CHDK command line tools directly.
1 year 4 months ago #88913

Please Log in or Create an account to join the conversation.

Then perhaps INDI GPhoto driver can be adjusted so that it can pass these parameters? or create a driver based on the current driver but offers these extra functionality i.e. INDI GPhoto IP for example.
1 year 4 months ago #88921

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 1
A small amount of progress. I can connect to the camera quite easily by changing lines 819 & 821 of gphoto_ccd.cpp to
gphotodrv = gphoto_open(camera, loader.context, "Canon EOS M10", "ptpip:192.168.68.79", shutter_release_port);

The problem is now that it won't capture photos - or do anything really. But the camera thinks it's connected, and if I shut down indiserver then the camera reports that a disconnection has happened.
1 year 3 months ago #89621

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 1
A further update, yes it does work (to some extent). I'm forcing the ip address in code, just as above. Most of the basic functionality just works. However, you do have to be careful of the settings as the wrong ones will freeze the camera (Canon M10), requiring a reset of the camera, driver, and/or kstars. It's taken me a while to work out how to get it to work.

Most important is making sure "Force Bulb" is switched off (the M10 does not have bulb mode) and the "capture" setting is also switched off (I don't know what this does). Without "capture" switched off it won't do much at all, and I can't work out how to save that option.

I was hoping to add a configuration option that allows you to force the port and model, but I think I've reached my limit. Any help would be appreciated.

For the Canon M10, connection is like this:
1) From camera's playback mode menu, choose to connect to Wifi,
2) If this is the first time making the connection, choose "Connect to smartphone", "Add a Device" + pick the correct wifi network; otherwise just choose the name of the saved connection
3) Start kstars, start ekos, connect to devices.
4) If this is the first time making the connection, the Camera will ask what photos Indi is allowed access to. Select "All images".
5) If the initial connection is taking too long, Indi may show that it fails to connect, but you can just press "Connect" from the Ekos/Indi control panel.
6) The camera screen says "Use target device"
7) From the Indi gphoto_ccd control panel, check Options->Force Bulb = Off; settings->capture = Off
8) Ekos can now control the camera

A few other notes:
* I haven't worked out how to automatically scan the network for a valid camera, the smartphone apps do this automatically but gphoto2 does not. You must pass both the port (ip) and the model strings to gphoto2. The camera reports itself as "Canon EOS M10" in Windows and "Canon" via linux nmap. It has only port 49512 open.
* Initial connection can be flaky. It does work eventually but I don't know why. Once it works, the connection is saved and it is easy to reconnect the camera (at least, until its ip address changes)
* The video stream seems to work, but on closing the stream the camera reports "I/O busy" until the driver is reset.
* It takes a long time to download images and for the camera to be ready again, about 13-15 seconds. When the camera limits you to 30s shots, this REALLY adds up. I don't know if there's a way of disabling the download or allowing download to take place while capturing?
The following user(s) said Thank You: Jasem Mutlaq
1 year 2 months ago #89832

Please Log in or Create an account to join the conversation.

Awesome progress. There is LAN scanning built into INDI TCP/IP based connections. It would try each IP address in the subnet until a connection is established to the ip:port combination.It can take a very long time as you can imagine.
1 year 2 months ago #89834

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 2
Hello.

Thank you for the significant progress!

What I see is that there is some difference in behavior between the M3, M6, M10 and M100.

The M10 is the only one that does not have a USB port.
So I had to go through wifi.

The M6, M3 and M100 all 3 have wifi and USB.
So for the M3 which I have it is actually detected correctly in gphoto2. On the other hand in USB impossible to change the parameters.
The M3 like the M6, M10 and M100 can only be controlled via wifi via a smartphone according to CANON.

I'm going to try to play with the INDI parameters you mentioned to see if in USB I can manage to launch a pause of the desired duration (the M3 and M6 have the bulb mode. For the M100 I don't know).

In USB the photo download time is really faster than in wifi on my phone. I've tried the canon wifi piloting app but it's very slow on the M3.


I currently have a python code which via gphoto2 allows to capture an image and download it or not with the desired pause time. However, I have to change the settings manually.
For pause times under the second I must put the time manually in the device and put a time of 1s in my program.
1 year 2 months ago #89845

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 1
The M10 does have a USB port, but like several of the other M models it is intended for photo management, not control. The Canon SDK does not support these models at all. I think gphoto can only control them over USB because Canon left just enough in to support the smartphone app, but the camera certainly doesn't like to be controlled over USB that way.

Using USB, the camera becomes visible to Indi and gphoto can trigger a capture, but changing any settings (including ISO and exposure time) will freeze the camera. Indi (rightly) attempts to read and write those settings on connect, and that freezes the camera straight away. If you get bulb mode working, let me know, but I believe the way to do this through gphoto is by changing settings to start and stop the exposure, which I imagine will freeze it if connected over USB, though Wifi should be fine. The M10 has no bulb capability whatsover, using gphoto or even CHDK, though CHDK allows me to set exposure times longer than 30s.

CHDK is an interesting side-path. If I load CHDK on the camera and connect to it over USB, then gphoto2 still causes it to freeze when changing settings. When connecting to it over wifi, gphoto2 shows me a completely different set of settings to when the Canon firmware is running. It seems the crucial iso/exposure settings are missing, presumably because it expects these settings to be changed using CHDK's own API not gphoto's ptpip. The CHDK firmware most certainly does allow USB control and changing of settings on my M10, because there are several existing programs that can do it, but not in a way that Indi (or ASCOM) could use without a whole new driver. I feel gphoto's ptpip/wifi support could easily be added to the existing gphoto_ccd driver, so I'm focusing on that for now.
1 year 2 months ago #89849

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 2
For my part I have the M3. I used a bash code that here because works very well.
#!/bin/bash 
echo For Canon EOS-M3, version 001 created by Anthony C T LEE from Hong Kong 
#not working for 80D due to the filename of duplication of downloaded JPG  
# --capture-image-and-download does not work for M3 
echo 
echo Please set the camera 
echo 1. in bulb mode, 
echo 2. RAW and JPG format, 
echo 3. set the ISO and aperature prior to connection to raspberry pi. 
echo 
echo What is exposure time in seconds? 
read "var_exp_t" # Exposure time X echo 
echo What is total number of frames to be taken? 
read "var_frame_no" # Y 
gphoto2 --wait-event=2s 
# add a minimum of 2 sec time gap before the first shutter release since switch on to ensure the camera captures photos correctly 
# 
# eosremoterelease: 1=Press Half (OK); 2=Press Full (OK), 4=Release Full (OK), 5=Immediate (Fail, shutter cannot be Released) 
counter=1 
until [ $counter -gt $var_frame_no ] 
do
     gphoto2 --set-config eosremoterelease=2 --wait-event="$var_exp_t"s --set-config eosremoterelease=4 # --wait-event=Xs is time of exposure in X seconds
     gphoto2 --wait-event-and-download=5s --keep-raw # add a minimum of 5 sec for downloading image
     ((counter++)) 
done 
echo 
# or change it to "--wait-event=4s" (2nd wait-event with minimum of 4 sec) to ensure the camera downloads photos correctly 
echo A total of "$var_frame_no" frames with exposure of "$var_exp_t" seconds per frame were`

I also used CHDK but couldn't do anything with gphoto2.
1 year 2 months ago #89851

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 28
I have a variation on the above with a GUI,

I have tested it on my Canon M3 and Canon RP, works great.

See next post for code

regards
Last edit: 1 year 2 months ago by Petar Milevski. Reason: spelling
1 year 2 months ago #89875
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 1.020 seconds