Canon Digital Photography Forums  

Go Back   Canon Digital Photography Forums > 'Sharing Knowhow' section > RAW, Post Processing and Printing > Computers
Register Rules FAQ Members List Search Today's Posts Mark Forums Read



Reply
 
Thread Tools Display Modes
Old 19th of May 2013 (Sun)   #1
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default 6D Wifi DLNA Analysis

I'm trying to figure out how to pull pictures out of the 6D over Wifi. It doesn't have the FTP server functionality that the wireless file transmitter (WFT-E4 ?) has, so it seems the easiest way without reverse engineering the EOS utility is to use the DLNA mode.

Using VLC to browse the camera, it seems the URLs for the JPG files is in the form
http://CAMERAIP:15846/EOS/#/FolderID#/fileIDnumber
i.e.
http://192.168.1.30:15846/EOS/2/100/1852830221

If you just download that URL, you'll get a JPG file! No RAWs unfortunately.

Still it's a good start. What I'm trying to figure out is how VLC is getting these URLs in the first place. Does anyone know or have an idea where I could look? VLC also seems to be able to find the location where it can map these ID numbers to the actual filenames too.

If I can get all the URLs and other information? Seems the DLNA spec is rather obscure and proprietary, I'll probably post this to the VLC forums later and see what the devs can tell me too.

If I can get all that information, then I can write a script that can pull copies of these files once they're shot and do a wireless backup using a raspberry pi or other small computer =)
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
This ad block will go away when you log in as member
Old 20th of May 2013 (Mon)   #2
hiketheplanet
Member
 
hiketheplanet's Avatar
 
Join Date: May 2013
Posts: 608
Default Re: 6D Wifi DLNA Analysis

AFAIK the 6D broadcasts its own wireless network for use with a smartphone app OR it acts as another device on your home wireless network (hence the 192.168.X.Y address there).

I am assuming the WiFi capabilities are JPG only (unless someone else knows otherwise, I'd love to know too). That unfortunately is baked into your camera's firmware, so unless you intend on doing a firmware dump & reverse engineering, you're probably out of luck (but hey, you can always cast your vote for 6D compatibility on Magic Lantern's site...)

If it's impossible to pull the RAW files from the camera over WiFi, then it's probably not worth your time to write your own backup software IMO.

With that said, it would be straightforward using JavaScript to pull the images over your home network since you understand the camera's directory structure, POST'ing the server-side, and then FTP'ing them or whatever your backup intentions are.

I'm a software engineer, but I don't have a 6D to play around with. This sounds really interesting. Please keep us posted! Any info learned here is at least valuable to me
hiketheplanet is offline   Reply With Quote
Old 20th of May 2013 (Mon)   #3
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default Re: 6D Wifi DLNA Analysis

Did some more digging, and I think I actually have a handle for how this works! But I don't know enough about DLNA and UPNP stuff to do this quite right yet.

First, yes in DLNA mode only JPGs will transfer. The Wifi on the 6D is too slow to transfer RAWs quickly anyway; while the EOS Utility mode will transfer RAWs as well as allow camera control, it's painfully slow (I'm seeing rates of about 3-5MB/s on a 802.11n 2.4ghz network, it doesn't appear to support 5ghz) so it's not really worth it. Also, during transfer it stalls the camera until the transfer is complete, so I don't think it's a good idea.

Now using a upnp-browser tool on Linux, I've been able to find that the 6D simply advertises itself as a standard media server, and issuing a standard "Browse" command will give you the XML files that list the directory structure and URLs to the JPGs!! The query XML looks like this:

Code:
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>0</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>*</Filter><StartingIndex>0</StartingIndex><RequestedCount>0</RequestedCount><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>
will return something similar to this:
Code:
<?xml version='1.0' encoding="UTF-8" ?>
<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
	xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">
<container id="C/2/" parentID="0" restricted="1">
<dc:title>SD</dc:title>
<upnp:class>object.container</upnp:class>
<dc:date>2013-05-20T16:45:19</dc:date>
</container>
</DIDL-Lite>
Just follow the container ids down until you get to the JPGs. Then it'll look like so:
Code:
<?xml version='1.0' encoding="UTF-8" ?>
<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
	xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">
