Thank you for finding my tutorial useful! It has been a while since I last used this method as I upgraded my camera to a ZWO this summer, but I'll see what I can do.
It could be that it is no longer compatible with the current version of the driver although I doubt that.
to answer your questions:
the port "pseudo" is indeed assigned to the dslr driver as this is the fake serial port. The port "software" is used by the python script to interact with the pseudo port. There is no need to assign a port to the EQMod driver. The EQMod driver is controlled using the "Mount.SNAPPORT1.SNAPPORT1" commands. In order to check if this is the correct command for your mount I believe you can use the "indi_getprop" command in a terminal window on your rpi. It should list all the properties of your mount. This tutorial explains the use of these commands: indilib.org/develop/developer-manual/104-scripting.html
If you mean the option "Snap port 1 [OFF] [ON]", it should be set to off. The options on/off refers to if the port should trigger a shutter release or not. If set to on it opens your shutter and closes it if set to off. The python script will adjust this setting to trigger a capture on your dslr.
I hope this information will help you solve the problem. If not, could you send me a screenshot of the python script output, your EQMod settings and dslr driver settings?
Kind regards and clear skies,
Thanks for the compliment!
I agree that it would be a lot better if this was done on driver level. It'd make the process much more user friendly. I'll see if I can work out your suggestion.
My First post here about the biggest struggle I had with my setup. Hope it will be helpful to some of you.
Recently I started to integrate my Canon 350d DSLR into my astronomy setup. It's a fairly old model and because of that it doesn't support exposures longer than 30 sec over USB. Bummer!
So i set out to solve my problem and expose as long as I want. The equipment I used to achieve this is as follows:
Mount: EQ6-R pro
Camera: Canon 350d
Controller: Raspberry Pi 4 (2Gb) with Astroberry Os (linux)
Software: Ekos, INDI, Thonny (python IDE, any python IDE can be used)
Cables: 3,5mm male to 2,5mm male shutter cable
My plan was to use the build-in Snap port on my EQ6-R pro. This port functions as a shutter release for the connected camera. Normally you would control it with the handcontroller, but recently support was added in de EQMod driver. This allowed the port to be controlled by software. Pretty neat, huh? Problem was, the Canon driver has no option to set this port as the external shutter release. Only serial ports can be set here (to my knowledge). Luckily, Linux allows the creation of "pseudo" serial ports. These ports function just like regular serial ports except that they communicate with a second port that can be controlled by software. The INDI driver doesn't seem to expect any return communication from the shutter port, so I won't have to deal with sending stuff.
My plan: INDI -> pseudo serial port -> software port -> shutter control program
INDI sends a command to the pseudo port -> The pseudo port forwards this to the sofware port -> the software port can be read by the python script -> python scripts opens or closes the shutter of the camera.
To create this port-pair the python "OS" module has the function: os.openpty() (see: docs.python.org/3/library/os.html for more details on the OS module)
This function opens the pair and returns the identifier to both. To get the file descriptor of the pseudo port, the function os.ttyname() is used. The input is the identifier from the openpty() command.
In my case, running os.ttyname() results in the descriptor looking like: /dev/pts/1
This wil be the port that you specify in INDI as the shutter release port. Depending on the existence of other virtual ports, that "1" might change. My python script prints the descriptor so pay close attention to what it says!
To read the software port the command os.read() is used. A bit more difficult because you need to specify how many bytes there are to read and I had no idea what that amount was. After some testing I figured 3 was the correct number (please correct me if I'm wrong).
The identifier of the software port is also needed.
os.read() returns the specified amount of bytes which I put into a list. The last byte is needed to see if the shutter should be opened. This corresponds to element 2 in the list (remember, lists start at 0 in python).
This whole port stuff was what gave me the most "trouble", as I was unfamilier with any of these commands/ports.
Setting the shutter port to open and close is real easy. I followed this awesome tutorial on scripting: indilib.org/develop/developer-manual/104-scripting.html
The EQMod property used is: "Mount.SNAPPORT1.SNAPPORT1_ON=On"
This opens the shutter and "Mount.SNAPPORT1.SNAPPORT1_OFF=On" closes it. These ON and OFF are two different properties but they influence each other. So setting one to On sets the other to Off. This is why I don't set the "ON" to Off in my script.
THE COMMANDS ARE CASE SENSITIVE!! BE WARNED!!
Lastly, a endless loop constantly checks if the shutter needs to be open or closed and updates the EQMod property accordingly.
See here the fruits of my labor: