KonradIT / gopro-py-api

Unofficial GoPro API Library for Python - connect to GoPro via WiFi.
MIT License
1.38k stars 211 forks source link

How the GoProCamera.GoPro() get the model_name, ap_ssid, ap_mac, etc? #179

Open zqyq opened 2 years ago

zqyq commented 2 years ago

We want to connect with 2 gopros with 2 wifi adapters separately. But we find that in the init() of GoProCamera.py:

gopro = GoProCamera.GoPro()

def init():

self.ip_addr = ip_address

self._camera = ""

Once the line self._camera = "" is executed, the information of the GoPro as mentioned, will suddenly be obtained.

It sounds like there is another process running and once self._camera is given, the default camera will be detected.

Can anyone explain this? Since we want to communicate with the two gopros via different wifi adapters, we need to properly detect the two cameras first.

KonradIT commented 2 years ago

This is done via the /gp/gpControl/info endpoint.

Since we want to communicate with the two gopros via different wifi adapters

You need to tweak your wpa_supplicant file and network/interfaces file.