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

GoPro Hero9 control via USB issue #175

Open
cristianilea-lateral opened this issue May 6, 2021 · 6 comments
Open

GoPro Hero9 control via USB issue #175

cristianilea-lateral opened this issue May 6, 2021 · 6 comments

Comments

@cristianilea-lateral
Copy link

I'm trying to control the webcam via USB (I got it to work via Wifi).
I tried a lot of things and I can't seem to get it to work via USB.
I should note that I've downgraded my firmware to v1.22.

Here is the ip of my Hero9:
Screenshot 2021-05-06 at 21 02 13

I'm also aware of these tickets, and they did help to some extent (because I was doing some things wrong): #168 and #151.

Here is my code:

from goprocam import GoProCamera
from goprocam import constants

gopro = GoProCamera.GoPro(ip_address="172.27.180.54")
gopro.take_photo()

Here is my output of my code:

Waking up...
Waking up...
Waking up...
/bin/sh: vlc: command not found
Waking up...
Error, camera not defined.

Then I get an exception at the line gopro.take_photo():

Exception has occurred: TypeError
argument of type 'NoneType' is not iterable

What should I try next?

@KonradIT
Copy link
Owner

KonradIT commented May 6, 2021

Hi, what version of gopro-py-api are you using?

@cristianilea-lateral
Copy link
Author

4.1.0 installed with pip

@cristianilea-lateral
Copy link
Author

Python is not my main programming language, so bear with me :D.

I went step by step with the pycharm debugger and it seems that it gets stuck somewhere in whichCam. This line throws an exception and then it goes downhill:
response_raw = self._request("gp/gpControl")

It builds the following uri 'http://172.27.180.54/gp/gpControl'. If I try to make the request manually I get an exception like
urllib.error.URLError: <urlopen error [Errno 61] Connection refused>

@KonradIT
Copy link
Owner

KonradIT commented May 6, 2021

Then it's not the correct IP... Have you tried with 172.27.180.51?

It's very important you look at the examples, look how I did it, you pass an interface name to getWebcamIP as well as setting webcam_device to the interface name. Then it should work.

@cristianilea-lateral
Copy link
Author

With 172.27.180.51 it works... but why?

@KonradIT
Copy link
Owner

KonradIT commented May 6, 2021

Because the GoPro listens on the 51 octet of the IP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants