Thursday, 20 April 2017

Wirelessly Control your GoPro Hero5 Black/Session from your PC


THIS BLOG HAS MOVE TO THE GRAFT ROBOTICS BLOG PAGE, AS PART OF THE NEWLY FORMED GRAFT ROBOTICS COMPANY. Using your laptop or desktop computer to wirelessly take a picture or video with your GoPro Hero5 can be useful when you don't already have the GoPro App on your phone, can't find your phone, or want to develop some GoPro controlling application. You could even set up a camera trap in your home for some funny moments! Using your laptop's web browser (Firefox, Chrome, etc.), you can send commands over wifi to your GoPro to do anything that the app can. These commands are specified by the GoPro API (application programming interface). If you are interested in a low cost solution for controlling a GoPro while attached to a drone, RC car, camera trap, or for a custom home project using a Raspberry Pi, check out our FREE GoPie software.

I will only show you how to connect, take a picture, video, and multishot. It is possible, although unlikely, that the commands differ between firmware versions (I was using version 01.05 while testing these commands) so make sure to check your GoPro firmware version.  You can also refer to the Unofficial GoPro API for a detailed description of possible commands. I plan to create a blog on how to determine the commands yourself using tcpdump, Android Debugger, and Wireshark.

Establishing a Connection

First you set up your GoPro for wifi connectivity:

  • Turn on your GoPro by holding down the mode button.
  • Slide your finger from top to bottom and then select the "Connectivity" option.
  • Scroll down and select the "Connect New" option.
  • Select "Capture App"; your GoPro ID and password will then appear.

Then you connect to the GoPro with your PC:

  • Open up the available wifi networks with your PC and then select the one that has your GoPro ID as its name.
  • Once connected, open up your favorite browser.
  • Copy and paste the following into the url text box and then press enter (this is sending the first command to initiate the connection): http://10.5.5.9/bacpac/cv
  • Then send (in the same way) the following command to present the name of your PC/connection (replace <name> with the name you would like to use): http://10.5.5.9/gp/gpControl/command/wireless/pair/complete?success=1&deviceName=<name>
  • After a successful connection, your GoPro will then display the name you provide and a "Connected" status.
  • You may need to perform this step again after rebooting the gopro, if the next commands do not work.
  • You will notice a new symbol in the top left of the GoPro screen representing enabled wifi.

Taking a Picture, Video, or Multishot

After establishing a connection you can then send any other API commands.

To take a picture:

  • Use your browser, as before, to first change the mode to photo with the url http://10.5.5.9/gp/gpControl/command/mode?p=1
  • Then take the photo with the trigger command with the url http://10.5.5.9/gp/gpControl/command/shutter?p=1

To take a video:

  • Use your browser, as before, to first change the mode to video with the url http://10.5.5.9/gp/gpControl/command/mode?p=0
  • Then start the video with the trigger command with the url http://10.5.5.9/gp/gpControl/command/shutter?p=1
  • Then stop it with http://10.5.5.9/gp/gpControl/command/shutter?p=0

To take a multishot:

  • Change the mode to multishot with the url http://10.5.5.9/gp/gpControl/command/mode?p=2
  • Then trigger with http://10.5.5.9/gp/gpControl/command/shutter?p=1

Labels: , ,