r1pper / GoPro.Hero

a lightweight c# library to access and control GoPro HERO Action cameras
MIT License
59 stars 21 forks source link

Hero3+ support #5

Open w4smt opened 10 years ago

w4smt commented 10 years ago

Hi r1pper,

I'm developing a GoPro control app for Mac and your code has been extremely helpful. I really appreciate it.

I would like to add Hero3+ support, but I only have a Hero3 Black. Do you know how the Hero3+ cameras identify themselves in the /camera/cv response. Specifically the 'Model' byte? I'm assuming:

Hero3+White = 5 Hero3+Silver = 6 Hero3+Black = 7

Do you know if this is correct?

Thanks,

David

r1pper commented 10 years ago

Hi David

thanks, I'm glad you found it useful

Unfortunately I'm in the same situation (having only a Hero 3 Black), I found most of commands and parameters using Wire Shark, User manuals or searching the forums and a little bit of reversing the codes, However I couldn't find anything specific about Hero3+ (like the model you mentioned)

I think the best approach is to write a collector app, to gather general information and capabilities about the camera.

If you know someone who has a Hero3+ and willing to participate, please let me know to start writing the collector app.

btw I did major update to the library, Now it supports camera content browsing.

Best Regards

Hessam

w4smt commented 10 years ago

Hi Hessam,

Thanks for the response. I've been working on a cross-platform GoPro control app in Xojo. Pretty much a clone of the GoPro iPad app but runs on Windows, Mac and Linux. I'm working on media browsing. I'm shelling out to curl and exiftool to quickly get the thumbnail image from the JPG's. I'm using VLC libraries to play the LRV's and the preview stream. It's working pretty well. Still a lot of work to do. I really need to find a Hero3+ and see the responses to camera/cv /se.

I'll take a look at the library update. Your work has saved me many hours of hard work. Much appreciated!

David 


From: r1pper notifications@github.com To: r1pper/GoPro.Hero GoPro.Hero@noreply.github.com Cc: w4smt dflem@yahoo.com Sent: Thursday, November 21, 2013 3:00 PM Subject: Re: [GoPro.Hero] Hero3+ support (#5)

Hi David thanks, I'm glad you found it useful Unfortunately I'm in the same situation (having only a Hero 3 Black), I found most of commands and parameters using Wire Shark, User manuals or searching the forums and a little bit of reversing the codes, However I couldn't find anything specific about Hero3+ (like the model you mentioned) I think the best approach is to write a collector app, to gather general information and capabilities about the camera. If you know someone who has a Hero3+ and willing to participate, please let me know to start writing the collector app. btw I did major update to the library, Now it supports camera content browsing. Best Regards Hessam — Reply to this email directly or view it on GitHub.

sprhawk commented 10 years ago

@r1pper Hi, I just got one Hero 3+ black edition, I can give you some help

KonradIT commented 10 years ago

Hello! I am developing a HTML5 app to control GoPro cameras, I have only a HERO3 Black and HERO2 (anyone needs a HERO2??) I really need the HERO3+Black commands and other like HERO3 White, HERO3 Silver and HERO3+Silver. I have my app (for smartphones and computers here) https://github.com/KonradIT/HeroProApp PC url: http://pc.heropro.chernowii.com Mobile URL: http://m.heropro.chernowii.com

KonradIT commented 10 years ago

PD: if you want ALL the HERO3 Black commands and HERO2 Commands: https://github.com/KonradIT/HeroProApp/blob/gh-pages/commands.md

KonradIT commented 10 years ago

@sprhawk Hello, could you post here the following commands: Auto Low Light ON/OFF, Video Resolutions: with or without uperView (1080S, 720S)]. Please, post it here, it will be really helpful :+1: :)

r1pper commented 10 years ago

@sprhawk Hi, thanks for helping, it would be great, if you could gather a wireshark log file from the camera, specially for the commands @KonradIT mentioned.

many thanks