<item id="I1852830029@/2/100/201-300/" parentID="C/2/100/201-300/" restricted="1">
<dc:title>IMG_0235.JPG</dc:title>
<upnp:class>object.item.imageItem.photo</upnp:class>
<dc:date>2013-05-20T16:46:54</dc:date>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_FLAGS=00900000000000000000000000000000" size="961183" resolution="2736x1824">http://192.168.2.30:15846/EOS/2/100/1852830029</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_FLAGS=00900000000000000000000000000000" resolution="640x480">http://192.168.2.30:15846/EOS/2/100/1852830021</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_FLAGS=00900000000000000000000000000000" size="8580" resolution="160x120">http://192.168.2.30:15846/EOS/2/100/1852830025</res>
</item>
<item id="I1852830013@/2/100/201-300/" parentID="C/2/100/201-300/" restricted="1">
<dc:title>IMG_0236.JPG</dc:title>
<upnp:class>object.item.imageItem.photo</upnp:class>
<dc:date>2013-05-20T16:47:00</dc:date>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_FLAGS=00900000000000000000000000000000" size="2596496" resolution="2736x1824">http://192.168.2.30:15846/EOS/2/100/1852830013</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_FLAGS=00900000000000000000000000000000" resolution="640x480">http://192.168.2.30:15846/EOS/2/100/1852830005</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_FLAGS=00900000000000000000000000000000" size="8788" resolution="160x120">http://192.168.2.30:15846/EOS/2/100/1852830009</res>
</item>
</DIDL-Lite>
So all I've got to do is figure out a scriptable way to make these queries! I've been using gupnp-universal-cp to invoke these queries, but I don't yet know how to do it nicely from a command line so I can script it. I tried doing it via curl or wget posts, but it hasn't worked yet.

So I think my main difficulty with this right now is learning more about DLNA/UPNP and how to properly query it!
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
This ad block will go away when you log in as member
Old 21st of May 2013 (Tue)   #4
automag928
Member
 
Join Date: Aug 2008
Location: Tampa
Posts: 213
Default Re: 6D Wifi DLNA Analysis

You're doing good work man! Keep at it!
__________________
Canon 6D | Canon 24-105 f4L | Canon 70-300L | Canon 50 1.8 | 430EX | SB-25 | SB-28

Gear / Feedback
automag928 is offline   Reply With Quote
Old 21st of May 2013 (Tue)   #5
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default Re: 6D Wifi DLNA Analysis

Thanks =)
I actually did manage to get it to spit out the index xml using curl yesterday, trying to script it now, I'll be sure to post more once I have it ready.

Even without RAW, it's not bad to have a JPG copy!
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
Old 24th of May 2013 (Fri)   #6
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default Re: 6D Wifi DLNA Analysis

Have had some more fun with my 6D's wifi. Think I have something neat going =)


My "PiDrive" prototype. It creates a Wifi access point for the 6D to connect to using DLNA mode. The PiDrive then finds the 6D and automatically copies all photos it finds to the attached hard drive.

The little display to show status and progress (working on it, just got display assembled today!), runs off 6AA batteries right now, have a pair of RC LiFE batteries on order, should give this thing about 3-4 hours of runtime.

Hard drive is formatted FAT or exFat depending on how big of one I find that'll still fit in the power envelope, so should be able to just unplug and connect directly to any computer for fast transfer. I could set up a file server on this too, but for now I want to get the file copies and the display working.

Also hoping to set it up so that you can plug and unplug the Wifi dongle and replace it with a card reader, and have it automatically suck files out of the card reader to the hard drive.

Will post more details as I get this thing developed =)
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
Old 28th of May 2013 (Tue)   #7
automag928
Member
 
Join Date: Aug 2008
Location: Tampa
Posts: 213
Default Re: 6D Wifi DLNA Analysis

That is AWESOME!!!!
Keep up the work and give us the details!!!!
__________________
Canon 6D | Canon 24-105 f4L | Canon 70-300L | Canon 50 1.8 | 430EX | SB-25 | SB-28

Gear / Feedback
automag928 is offline   Reply With Quote
Old 28th of May 2013 (Tue)   #8
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default Re: 6D Wifi DLNA Analysis

Put together a little demo video of the USB copy mode, that was easier to get working than the Wifi copying.

http://youtu.be/GNA_tb7i364

In Wifi mode, it shows up as an AP that the 6D can connect to successfully, but the 6D's UPNP implementation is funny and sometimes the PiDrive has trouble finding it. It seems to only announce itself on initial connection or something.
On top of that, while I found something that makes it easy to find and copy files from the 6D, it doesn't set the datestamp correctly and I need to dig through a separate metadata file to fix it.
None of that is insurmountable, just will take a little more time =)
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
Old 14th of June 2013 (Fri)   #9
automag928
Member
 
Join Date: Aug 2008
Location: Tampa
Posts: 213
Default Re: 6D Wifi DLNA Analysis

Any updates on your progress??
__________________
Canon 6D | Canon 24-105 f4L | Canon 70-300L | Canon 50 1.8 | 430EX | SB-25 | SB-28

Gear / Feedback
automag928 is offline   Reply With Quote
Old 14th of June 2013 (Fri)   #10
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default Re: 6D Wifi DLNA Analysis

