Canon DSLR USB port and GPS - DSLR Hack development - CHDK Forum supplierdeeply

Canon DSLR USB port and GPS

  • 20 Replies
  • 20872 Views
Canon DSLR USB port and GPS
« on: 31 / May / 2011, 11:14:17 »
Advertisements
Hi everyone,

I've came across this forum after seeing Magic Lantern working on my Canon EOS 500D.
I've used it mostly for timelapse photography.
It actually replace in some cases a device I've made to control DSLR cameras:
http://timeclick.no.sapo.pt

Since I haven't seen any info on the forum about GPS usage to geotag photos, I'm wondering if it is possible to use the USB port of a canon DSLR connected to an external GPS device to geotag photos.
Probably with the help of Magic Lantern.

The external GPS device could be custom made based on for example the GlobalTop Gms-u1LP.

I appreciate if anyone have any comment about this idea.

Regards.

*

Offline reyalp

  • ******
  • 13353
Re: Canon DSLR USB port and GPS
« Reply #1 on: 31 / May / 2011, 18:07:55 »
Unless the camera is capable of acting as a USB host, this is not going to be possible with normal GPS devices. You cannot make device/device connections in USB. Direct Print looks like a device/device connection, but in that case the printer is actually acting as a host.(Googles "USB Accessory" mode exists for the same reason)

You could of course build a very small low power system that included a GPS and acted as a host.
Don't forget what the H stands for.

Re: Canon DSLR USB port and GPS
« Reply #2 on: 01 / June / 2011, 20:43:48 »
I've tried to find info about the usb connector of canon dslr cameras, but found nothing.

The question of host/device I know and if the camera act only as a device, the gps can be a host with the appropriate hardware.
The idea is to build a dedicated device for this task.

Beyond that, I don't know if every time a photo is taken, magic lantern can access this usb port to get the geographic coordinates and insert them in the exif information.

If you have any further info, please point me.

Regards.

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: Canon DSLR USB port and GPS
« Reply #3 on: 04 / June / 2011, 09:49:01 »
Magic Lantern has PTP extensions, so it can exchange almost any kind of data with an external device (but you have to code it). I didn't experiment anything exif-related, but there are GPS-related strings and properties in the firmware.


Re: Canon DSLR USB port and GPS
« Reply #4 on: 04 / June / 2011, 11:55:52 »
I'm afraid we can not connect a GPS logger directly to the camera since it requires the camera to be Host USB. If the hardware is supporting it, we have to activate this feature.
Then we have to support Serial over USB, the protocol generally offered by these devices.

GPS features are for the WFT devices: http://cpn.canon-europe.com/content/product/accessories/wft_e2_e3.do
and one of their feature is ... USB host. I suppose the WFT transmit GPS data to the camera to write them in EXIF tag GPS. http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html

Re: Canon DSLR USB port and GPS
« Reply #5 on: 04 / June / 2011, 18:43:06 »
I've found an very interesting web page about controlling dslr cameras (and others) trough USB using an arduino and some extra hardware.

http://www.circuitsathome.com/category/camera-control

If I can manage a way of magic lantern interact with this device, it will be easy to add a gps module and some code to make it work.

I'm going to try to investigate this hardware.

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: Canon DSLR USB port and GPS
« Reply #6 on: 05 / June / 2011, 02:27:00 »
It seems that Arduino device acts as a host USB, so if you can create custom PTP handlers with its libraries, it should do the job just fine. You can define custom PTP handlers from ML.

Useful links:
http://groups.google.com/group/ml-devel/browse_thread/thread/e7e237b1e1e7109d#
http://magiclantern.wikia.com/wiki/PTP
http://magiclantern.wikia.com/wiki/PTP-CHDK
http://magiclantern.wikia.com/wiki/Remote_control_with_PTP_and_Python
http://www.mweerden.net/chdk_ptp.html

Re: Canon DSLR USB port and GPS
« Reply #7 on: 05 / June / 2011, 05:59:33 »
Camadeira,

great work!

did you consider re-using libptp2 ?
http://libptp.sourceforge.net/

Alex also used it for his 'remote control with Python'

Indy


Re: Canon DSLR USB port and GPS
« Reply #8 on: 05 / June / 2011, 11:33:53 »
@a1ex: thanks for the links. I'm going to order the parts needed to start testing and them we'll talk! I'll have also to lern more about magic lantern because currently I don't know much more than the install steps!

@arm.indiana: I'm not sure if I will need it. In order to use it, those sources must be ported to arduino. First I'll need to get the hardware to play with, then I'll see which path to choose.

I'm glad there are more people interested in this idea.

Regards.

*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Canon DSLR USB port and GPS
« Reply #9 on: 19 / August / 2011, 20:17:12 »
Hi guys, I'm very interested in this project too... so far we do not have control over PTP stuff in 400plus, but this will change in future.
The thing I'm concerned is how would we (and this should count for ML too) put the GPS coordinates in the photo file ? Obviously writing to the file after it was saved to the storage is not an option, so we will have to put them prior saving the file. Any ideas on that ?
// AF

 

Related Topics