2017-08-04 07:09 PM
Hi,
I'm working on a project which should communicate with a camera (canon, Nikon ....) and should be able to get pictures from the camera through Usb port.
i search in the net for a way to do that and i found that the picture transfer protocol (PTP) is used for this purpose.
i have an STM32F4 Discovery board which include USB OTG connector and a Canon PowerShot SD3500 IS camera which should support the PTP protocol according to the
https://support.usa.canon.com/kb/index?page=content&id=ART126085
.So my questions are :
1/ I want to know if the STM32F4 Discovery board is able to get pictures from the camera using the PTP protocol
?
2/ Is there any library or example to help me to figure out how to do that or even how to start the project ?
3/ Should i get an OTG cable to connect it to my camera ?
4/ Can i even go further and not just limit the project to get picture but even control the camera, like send an order to take a shot .... similar to the
https://www.youtube.com/watch?v=aGAHeJVDePk
.any help is greatly appreciated,
regards,
2023-10-24 09:44 PM
I am also concerned about this issue like you
2024-03-30 08:56 AM
I too am trying to figure this out. (I think) I was able to connect with the camera (Sony A7iii) using the MTP middleware in the USB host library. I however would primarily like to control the camera i.e. get the settings (exposure, aperture, ISO, etc.) from the camera instead of transferring photos. I noticed that there is a USBH_PTP_Init function call at the end of the USBH_MTP_InterfaceInit function, but that seems to do very little and thus I assume that creating a typedef for PTP based on the MTP implementation and replacing the MTP functions and class code with PTP ones, is unlikely to work. I tried controlling the camera using the MTP middleware, but it does not seem to connect, so I assume, even though MTP is built on top of PTP, if MTP class is used instead of PTP, controlling the camera will not work. I have downloaded the PTP and MTP documentation and have browsed through it, but sadly don't really know where to start with modifying the STM32 middleware.
Any tips would be really appreciated on this!
2024-03-31 04:40 PM
HI @gadgetmies , you can try with USBX (AzureRTOS) middleware it support PIMA (MTP/PTP) for both Device and Host sides.
https://learn.microsoft.com/en-us/azure/rtos/usbx/usbx-host-stack-supplemental-2#prototype-13