Not a lot unfortunately, been busy!
Been finding performance issues with the Raspberry Pi, not sure whether it's the older SD card reader I'm using or what. USB->USB copies happen at barely 5MB/s, not very good for transferring RAW.

I did get my rechargeable batteries, and I'm pretty surprised how long this thing lasts on either the AA battery pack or the new ones. I'll have to time it when it gets a little more complete.

Hoping to have time to work on it this weekend, will post updates if I get a chance =)
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
Old 14th of June 2013 (Fri)   #11
powerslave
Senior Member
 
Join Date: Feb 2008
Posts: 1,635
Default Re: 6D Wifi DLNA Analysis

You got any code on github?

I might be interested. Also, have you considered Beaglebone Black? http://beagleboard.org/Products/BeagleBone%20Black
__________________
flickr photostream
DP2 Merrill | 6D | TS-E24LII | EF24-105L
powerslave is offline   Reply With Quote
Old 14th of June 2013 (Fri)   #12
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default Re: 6D Wifi DLNA Analysis

Not yet. Definitely mean to put something up when I get a chance though.

I thought more of using the Cubieboard because it has an actual SATA connector, but reports say it's somewhat unreliable. I'll stick with the Pi for now though since I actually have a couple spare.
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
Old 14th of June 2013 (Fri)   #13
powerslave
Senior Member
 
Join Date: Feb 2008
Posts: 1,635
Default Re: 6D Wifi DLNA Analysis

Cool. I'm keeping an eye out.
__________________
flickr photostream
DP2 Merrill | 6D | TS-E24LII | EF24-105L
powerslave is offline   Reply With Quote
Old 22nd of June 2013 (Sat)   #14
dpyro
Member
 
Join Date: May 2013
Posts: 69
Default Re: 6D Wifi DLNA Analysis

Make sure the RPi is juiced up enough. Wifi sucks down power, as does a portable HDD. Use the T1 and T2 test points to see if there is an undervolt condition.
Make sure all devices are in USB 2.0 mode.
The USB ports all run on a 100MBit/s bus, so you have inbound wifi data -> mem, and then mem -> HDD. This would explain a 5MB/s transfer.
__________________
Canon 600D (ML) | EF-S 18-55/3.5-5.6 IS II | EF 50/1.8 II | Speedlite 580EX II | iPhone 5
Zoom H1
dpyro is offline   Reply With Quote
Old 22nd of June 2013 (Sat)   #15
Naito
Member
 
Join Date: Oct 2008
Location: Toronto
Posts: 165
Default Re: 6D Wifi DLNA Analysis

Quote:
Originally Posted by dpyro View Post
Make sure the RPi is juiced up enough. Wifi sucks down power, as does a portable HDD. Use the T1 and T2 test points to see if there is an undervolt condition.
Make sure all devices are in USB 2.0 mode.
The USB ports all run on a 100MBit/s bus, so you have inbound wifi data -> mem, and then mem -> HDD. This would explain a 5MB/s transfer.
Which ones are the T1 and T2 points?
Power is coming from a 3A RC UBEC directly going into the GPIO, I have a 5A version but I was hoping I could use just the 3A, 5A would mean the battery life is a lot shorter than I hoped. I have a 2S 6.6v 4000mah battery for powering this, didn't want to get much bigger, still want it to last at least 3 hours.

All devices are USB2, the card reader is actually USB3 even though I know the Pi only has USB2, just figure I'd get things as fast as possible to make sure the bottlenecks are within the Pi. I may try a different USB-SATA converter. Initial tests were run using an old OCZ Solid SSD that had a built-in USB-SATA converter, speed wasn't much better surprisingly but that was with an older card reader. I just got the USB3 one (Kingston Mobilite G3) last week, haven't tested with it yet.

I have overclocked the Pi slightly, but I may have to play with the governer because I don't think it's clocking up during copying.

Haven't had much time to work on it lately, I'll keep updating though when I get a chance.
__________________
Carl
EOS 40D | 6D

16-35 f/2.8L II | 50mm f/1.8 II | 24-70 f/2.8L | 70-210 f/4 Push-Pull | Tamron SP 70-300 f/4-5.6 Di VC | Opteka 500mm f/6.3 Mirror
Metz 50-AF1 | Yongnuo YN-622C
Naito is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
photo analysis chauncey General Photography Talk 15 28th of December 2007 (Fri) 08:35
Uh oh...Analysis Paralysis vinnyveez General Photography Talk 9 22nd of March 2005 (Tue) 16:33


All times are GMT -5. The time now is 04:12.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
This forum is not affiliated with Canon in any way and is run as a free user helpsite by Pekka Saarinen, Helsinki Finland. You will need to register in order to be able to post messages. Cookies are required for registering and posting. HTML in messages is not allowed, plain website addresses are automatically made active by the board.