The combined command I pasted does these things on two (or more I guess) connected CHDK-cameras: activates photo mode, autofocuses the camera, takes a photo and then shows the photo on the camera display. Nice!
Please be aware that multicam is quite unfinished at this point. Of course you are welcome to use it, but some hacking might be required to get all the functionality you want.
But I'd also like to download photos from the cameras in parallell. I see no command for that in multicam.lua . Does anyone know another way to do that?
Not implemented yet in multicam. It should be pretty straightforward, just iterate over the cameras like the other multicam functions and call one of the download functions. This is on my list of things to do.
If you use con:mdownload(), you will need to exit and restart the camera side multicam script,eg.
mc:cmd('exit')
-- download stuff here...
mc:start()
If you use the low level con:download(), you could leave the script running, but it doesn't support pattern matching, multiple files, or preserving timestamps.
Rather than passing loads of -e commands, you would write your own lua file, and then do something like
chdkptp -e"!dofile('myfile.lua')"
Or add your own function to multicam, mc:testshots may be a useful example.
I haven't tested, but I suspect the reason multiple independent processes don't work is because
1) Connect by model name or serial number requires making a connection to obtain the info
2) Obtaining a connection requires kicking off anything else that already has a connection
If you connect by product id, (-p=<pid>) it might work. Bus/device should also work, but beware they do not correspond to the physical interface the camera is connected on. The numbers are assigned by libusb and can change across camera resets, reconnects etc. even if the physical connection is never unplugged or moved.