Connecting a DSLR camera via PTP on Android

1,482 views
Skip to first unread message

Tanaka

unread,
Nov 26, 2010, 12:48:35 AM11/26/10
to android-porting
Hi guys,

How are you doing? This is my first message, I'm not a developer, I'm
just a Brazilian photographer with a poor English, crazy ideas and
some kind of understanding of what we could do in the future (or
not) :) and I'm here to ask you help or some tips to follow with my
busy developers friends here in Sao Paulo.

I'm trying to find a way to connect my DSLR camera to Android. I know
that today it's not possible because there's no suport to PTP (Picture
Transfer Protocol) or MTP (Media Transfer Protocol) on Android - as
you guys have already said before http://osdir.com/ml/android-platform/2009-02/msg00922.html
-, but let me try to explain why this could be a good thing to have
working.

I've developed a simple script that monitors a folder on my notebook
and send the JPG files (low resolution images) through mail to flickr
or picasa. My intention is to publish the images automatically
straight out of my DSLR camera connected to any kind of phone, modem,
whatever. Today I can do that with a notebook, but It's kind of clumsy
to shoot with a Macbook on my back and a 3G modem hung. Android phones
would be perfect just because it's open source! I could never imagine
that with an iPhone or Windows Mobile.

I'm trying to find a cheap solution like an app that in the future
could be sold on Android Market to any photo-journalist, press
company, freelancer or whoever (if anyone create this, please give me
the credit for the idea at least... LOL).

I can see some issues following this idea:
- MTP support
- Transfer speed
- RAW files + JPGs
- Storage
- Multi-tasking

MTP/PTP
Why do I insist on MTP/PTP? Because all professional cameras uses it
as a default protocol to comunicate, send files. Yes, there's some
very expensive solutions that can send files through wi-fi but I think
that wi-fi doesn't solve my problem, the perfect world could have a 3G
modem stuck right in the camera to publish the content in real time.
Today with my DSLR + PTP + Macbook + 3G I can shoot and publish with a
delay of 30 seconds :)

Transfer speed
Professional cameras has powerful image processors that delivers files
in high resolution. Imagine process raw files with a JPG low
resolution version at the same time with 8 frame per second! If a
camera has 12 megapixels the transfer of these images will be
something like 96 megabytes per second. I don't know, I'm just
guessing without knowing if there's mobile hardware that can handle
this, my guess tells me that it's quite impossible, isn't it?

RAW + JPG
My camera can generate 2 images of each photo, one is the high
resolution, it's the back up file, the RAW to process and print it on
magazines, newspapers. Other one is the JPG version in low resolution
which I need just to publish on the web. When the camera is connected
via PTP it doesn't save the files on its compact flash card, the
camera send the files via PTP, so I need booth files, RAW to process
later (after the photo session's end) and the JPG to publish as it was
taken.

Storage
What is better, write the files on the mobile local flash memory or in
the micro SD card? Every photo session I need at least 8Gb and I can
lose any photo.

Multi-tasking
I need that the phone write the RAW files and send the JPG at the same
time. Am I out of my mind and asking to much? LOL

Please guys, I'd appreciate if anyone could help or suggest another
way to do that: shoot and publish in a blink :)

Thank you for your time!

Big hug from a Brazilian friend,

Silvio Tanaka
http://livpic.at
http://flavors.me/tanaka

Tanaka

unread,
Nov 27, 2010, 11:34:05 PM11/27/10
to android-porting
Ops, I mean "I can't lose any photo" not "I can lose"...
On 26 nov, 03:48, Tanaka <silvio.tan...@gmail.com> wrote:
> Hi guys,
>
> How are you doing? This is my first message, I'm not a developer, I'm
> just a Brazilian photographer with a poor English, crazy ideas and
> some kind of understanding of what we could do in the future (or
> not) :) and I'm here to ask you help or some tips to follow with my
> busy developers friends here in Sao Paulo.
>
> I'm trying to find a way to connect my DSLR camera to Android. I know
> that today it's not possible because there's no suport to PTP (Picture
> Transfer Protocol) or MTP (Media Transfer Protocol) on Android - as
> you guys have already said beforehttp://osdir.com/ml/android-platform/2009-02/msg00922.html

Chris Stratton