Hessam

KonradIT commented 10 years ago

@r1pper , Do you need wifi commands of the HERO2? :) https://github.com/KonradIT/HeroProApp/blob/gh-pages/commands.md

r1pper commented 10 years ago

@KonradIT Sure thanks, I'll update the code based on your provided data, Can you help me verify the implementation for HERO2 when it's done?

KonradIT commented 10 years ago

What do you mean? The video resolutions and photo resolutions are there. By the way, how do you use the video resolutions in HERO3Black? All resolutions have at least two outcomes.

r1pper commented 10 years ago

@KonradIT there are small differences in parameters you listed with what I use, for example to set video resolution I use "camera/vv" while you listed "camera/vr" , I saw both, but Gopro app send "camera/vv" to my Hero3 Black, or for OSD I use "camera/DS" while you listed "OD" for it, I believe different firmwares should cause these differences

as for different resolutions, I wrote a filter which specifies valid resolutions based on Protune, white Balance ,...

best regards Hessam

r1pper commented 10 years ago

Hero3+ Camera Models are

Hero3+ Black Edition=11; Hero3+ Silver Edition= 10;

KonradIT commented 10 years ago

@r1pper , in the SE file?

r1pper commented 10 years ago

New Camera models are ("/bacpac/se"):

Hero3+ Black Edition (Bawa)=11;
Hero3+ Silver Edition (Uluwatu)= 10;

Auto Low Light command should be:

"camera/LW"

New Video Resolutions should be:

720 S = 9
1080 S =10

Hero3+ preview mode is new (don't know if it supports older methods) new Gopro app supports OTA firmwares

now we need a quick test and a Hero3+ to verify these commands :)

KonradIT commented 10 years ago

@r1pper camera/LW or AL&p=Wifipass?t=%00 OFF 01 ON???

so, in the HERO3 Black you use VV? I will test it tomorrow

sprhawk commented 10 years ago

@r1pper @KonradIT Yesterday I tried to use wireshark to sniff communication between iphone and go pro, but I'm not familiar with wireshark. I have got some 802.11 logs but not TCP/IP log or HTTP log. Could you tell me how to setup wireshark to sniff ? I need a guide.

I'm using wireshark on MacOSX under X11, the monitoring mode of the wifi card can be enabled.

KonradIT commented 10 years ago

@sprhawk , strange, did you choose wifi before capturing? Anyway, here is a guide: http://www.wireshark.org/download/docs/user-guide-a4.pdf

r1pper commented 10 years ago

@sprhawk , Hi, maybe you should decrypt your Wifi packets

http://wiki.wireshark.org/HowToDecrypt802.11

maybe the easier way would be to install http://www.bluestacks.com/ on your machine and then install the Gopro app on it here is the latest GoPro App I uploaded on my drive https://docs.google.com/file/d/0BwXXVib73b6Da0NIVXRKU0hTSVE/edit

You can connect to your camera with your laptop and run wireshark on your WIFI interface normally, it should do the trick

I develop in windows and winpcap does not support monitoring so I used this method to analyze camera protocol

Best regards Hessam

KonradIT commented 10 years ago

@r1pper thank you! Now my app has a lot of more resolutions. I also included protune res HERO3 Black, just check the command list.

sprhawk commented 10 years ago

@r1pper bluestacks is a good idea. I'm trying ...

sprhawk commented 10 years ago

@r1pper I tried to install go pro app onto Bluestacks with:

./uHD-Adb install -s "emulator-5554"

but it complains with Failure [INSTALL_FAILED_CONTAINER_ERROR]

I'm trying to root it ....

Do you have any quick instructions ?

KonradIT commented 10 years ago

On bluestacks, click the magnifier lens and search for gopro app, I didn't use a cmd line. Anyway, I used a iPhone and wireshark to sniff communication.

sprhawk commented 10 years ago

