Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Hero12 resolution settings over USB yields HTTP 403. #584

Open
mmarich opened this issue Aug 18, 2024 · 6 comments
Open

Updating Hero12 resolution settings over USB yields HTTP 403. #584

mmarich opened this issue Aug 18, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@mmarich
Copy link

mmarich commented Aug 18, 2024

Component
HTTP API (USB)

Describe the bug
Attempting to set the video resolution (the same issue occurs when attempting to set the video frame rate) results in a HTTP 403 error. The same error occurs with or without the command to enable wired control.

To Reproduce
Connect to camera via USB, and execute the following CURL commands as per the OpenGoPro documentation:

user@device % curl -v --request GET --url 'http://172.25.110.51:8080/gopro/camera/control/wired_usb?p=1'
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 172.25.110.51:8080...
* Connected to 172.25.110.51 (172.25.110.51) port 8080
> GET /gopro/camera/control/wired_usb?p=1 HTTP/1.1
> Host: 172.25.110.51:8080
> User-Agent: curl/8.4.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3
< 
{}
* Connection #0 to host 172.25.110.51 left intact

user@device % curl -v --request GET --url 'http://172.25.110.51:8080/gopro/camera/setting?setting=2&option=9'
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 172.25.110.51:8080...
* Connected to 172.25.110.51 (172.25.110.51) port 8080
> GET /gopro/camera/setting?setting=2&option=9 HTTP/1.1
> Host: 172.25.110.51:8080
> User-Agent: curl/8.4.0
> Accept: */*
> 
< HTTP/1.1 403 Forbidden
< Content-Type: application/json
< Content-Length: 77
< 
{
    "error": 1,
    "option_id": 9,
    "setting_id": 2,
    "available_options": []
}
* Connection #0 to host 172.25.110.51 left intact

Expected behavior
The video resolution is updated. In this case, the requested resolution is for 1080p, although other resolutions supported by the Hero12 also fail.

Hardware

  • Camera: Hero12
  • Version: 2.20
@mmarich mmarich added the bug Something isn't working label Aug 18, 2024
@github-actions github-actions bot added the triage Needs to be reviewed and assigned label Aug 18, 2024
@tcamise-gpsw tcamise-gpsw removed the triage Needs to be reviewed and assigned label Aug 30, 2024
@tcamise-gpsw tcamise-gpsw self-assigned this Aug 30, 2024
@tcamise-gpsw
Copy link
Collaborator

Hello. My guess is that you are not in a mode that uses the Video Resolution. Can you ensure to enter Video mode by either swiping on the UI or loading the video preset group.

Using the Python SDK, I just tested every resolution listed in the spec and see expected behavior. Here are some snippets reproduced with curl:

First a valid resolution option...

curl 'http://172.27.102.51:8080//gopro/camera/setting?setting=2&option=100'
{}

Now an invalid resolution option...

> curl 'http://172.27.102.51:8080/gopro/camera/setting?setting=2&option=102'
{
        "error": 4,
        "option_id": 102,
        "setting_id": 2,
        "supported_options": [
                {"display_name": "5.3K", "id": 100},
                {"display_name": "5.3K", "id": 107},
                {"display_name": "4K", "id": 1},
                {"display_name": "4K 4:3", "id": 18},
                {"display_name": "4K", "id": 108},
                {"display_name": "2.7K", "id": 4},
                {"display_name": "2.7K", "id": 111},
                {"display_name": "1080", "id": 9},
                {"display_name": "4K", "id": 109},
                {"display_name": "1080", "id": 110}
        ]
}

@tcamise-gpsw tcamise-gpsw added the feedback requested Further information is requested label Aug 30, 2024
@mmarich
Copy link
Author

mmarich commented Sep 8, 2024

I can confirm that the camera is indeed in video mode, and I am loading the video preset group prior to attempting to alter video resolution and frame rate.

I do have an older SD card inserted, which causes the camera to display a warning about not supporting higher resolutions / frame rates. Could this be an issue? The camera boots into the 'standard' 4k quality setting, and I am attempting to lower it to 1080p.

@tcamise-gpsw tcamise-gpsw removed the feedback requested Further information is requested label Sep 9, 2024
@mmarich
Copy link
Author

mmarich commented Sep 10, 2024

I've installed an appropriate A2 SD card, and added the additional call to ensure that the video preset group is loaded, and still encounter the same issue:

user@device ~ % curl -v -XGET --url 'http://172.25.110.51:8080/gopro/camera/control/wired_usb?p=1'

  • Trying 172.25.110.51:8080...
  • Connected to 172.25.110.51 (172.25.110.51) port 8080

GET /gopro/camera/control/wired_usb?p=1 HTTP/1.1
Host: 172.25.110.51:8080
User-Agent: curl/8.4.0
Accept: /

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3
<
{}

GET /gopro/camera/presets/set_group?id=1000 HTTP/1.1
Host: 172.25.110.51:8080
User-Agent: curl/8.4.0
Accept: /

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3
<
{}

GET /gopro/camera/setting?setting=2&option=9 HTTP/1.1
Host: 172.25.110.51:8080
User-Agent: curl/8.4.0
Accept: /

< HTTP/1.1 403 Forbidden
< Content-Type: application/json
< Content-Length: 77
<
{
"error": 1,
"option_id": 9,
"setting_id": 2,
"available_options": []
}

  • Connection #0 to host 172.25.110.51 left intact

I have a second Hero 12 here that I will rerun the same test sequence with and report back.

@mmarich
Copy link
Author

mmarich commented Sep 10, 2024

I can confirm that the second camera exhibits the exact same behaviour:

user@device ~ % curl -v -XGET --url 'http://172.29.146.51:8080/gopro/camera/control/wired_usb?p=1'

  • Trying 172.29.146.51:8080...
  • Connected to 172.29.146.51 (172.29.146.51) port 8080

GET /gopro/camera/control/wired_usb?p=1 HTTP/1.1
Host: 172.29.146.51:8080
User-Agent: curl/8.4.0
Accept: /

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3
<
{}

GET /gopro/camera/presets/set_group?id=1000 HTTP/1.1
Host: 172.29.146.51:8080
User-Agent: curl/8.4.0
Accept: /

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3
<
{}

GET /gopro/camera/setting?setting=2&option=9 HTTP/1.1
Host: 172.29.146.51:8080
User-Agent: curl/8.4.0
Accept: /

< HTTP/1.1 403 Forbidden
< Content-Type: application/json
< Content-Length: 77
<
{
"error": 1,
"option_id": 9,
"setting_id": 2,
"available_options": []
}

  • Connection #0 to host 172.29.146.51 left intact

@pb3975
Copy link

pb3975 commented Sep 16, 2024

Getting the same 403 Forbidden results here with Hero 12 black when trying to set either FPS or Resolution options. @mmarich did you identify a solution?

@pb3975
Copy link

pb3975 commented Sep 16, 2024

Update. I was able to solve this issue by changing controls from "Easy" to "Pro".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants