Jeff Bayly Blog & Projects

In some event photography events the camera is required more than 3m from a mac. 3m is the maximum allowed by USB, so I sometimes use USB extenders. In my last Les Promenades Gatineau job, I required 4 USB extenders. It worked, but it may have also damaged the circuitry of two cameras, so I needed another solution. Wifi adapters for the rebel series are not available or ridiculously expensive. The built-in wifi on the T6 is useless for tethering to a server/computer. The other obvious solution is using a eyefi card. I have had this solution in my back pocket for years and revisit it occasionally, but every time I find the uploads to be much too slow. My delivery system requires it to be on the server quickly so my Mac app can format everything and make it available for the iPad app (for customer presentation) as soon as possible.

I'll try to avoid a long winded explanation, to make a long story short:get latest raspbian, and install or turn on: gphoto2,samba,vlc,vnc,afp.

I originally wrote a perl script using gphoto2 to look and grab the new pictures every second until I saw that gphoto2 has a one line command to set the camera to automatically upload new pictures as they are taken! gphoto2 --capture-tethered

Or you can also do it without the hook and the setting of camera presets#!/bin/bashcd /home/pi/Pictures/Capturedgphoto2 --capture-tethered --filename IMG_%H%M%S-%01n.%C

There may be times when the script may request a override of the image because the camera has been turned on & off and a similar named file exists in your folder, so setting the image name based on the time is useful. A sequence number is also required if more than one image is taken within a second.

The capture tethered command will actually put the rebels in a mode where any picture taken will automatically upload it to the raspberry (on /home/pi/Pictures/Captured). My Mac app I previously wrote then takes it off the raspberry server wirelessly (and deletes it on the raspberry) and prepares it for my iPad selection app and the printer. I could mount the mac server and deposit the picture there however experience tells me it is better to deposit it locally and have my program grab it.

When the camera is turned off the script automatically closes.so you will need to restart the script or raspberry (if in autostart) every battery change. Remember there is a free Mac and Windows app from canon to tether and capture pictures but you can't strap a PC to the back of a camera!

My biggest issue was creating a desktop shell script which would open a terminal and run all the ghoto2 shell commands and then keep the terminal open. lxterminal is a bit weird about that.

Write this script for desktop/launch​LaunchMe.sh#!/bin/bashlxterminal -l -e 'echo PhotoCapture ; /home/pi/Pictures/PhotoCapture.sh 'It automatically closes the script when you turn off the camera. Remember that you need to turn on the camera before you start your script (or raspberry if you have the script autostart).

In the pictures below I added it to the start menu, in addition to the desktop.

So I now have a wifi canon rebel adapter using the raspberry. I took this picture remotely which was automatically sent from the canon T5 (also works on my T3 &T6i) to the raspberry then wirelessly to a Mac. Programming with two kids jumping on you is not easy! The tethered speed is so much faster the eyefi card and seems to be as quick as the mac canon camera utilities for hardwired USB setups.

Here is my first attempt at productizing it. I have it powered by a 10000mah power bank (ADATA) below. In my first test, it seemed to have powered the raspberry pi 3 for an incredible 30 hours. I have set up a ping of my router every minute and will test it again when the current test runs out. I will also test it will a 3.5 touch screen. In real usage it will probably be just plugged in and the battery pack removed. Edit-2nd test with the pinging lasted 28 hours. Also it takes about 12 hours to fully charge the battery.

The raspberry is strapped to the tripod with a adhesive cable clamps in this first iteration.

Command Summary

Start with raspbian image

Write to sd card with win32imager program (mac on available also but i used windows 10 on parallels)

Expand your file size. Reboot.

Set up localisation in configuration - keyboard, time zone etc.I found this to be very buggy affecting startup or wifi. It seems changes to the config file has some know bugs, so I just only change the keyboard and the time zone. Weird things were happening otherwise. Reboot​Connect to your wifi or ethernet.