I didn't find the go pro app in the bluestack App Store,so I have to try it on the command line . I'll look through wireshark's manual. Or I'll appreciate if you can give me a guide about how to sniff between iphone and go pro

Sent from my iPhone

On 2014Äê1ÔÂ9ÈÕ, at ÉÏÎç1:07, Konrad Iturbe notifications@github.com wrote:

On bluestacks, click the magnifier lens and search for gopro app, I didn't use a cmd line. Anyway, I used a iPhone and wireshark to sniff communication.

¡ª Reply to this email directly or view it on GitHub.

KonradIT commented 10 years ago

I used the default configuration. if you cannot sniff, then test the following URLs please and post the outputs: 1) http://10.5.5.9/camera/VV?t=Password&p=%00

2) http://10.5.5.9/camera/VV?t=Password&p=%01

3) http://10.5.5.9/camera/VV?t=Password&p=%02

4) http://10.5.5.9/camera/VV?t=Password&p=%03

5) http://10.5.5.9/camera/VV?t=Password&p=%04

6) http://10.5.5.9/camera/VV?t=Password&p=%05

7) http://10.5.5.9/camera/VV?t=Password&p=%06

8) http://10.5.5.9/camera/VV?t=Password&p=%07

9) http://10.5.5.9/camera/VV?t=Password&p=%08

10) http://10.5.5.9/camera/VV?t=Password&p=%09

11) http://10.5.5.9/camera/VV?t=Password&p=%10

12) http://10.5.5.9/camera/VV?t=Password&p=%11

13) http://10.5.5.9/camera/AU?t=Password&p=%00

14) http://10.5.5.9/camera/AU?t=Password&p=%01

15) http://10.5.5.9/camera/AU?t=Password&p=%02

Sorry if is a lot of work, but if you cannot capture the communication between camera and iPhone, this is an alternative. Jus post the results like 1) xxx 2) xxy 3)... We are looking for video resolutions and video resolutions with superview (1080S & 720S) and also Auto low light (is autolowlight a feature that can be on/off, or is with video resolutions?) Best regards Konrad

r1pper commented 10 years ago

@sprhawk , That's odd, on windows it works perfectly

I'm afraid, I'm not familiar with OSX

the Error happens when an application requests to install on specific storage and, device cannot provide enough space for installation process, However I checked the APK manifest and there is no such requirement for it, so seems to be BlueStacks OSX version problem

so maybe if you try to install it directly from the emulator (from the browser inside blue stack), you may have more luck.

btw, you can use any android emulator too (from android SDK)

sorry I couldn't be much help

Best regards Hessam

r1pper commented 10 years ago

@KonradIT ,your'e welcome, this is complete list of commands I dumped from APK

AUTO_POWER_OFF = "camera/AO";
BACPAC_BATTERY_LEVEL = "bacpac/blx";
BRACKETING_MODE = "camera/BR";
BROADCAST_SETTING = "camera/BX";
BURST_MODE = "camera/BU";
CAMERA_BATTERY_LEVEL = "camera/blx";
CAMERA_VERSION = "camera_version";
CONTINUOUS_SHOT = "camera/CS";
DEFAULT_AT_POWER_UP = "camera/DM";
DELETE_ALL = "camera/DA";
DELETE_LAST_FILE = "camera/DL";
EDIT_CAMERA_NAME = "camera/CN";
FIELD_OF_VIEW = "camera/FV";
FRAME_RATE = "camera/FS";
HLS_SEGMENT_SIZE = "camera/SS";
LCD_BRIGHTNESS = "camera/LN";
LCD_SLEEP_TIMER = "camera/LS";
LCD_VOLUME = "camera/LV";
LED = "camera/LB";
LOCATE_CAMERA_TOGGLE = "camera/LL";
LOOPING_VIDEO_MODE = "camera/LO";
LOW_LIGHT = "camera/LW";
NTSC_PAL = "camera/VM";
ONE_BUTTON_MODE = "camera/OB";
ON_SCREEN_DISPLAY_OSD = "camera/DS";
OTA_CANCELLED = "ota_cancelled";
OTA_FW_UPDATE_MODE = "camera/OM";
OTA_INITIATE_UPDATE = "camera/OF";
PHOTO_IN_VIDEO = "camera/PN";
PHOTO_RESOLUTION = "camera/PR";
PREVIEW = "camera/PV";
PROTUNE = "camera/PT";
SET_DATE_AND_TIME = "camera/TM";
SET_WIFI_MODE = "bacpac/WI";
SLIDESHOW_SETTING = "camera/PS";
SOUND = "camera/BS";
SPOT_METER = "camera/EX";
TIME_LAPSE = "camera/TI";
TIME_LAPSE_STYLE = "camera/TS";
UP_DOWN = "camera/UP";
VIDEO_RESOLUTION = "camera/VV";
VIDEO_RESOLUTION_AND_RATE = "camera/VR";
WHITE_BALANCE = "camera/WB";
WIFI_CONFIGURE = "bacpac/WP";
WIFI_RESET_MODULE = "bacpac/RS";

