Skip to content

Troubleshooting

This page covers common issues and their solutions when using GoPro SDK.

Connection Issues

Camera Not Found During BLE Scan

Symptoms:

  • scan_for_cameras() returns empty list
  • Camera not discoverable

Solutions:

  1. Enable Pairing Mode on Camera
  2. Go to camera menu: Preferences → Connections → Connect Device
  3. Camera will enter pairing mode and become discoverable
  4. The pairing mode typically times out after ~3 minutes

  5. Check Bluetooth Status

  6. Ensure Bluetooth is enabled on your computer
  7. Make sure no other device is currently connected to the camera via BLE

  8. Restart Camera

  9. Power off the camera completely
  10. Wait a few seconds, then power on
  11. Try scanning again

COHN Connection Timeout / HTTP Connection Failed

Symptoms:

  • BleConnectionError: Failed to get COHN credentials
  • HTTP requests timeout
  • Camera was working before but now fails to connect

Common Cause:

This typically happens when camera was previously connected to a different WiFi network or PC. The camera caches old COHN credentials which conflict with the new environment.

Solutions:

  1. Clear COHN Cache on Camera

Navigate to camera menu:

  • Preferences → Connections → Clear COHN Cache (or similar, varies by model)

Then retry connection.

  1. Reset Camera Network Settings

Different GoPro models have different reset procedures:

Model Reset Path
HERO13 Preferences → Connections → Reset Connections
HERO12 Preferences → Connections → Reset Connections
HERO11 Preferences → Connections → Reset Connections
HERO10 Preferences → Reset → Reset Connections

After reset, you'll need to reconfigure WiFi connection.

  1. Delete Local Credentials

Delete the local credentials file and let the SDK fetch fresh credentials:

import os

# Delete the credentials file
if os.path.exists("cohn_credentials.json"):
    os.remove("cohn_credentials.json")

# Reconnect - SDK will fetch new credentials
async with GoProClient("1332", offline_mode=False,
                       wifi_ssid="MyWiFi", wifi_password="pass") as client:
    pass
  1. Use reset_cohn() Method

If you can establish BLE connection but COHN fails:

async with GoProClient("1332") as client:
    # Reset COHN certificate
    await client.reset_cohn()
    # Then switch to online mode
    await client.switch_to_online_mode(wifi_ssid="MyWiFi", wifi_password="pass")

WiFi Connection Failed

Symptoms:

  • BleConnectionError: WiFi connection timeout
  • Camera not connecting to specified WiFi

Solutions:

  1. Verify WiFi Credentials
  2. Double-check SSID spelling (case-sensitive)
  3. Verify password is correct

  4. Check WiFi Compatibility

  5. GoPro cameras support 2.4GHz and 5GHz WiFi
  6. Some older models may have issues with certain WiFi security protocols
  7. Try a simpler WiFi network if available

  8. Ensure Camera is in Range

  9. Move camera closer to WiFi router
  10. Avoid interference from other devices

  11. Check Router Settings

  12. Ensure DHCP is enabled
  13. Check if MAC filtering is blocking the camera
  14. Some enterprise networks may block GoPro devices

Camera Disconnects During Operation

Symptoms:

  • Random disconnections during recording or preview
  • BleConnectionError after some time

Solutions:

  1. Keep-Alive Signal

Send periodic keep-alive signals to prevent timeout:

import asyncio

async def keep_alive_loop(client):
    while True:
        await asyncio.sleep(30)  # Every 30 seconds
        try:
            await client.set_keep_alive()
        except Exception:
            pass
  1. Check Battery Level
  2. Low battery can cause unstable connections
  3. Use external power if available

  4. Reduce WiFi Interference

  5. Move away from other 2.4GHz/5GHz devices
  6. Avoid crowded WiFi channels

Preview Issues

Preview Stream Not Working

Symptoms:

  • start_preview() succeeds but no video in player
  • UDP stream not receiving data

Solutions:

  1. Check Firewall Settings
  2. Ensure UDP port 8554 (default) is not blocked
  3. Add exception for your application in firewall

  4. Verify Camera Mode

  5. Camera must not be in Webcam mode
  6. Stop any ongoing recording first

  7. Use Correct Stream URL

stream_url = await client.start_preview(port=8554)
print(f"Open in VLC: {stream_url}")
# Output: udp://127.0.0.1:8554
  1. Test with VLC
  2. Open VLC → Media → Open Network Stream
  3. Enter: udp://@:8554
  4. This can help diagnose if issue is with SDK or playback

Media Download Issues

Download Fails or Incomplete

Symptoms:

  • download_file() raises exception
  • Downloaded files are corrupted

Solutions:

  1. Enable Turbo Mode for Large Files
await client.set_turbo_mode(True)
downloaded = await client.download_file(media, save_path)
await client.set_turbo_mode(False)
  1. Check Available Disk Space
  2. Ensure sufficient space for the file
  3. GoPro video files can be very large (several GB)

  4. Use Stable Network

  5. Avoid downloading over weak WiFi
  6. Consider wired connection if available

Webcam Mode Issues

Webcam Not Starting

Symptoms:

  • start_webcam() fails
  • Webcam mode not responding

Solutions:

  1. Ensure Online Mode
  2. Webcam features require online mode (BLE + WiFi)
  3. Make sure COHN connection is established

  4. Check Camera State

  5. Camera must not be recording
  6. Exit any other modes first using webcam_exit()

  7. Exit Other Camera Apps

  8. Close any application that might be using the camera stream
  9. Only one application can use webcam at a time

General Tips

Enable Debug Logging

For detailed diagnostics, enable debug logging:

import logging

logging.basicConfig(level=logging.DEBUG)

# Or for specific modules
logging.getLogger("gopro_sdk").setLevel(logging.DEBUG)

Check Camera Firmware

Ensure camera firmware is up to date:

  • Use GoPro Quik app to update firmware
  • Some SDK features require minimum firmware versions

Use Offline Mode When Possible

If you don't need preview/download features, use offline mode for more reliable operation:

# More stable - BLE only
async with GoProClient("1332") as client:
    await client.start_recording()

Getting Help

If you're still experiencing issues:

  1. Check the GitHub Issues for similar problems
  2. Open a new issue with:
  3. GoPro model and firmware version
  4. Python version and OS
  5. Debug logs
  6. Minimal code to reproduce the issue