unread,
Nov 28, 2010, 8:59:35 PM11/28/10
to android-porting
Many of the android phones such as the G1, Mytouch, Hero (and probalby
Nexus 1) can support USB host mode if you root them and install a
recompiled kernel. The original droid was rumored to have this
capability in the shipping firmware. But that's only the start of the
capability you need - a lot of devlepoment would still need to be
done. And it's fairly painful development, in that once you switch
the USB to host mode you loose the normal ADB development channel into
the phone, and have to set up ADB over something else like wifi in
order to load and debug your code.

So in effect, this is a project that can be done today with careful
selection of the phone and selection of a developer with the right
skills, and sufficient determination. But it's not going to be easy,
and the requirement for a rooted and modified phone means it's going
to be hard to market.

On Nov 26, 12:48 am, Tanaka <silvio.tan...@gmail.com> wrote:
> Hi guys,
>
> How are you doing? This is my first message, I'm not a developer, I'm
> just a Brazilian photographer with a poor English, crazy ideas and
> some kind of understanding of what we could do in the future (or
> not) :) and I'm here to ask you help or some tips to follow with my
> busy developers friends here in Sao Paulo.
>
> I'm trying to find a way to connect my DSLR camera to Android. I know
> that today it's not possible because there's no suport to PTP (Picture
> Transfer Protocol) or MTP (Media Transfer Protocol) on Android - as
> you guys have already said beforehttp://osdir.com/ml/android-platform/2009-02/msg00922.html

Ajith Kamath

unread,
Nov 28, 2010, 9:51:30 PM11/28/10
to cs0...@gmail.com, silvio.tanaka, android-porting
Hi

I am not sure if rooting of phone is necessary in this case.
As in If the sole intention is to upload the pics or store a backup in sdcard, we will only need mobile device ,
Without needing to connect to PC.

Well for debugging purpose , I have rooted the phone , and I am able to get all normal logs.
Except that I have disabled the sdcard , since its mounted for storage during this operation.
Let me know if I'm wrong anywhere.

I'm going through PTP now. My initial leaning of the protocol indicated there is no need of extra drivers.
And that communication will be over USB transport media.
Please provide your view on this.

Thanks & Regards,
Ajith


Chris Stratton

unread,
Nov 28, 2010, 10:29:25 PM11/28/10
to android-porting
On Nov 28, 9:51 pm, Ajith Kamath <sjce.aj...@gmail.com> wrote:

> I'm going through PTP now. My initial leaning of the protocol indicated
> there is no need of extra drivers.
> And that communication will be over USB transport media.
> Please provide your view on this.

Unless it already supports PTP (haven't heard of any that do) you will
need to replace the phone's USB drivers with PTP-capable ones. Or
more likely, because others have already written them, install USB
host drivers and talk to the camera as if you were a desktop linux PC
talking to the camera using camera drivers that someone has
(hopefully?) already written for desktop linuxes.

If you want to understand the scope of the project, I'd suggest you
figure out how to pull pictures off the camera onto a desktop linux
box, using only software that you have compiled from sources
yourself. Doing it on android will be like that, only with a lot more
things that can go wrong along the way.



Ajith Kamath

unread,
Nov 30, 2010, 5:45:44 AM11/30/10
to cs0...@gmail.com, Silvio Tanaka, android-porting
Hi

I found this on Sourceforge, Looks like ptp 1.2 is already implemented.
I haven't had the time to look into this but let me know if this is right one.
They have modified the usb part too.

I'm guessing i need to develop service to upload the photos.
Please advice.

Thanks & Regards,
Ajith

Ajith Kamath

unread,
Nov 30, 2010, 5:49:42 AM11/30/10
to cs0...@gmail.com, Silvio Tanaka, android-porting

Tanaka

unread,
Dec 1, 2010, 11:17:20 AM12/1/10
to android-porting
Sorry guys for the silly question... (as I said, I'm not a developer)
If I made out, with this implementation that Ajith found we still need
to recompile a new version of Android for the OS talk with the camera,
is it right?

I'm using Nikon system (Nikon D300 and D90), but would be good for
market if the application works at least with Canon too. And I expect
to use it on Nexus One or Galaxy S (but here in Brazil it's still so
expensive).

In my research for Nikon drivers and I've found this, I don't know if
it helps: http://gphoto.org/proj/gphotofs/

Thanks!!!

Tanaka

unread,
Dec 1, 2010, 11:19:38 AM12/1/10
to android-porting
I'll illustrate the workflow and create the interface wireframes for
the app, maybe if we see something it could be much easier to
understand :)

Silvio Tanaka

Tanaka

unread,
Dec 1, 2010, 11:22:45 AM12/1/10
to android-porting
Reply all
Reply to author
Forward
0 new messages