are you sure about AU command? seems to be LW to me!

Best regards Hessam

KonradIT commented 10 years ago

@r1pper thanks! VR is video and frame rate, VV is video only. LW is autolowlight so, OF will activate the FW update in the HERO3+Black? or OM will do that? We need @sprhawk for testing (LW, OF and OM)

KonradIT commented 10 years ago

Wait, BR, Bracketing? I will test it in my hero3 black when I am at home.

w4smt commented 10 years ago

Thanks much!

How about camera/DF (delete file) and camera/DG (delete group)? They are missing from the list.

r1pper commented 10 years ago

@w4smt , correct, they are part of the browser functionality not camera operations, I already implemented those commands, if you need more information, have a look at source tree "GoPro.Hero.Extensions / Browser / Media / GoProMediaBrowser.cs" , this is based on the official GoPro browser,

I also Implemented a compatible browser based on cherokee file system (Ambrella browser in source tree), "Ambrella Media Browser.cs" for cameras with older firmwares.

Best regards Hessam

sprhawk commented 10 years ago

@KonradIT I'm sorry, I'm still struggling in sniffing ...

KonradIT commented 10 years ago

@sprhawk

if you cannot sniff, then test the following URLs please and post the outputs, replace password by your cameras wifi password: 1) http://10.5.5.9/camera/VV?t=Password&p=%00

2) http://10.5.5.9/camera/VV?t=Password&p=%01

3) http://10.5.5.9/camera/VV?t=Password&p=%02

4) http://10.5.5.9/camera/VV?t=Password&p=%03

5) http://10.5.5.9/camera/VV?t=Password&p=%04

6) http://10.5.5.9/camera/VV?t=Password&p=%05

7) http://10.5.5.9/camera/VV?t=Password&p=%06

8) http://10.5.5.9/camera/VV?t=Password&p=%07

9) http://10.5.5.9/camera/VV?t=Password&p=%08

10) http://10.5.5.9/camera/VV?t=Password&p=%09

11) http://10.5.5.9/camera/VV?t=Password&p=%10

12) http://10.5.5.9/camera/VV?t=Password&p=%11

13) http://10.5.5.9/camera/LW?t=Password&p=%00

14) http://10.5.5.9/camera/LW?t=Password&p=%01

15) http://10.5.5.9/camera/LW?t=Password&p=%02

Sorry if is a lot of work, but if you cannot sniff, this is an alternative. Jus post the results like 1) xxx 2) xxy 3)... We are looking for video resolutions and video resolutions with superview (1080S & 720S) and also Auto low light (is autolowlight a feature that can be on/off, or is with video resolutions?) Best regards Konrad

sprhawk commented 10 years ago

@KonradIT Allright. I'll try it tonight

sprhawk commented 10 years ago

@r1pper @KonradIT Hello guys, I was busy until now. Good news: I have successfully made wireshark working.

