LOG IN    OR   REGISTER TO FORUMS


6D Wifi DLNA Analysis

FORUMS General Gear Talk Computers
Thread started 19 May 2013 (Sunday) 23:09   
LIST NEARBY THREADS
 
Naito
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

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#/fileID​numberexternal link
i.e.
http://192.168.1.30:15​846/EOS/2/100/18528302​21external link

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 =)

Post #1, May 19, 2013 23:09:43


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY
sponsored links
(this ad will go away when you log in as registered member)
hiketheplanet
Senior Member
hiketheplanet's Avatar
Joined May 2013
600 posts
[MORE/SHARE]

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

Post #2, May 20, 2013 15:14:44


6D • EOS-M • 16-35/4L IS • 22/2 • 50/1.2L
Gear

LOG IN TO REPLY
Naito
THREAD ­ STARTER
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

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:

<?xml version="1.0"?><s:Envelope xmlns:s="http://schema​s.xmlsoap.org/soap/env​elope/"s:encodingStyle​="http://schemas.xmlso​ap.org/soap/encoding/"​><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDir​ectory: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:
<?xml version='1.0' encoding="UTF-8" ?>
<DIDL-Lite xmlns:dc="http://purl.​org/dc/elements/1.1/"
xmlns:upnp="urn:schem​as-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:
<?xml version='1.0' encoding="UTF-8" ?>
<DIDL-Lite xmlns:dc="http://purl.​org/dc/elements/1.1/"
xmlns:upnp="urn:schem​as-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;DL​NA.ORG_FLAGS=009000000​000000000" size="961183" resolution="2736x1824"​>http://192.168.2.30:15​846/EOS/2/100/18528300​29</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLN​A.ORG_FLAGS=0090000000​00000000" resolution="640x480">http://192.168.2.30:15​846/EOS/2/100/18528300​21</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLN​A.ORG_FLAGS=0090000000​00000000" size="8580" resolution="160x120">http://192.168.2.30:15​846/EOS/2/100/18528300​25</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;DL​NA.ORG_FLAGS=009000000​000000000" size="2596496" resolution="2736x1824"​>http://192.168.2.30:15​846/EOS/2/100/18528300​13</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLN​A.ORG_FLAGS=0090000000​00000000" resolution="640x480">http://192.168.2.30:15​846/EOS/2/100/18528300​05</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLN​A.ORG_FLAGS=0090000000​00000000" size="8788" resolution="160x120">http://192.168.2.30:15​846/EOS/2/100/18528300​09</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!

Post #3, May 20, 2013 15:50:19 as a reply to hiketheplanet's post 35 minutes earlier.


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY
automag928
Senior Member
Joined Aug 2008
213 posts
Tampa
[MORE/SHARE]

You're doing good work man! Keep at it!

Post #4, May 21, 2013 11:57:28


Canon 6D | Canon 24-105 f4L | Canon 70-300L | Canon 50 1.8 | 430EX | SB-25 | SB-28

Gear / Feedback

LOG IN TO REPLY
Naito
THREAD ­ STARTER
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

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!

Post #5, May 21, 2013 13:59:24


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY
sponsored links
(this ad will go away when you log in as registered member)
Naito
THREAD ­ STARTER
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

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

IMAGE: http://i.imgur.com/L3vwL3k.jpg

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 =)

Post #6, May 24, 2013 22:01:36


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY
automag928
Senior Member
Joined Aug 2008
213 posts
Tampa
[MORE/SHARE]

That is AWESOME!!!!
Keep up the work and give us the details!!!!

Post #7, May 28, 2013 14:03:25


Canon 6D | Canon 24-105 f4L | Canon 70-300L | Canon 50 1.8 | 430EX | SB-25 | SB-28

Gear / Feedback

LOG IN TO REPLY
Naito
THREAD ­ STARTER
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

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_tb​7i364external link

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 =)

Post #8, May 28, 2013 16:12:19


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY
automag928
Senior Member
Joined Aug 2008
213 posts
Tampa
[MORE/SHARE]

Any updates on your progress?? :)

Post #9, Jun 14, 2013 12:27:30


Canon 6D | Canon 24-105 f4L | Canon 70-300L | Canon 50 1.8 | 430EX | SB-25 | SB-28

Gear / Feedback

LOG IN TO REPLY
Naito
THREAD ­ STARTER
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

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 =)

Post #10, Jun 14, 2013 12:56:41


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY
powerslave
Goldmember
Joined Feb 2008
1,637 posts
[MORE/SHARE]

You got any code on github?

I might be interested. Also, have you considered Beaglebone Black? http://beagleboard.org​/Products/BeagleBone%2​0Blackexternal link

Post #11, Jun 14, 2013 14:10:29


flickr photostreamexternal link
DP2 Merrill | 6D | TS-E24LII | EF24-105L | Fuji X-M1 | XC 16-50

LOG IN TO REPLY
sponsored links
(this ad will go away when you log in as registered member)
Naito
THREAD ­ STARTER
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

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.

Post #12, Jun 14, 2013 14:13:26


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY
powerslave
Goldmember
Joined Feb 2008
1,637 posts
[MORE/SHARE]

Cool. I'm keeping an eye out.

Post #13, Jun 14, 2013 14:17:36


flickr photostreamexternal link
DP2 Merrill | 6D | TS-E24LII | EF24-105L | Fuji X-M1 | XC 16-50

LOG IN TO REPLY
dpyro
Member
Joined May 2013
69 posts
[MORE/SHARE]

• 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.

Post #14, Jun 22, 2013 14:41:08


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

LOG IN TO REPLY
Naito
THREAD ­ STARTER
Senior Member
Joined Oct 2008
170 posts
Toronto
[MORE/SHARE]

dpyro wrote in post #16055069external link
• 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.

Post #15, Jun 22, 2013 23:16:03


Carl
EOS 40D | 6D

16-35 f/2.8L II | 40mm f/2.8 STM | 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

LOG IN TO REPLY


LIST NEARBY THREADS
3,420 views & 0 likes for this thread
6D Wifi DLNA Analysis
FORUMS General Gear Talk Computers



NOT A MEMBER YET? CLICK HERE TO REGISTER TO FORUMS

CHANGE BODY TEXT SIZE FOR ALL THREAD PAGES
POWERED BY AMASS 1.0version 1.0
made in Finland
by Pekka Saarinen
for photography-on-the.net


SEND FEEDBACK TO STAFF  |  JUMP TO FORUM...  |  FORUM RULES


Spent 0.00082 for 4 database queries.
PAGE COMPLETED IN 0.02s
810 guests, 650 members online
Simultaneous users record so far is 3341, that happened on Dec 11, 2014
Latest registered member is Blueme

COOKIES DISCLAIMER: By using this site you agree that some cookies will be stored on your browser. For unlogged users we store one session id cookie. For registered members we store (in addition to login session cookie) only cookies that are essential for required functionality, we do not store any personal tracking data in cookies or other browser's data storage methods.