James replied to the topic 'Indi and EKOS with Canon M3/10/100/6' in the forum. 1 year ago

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.

Read More...

James replied to the topic 'Indi and EKOS with Canon M3/10/100/6' in the forum. 1 year ago

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?

Read More...

James replied to the topic 'Indi and EKOS with Canon M3/10/100/6' in the forum. 1 year ago

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.

Read More...

James replied to the topic 'Indi and EKOS with Canon M3/10/100/6' in the forum. 1 year ago

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.

Read More...