What you may need:

4K: /camera/VV?t=password&p%06 4K 17:9 : /camera/VV?t=password&p%08 2K 17:9 : 4K: /camera/VV?t=password&p%07 2.7K: 4K: /camera/VV?t=password&p%05 1440: 4K: /camera/VV?t=password&p%04 1080 SuperView : /camera/VV?t=password&p%09 1080: /camera/VV?t=password&p%03 960: /camera/VV?t=password&p%02 720 superview: /camera/VV?t=password&p%0a 720 : /camera/VV?t=password&p%01

4K 17:9 12fps : /camera/FS?t=password&p%00 4K 15fps: /camera/FS?t=password&p%01 2.7K 24fps: /camera/FS?t=password&p%02 2.7K 30fps: /camera/FS?t=password&p%04 1440 48fps: /camera/FS?t=password&p%05

What other mode/command do you need I to test? Tell me then.

KonradIT commented 10 years ago

@sprhawk Thanks! I have a question: why there are some resolutions that have a : and 4k? I will update the app and I will put your name in the app :octocat: Another commands that will be useful are 2.7k MEDIUM and autolowlight. Find those and I will be in heaven.

sprhawk commented 10 years ago

@KonradIT

What do you mean : and 4K ? In the app for Hero 3+, there is two modes for 4K -- 4K and 4K 17:9

wide : /camera/FV?t=password&p%00 medium: /camera/FV?t=password&p%01 narrow: /camera/FV?t=password&p%02

I didn't find the auto lowlight settings in app settings menu. Where is it ?

KonradIT commented 10 years ago

@sprhawk for instance: 2K 17:9 : 4K: does 2.7k have W, M and N??

r1pper commented 10 years ago

@sprhawk thanks man, you rock. it would be great if you could test all settings and save the wireshark session as reference, no need to provide information about what you changed, the log would suffice

sprhawk commented 10 years ago

@KonradIT Auto Low Light On : LW?p=%01 , Off: LW?p=%00

@r1pper I have sniffed the capture file, leave me your email or something, I'll send you my dropbox sharing link.

r1pper commented 10 years ago

@sprhawk thanks

sprhawk commented 10 years ago

@r1pper OK, check your email box please

r1pper commented 10 years ago

@sprhawk thanks alot

KonradIT commented 10 years ago

@sprhawk , thanks. Can I also have the sniffing file? Best regards

KonradIT commented 10 years ago

@sprhawk my mail is: mail@chernowii.com

sprhawk commented 10 years ago

@KonradIT OK

KonradIT commented 10 years ago

@sprhawk thanks! Btw: my App (PC or mobile) is updated with the hero3+black commands you gave me. go to konradit/heroproapp to get the URL.

sprhawk commented 10 years ago

@KonradIT That's great !

KonradIT commented 10 years ago

@sprhawk It would be awesome if we could get the frame rates of 1080, 720, 960 and WVGA. As shown here: http://es.gopro.com/cameras/undefined/cameras/hd-hero3-black-edition#technical-specs for instance 1080 30, 24, 60, 48. and so on... And also the photo resolutions please :)

r1pper commented 10 years ago

@KonradIT have a look at http://cbcdn1.gp-static.com/uploads/product_manual/file/202/HERO3_Plus_Black_UM_ENG_REVA_WEB.pdf

pages 22-24, all possible combinations are listed

KonradIT commented 10 years ago

@sprhawk @r1pper Here is my wish list: 1448 30, 24 1080 60, 48, 30, 24 1080S 48, 30, 24 960 100, 60, 48 720 120, 60 720S 100, 60, 48 And Photo resolutions. @sprhawk sorry if its a lot of work, take your time :) Last: @r1pper said the live feed is different, please open this URL in VLC connected to the gopro: http://10.5.5.9:8080/live/amba.m3u8 But first, use r1pper's app or my app to turn on the preview. best regards Konrad