Using the PTP extension on an SX40HS - General Help and Assistance on using CHDK stable releases - CHDK Forum
supplierdeeply

Using the PTP extension on an SX40HS

  • 6 Replies
  • 5181 Views
Using the PTP extension on an SX40HS
« on: 22 / September / 2016, 02:48:12 »
Advertisements
Hello,
I installed CHDK in hope to use my SX40HS remotely via USB (live preview and remote shutter). This seems possible regarding the PTP extension page : http://chdk.wikia.com/wiki/PTP_Extension

However I had no luck so far. So I have some questions to ask you :

- Is the SX40HS supported by the PTP Extension?
- Do I have to activate it somehow? (I understand USB Remote is a completely different thing and I kept it disabled)
- When I boot CHDK and plug in the USB cable, the camera switch in play mode and there is nothing I can do.
- Will a library like Gphoto2 be able to access the SX40HS with the PTP Extension or do I have to use an app specially crafted for PTP Extension?

Thanks


*

Offline reyalp

  • ******
  • 14117
Re: Using the PTP extension on an SX40HS
« Reply #1 on: 22 / September / 2016, 16:16:15 »
- Is the SX40HS supported by the PTP Extension?
It should, but bugs are always possible.
Quote
- Do I have to activate it somehow? (I understand USB Remote is a completely different thing and I kept it disabled)
- When I boot CHDK and plug in the USB cable, the camera switch in play mode and there is nothing I can do.
Start the camera in play mode, and then switch to record mode using the PTP extension with the 'rec' command if you are using chdkptp, or set_record() if you are sending Lua code yourself.

If you are using windows, you need to have set up the libusb-win32 driver first.

If you are using linux, you may need to resolve the udev rule issues described near the bottom of https://app.assembla.com/spaces/chdkptp/wiki/Install
If the camera screen goes black when you plug in the USB cable, you probably do.

Quote
- Will a library like Gphoto2 be able to access the SX40HS with the PTP Extension or do I have to use an app specially crafted for PTP Extension?
Some version of gphoto2 do have some for the PTP extension, but I don't know what state it is in. I would personally recommend using chdkptp (https://app.assembla.com/spaces/chdkptp/wiki) but being the author I'm probably biased :haha
Don't forget what the H stands for.

Re: Using the PTP extension on an SX40HS
« Reply #2 on: 23 / September / 2016, 03:59:29 »
Thanks a lot! everything is working flawlessly with CHDKPTP now.

Ideally I would like to control the camera from my android phone. There is a lot of apps like
- Remote Release
- DSLR Remote Control
- Helicon Remote

All of them can use a USB OTG cable to remotely control the camera, so I guess they are using the PTP protocol. However I had no luck trying to use them with my camera.
Should they work in theory or is there something special about PTP extension preventing them to acces the camera ?

*

Offline reyalp

  • ******
  • 14117
Re: Using the PTP extension on an SX40HS
« Reply #3 on: 23 / September / 2016, 13:06:40 »
Should they work in theory or is there something special about PTP extension preventing them to acces the camera ?
CHDK is not blocking them, but they would not be expected to work with most powershots.

Outside of basic file transfer, almost everything in PTP is done with vendor extensions, so apps like this have special code for e.g. Canon, Nikon etc.

Canon does not include support for their PTP remote shooting protocol on most of their recent P&S cameras, so these cameras cannot be controlled by the apps you mention.

Due to the constraints of being patched into a reverse engineered firmware, the CHDK extension is completely different from any of the vendor extensions. The apps you mention above might theoretically be able to support CHDK (depending on the details of how Android handles USB access), but they probably don't.
Don't forget what the H stands for.


Re: Using the PTP extension on an SX40HS
« Reply #4 on: 23 / September / 2016, 18:25:43 »
Due to the constraints of being patched into a reverse engineered firmware, the CHDK extension is completely different from any of the vendor extensions. The apps you mention above might theoretically be able to support CHDK (depending on the details of how Android handles USB access), but they probably don't.
Alternately, would it be possible to use CHDK to "sniff" what one or more of those apps is trying to send? You'd have to figure out any handshaking and hope nothing is encrypted. 

Or is the PTP remote shooting protocol documented enough that it could be implemented on the camera side with CHDK?  (edit : PTP v1.1 (ISO15740:2008) )
« Last Edit: 23 / September / 2016, 18:33:37 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14117
Re: Using the PTP extension on an SX40HS
« Reply #5 on: 23 / September / 2016, 22:00:54 »
Alternately, would it be possible to use CHDK to "sniff" what one or more of those apps is trying to send?
There are packet sniffers that work with USB (e.g. wireshark) but you'd probably need a camera that actually supported the protocol as an example.
Quote
You'd have to figure out any handshaking and hope nothing is encrypted. 
The CHDK protocol is the way it is precisely to avoid the pain that would be involved in doing this. That said, if someone manages to implement it, I'd certainly be willing to consider including it in CHDK  ;)

Quote
Or is the PTP remote shooting protocol documented enough that it could be implemented on the camera side with CHDK?  (edit : PTP v1.1 (ISO15740:2008) )
Gphoto has implemented the PC side for many cameras, so no doubt someone who wanted to spend enough time and effort could figure it out. But implementing the camera side within the constraints of CHDK would likely require a lot of effort.

Also, it's quite likely the apps recognize specific cameras (because many rely on vendor extensions), so they might not talk to CHDK models even if they supported the protocol.
Don't forget what the H stands for.

Re: Using the PTP extension on an SX40HS
« Reply #6 on: 26 / September / 2016, 03:22:02 »
Thanks for your explanations reyalp.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal