Skip to main content

BLE Setup

Before sending and receiving data, it is first necessary to configure the BLE connection for communication.

Below is an overview of setting up communication. See the relevant section below for more information:

  1. Ensure the camera is connectable and in pairing mode
  2. Scan to discover advertisements from GoPro peripheral devices (which can be narrowed by limiting to peripherals that advertise service 0xFEA6)
  3. Connect to a discovered peripheral device
  4. Finish pairing with the peripheral device
  5. Discover all advertised services and characteristics
  6. Subscribe to notifications from all characteristics that have the notify flag set
  7. Perform GoPro-specific-setup

Pairing Mode​

In order for the camera to be discoverable and allow connections, it must first be put into pairing mode via the camera UI.

Advertisements​

Once in pairing mode, the camera will send BLE advertisements while it is ON and for the first 8 hours after the camera is put to sleep. During this time, the camera is discoverable and can be connected to. If the camera is in sleep mode, connecting to it will cause the camera to wake and boot up.

The following sections detail the Advertising and Scan Response data. This data consists of BLE Spec defined Type-Length-Value fields such as Manufacturer Specific Data and Service Data. These fields are identified via the "AD Type" column where the integer value is specified in Section 2.3 of the Bluetooth Assigned Numbers.

The data is parsed differently depending on the schema version of the advertisement which is specified in the Manufacturer Data field as shown below.

Advertising Data​

AD TypeByte(s)DescriptionBit DocumentationNotes
Flags (1)0Flags LengthAlways 2
1Flags AD TypeAlways 1
2FlagsSee section 1.3 of the BLE Spec Core Supplement
Incomplete 16-bit Service UUIDs (2)3UUIDs lengthAlways 3
4UUIDs AD typeAlways 2
5-6UUIDsLittle Endian. Always 0xFEA6. This can be used to filter for GoPros
Manufacturer Data (16)7Manufacturer Data LengthAlways 15
8Manufacturer Data AD TypeAlways 0xFF
9-10Company IDAlways 0xF202
11Schema VersionAlways 2
12Camera Status
  • Bit 0: Processor State (0 == low power, 1 == awake)
  • Bit 1: WiFi AP State (0 == off, 1 == on)
  • Bit 2: Peripheral Pairing State (0 == not pairing, 1 == pairing)
  • Bit 3: Is Central Role Enabled?
  • Bit 4: Is New Media Available?
  • Bits 5-7: Reserved
13Model IDSee Supported Cameras
14Camera Capabilities
  • Bit 0: Command and Control - Supports Command, Settings, and Query characteristics
  • Bit 1: BLE Metadata - LE Sensor Data GATT Characteristics
  • Bit 2: Wideband Audio
  • Bit 3: Concurrent Master Slave
  • Bit 4: Onboarding - Supports Onboarding 2.0
  • Bit 5: New Media Available - Supports status bit for New Media Available
  • Bits 6-7: Reserved
15-21Reserved
22Media Offload Status
  • Bit 0: Available
  • Bit 1: New Media Available
  • Bit 2: Battery OK
  • Bit 3: SD Card OK
  • Bit 4: Busy
  • Bit 5: Paused
  • Bits 6-7: Reserved

Scan Response Data​

AD TypeByte(s)DescriptionNotes
Local Name (9)0Local Name LengthAlways 11
1Local Name AD TypeAlways 9
2-11Local NameASCII Camera Name, i.e. "GoPro 1234"
Service Data (22)12Service Data LengthAlways 11
13Service Data AD TypeAlways 22
14-15Service Data UUIDAlways 0xFEA6
16-19AP MAC Address
20-23Partial Serial NumberLast 4 digits of the serial number as ASCII

Finish Pairing​

In order to communicate with a GoPro camera via BLE, a client must first be paired with the camera. The pairing procedure must be done once for each new client. If the camera is factory reset, all clients will need to pair again. The camera will store pairing information so subsequent connections with this client do not require pairing.

Configure GATT Characteristics​

In order to enable two-way communication with a GoPro camera, clients must subscribe to characteristics that have the notify flag set. Best practice is to query the GATT table to dynamically discover all notifiable characteristics. Alternatively, see the GATT table below.

warning

The GoPro device does not support the BLE feature of caching these subscriptions so the characteristics must be re-subscribed for upon each connection.

BLE Characteristics​

note

GP-XXXX is shorthand for GoPro's 128-bit UUID: b5f9XXXX-aa8d-11e3-9046-0002a5d5c51b

Service UUIDServiceCharacteristic UUIDDescriptionPermissions
GP-0001GoPro Wifi Access PointGP-0002WiFi AP SSIDRead
GP-0003WiFi AP PasswordRead
GP-0004WiFi AP PowerWrite
GP-0005WiFi AP StateRead / Indicate
GP-0090GoPro Camera ManagementGP-0091Network Management CommandWrite
GP-0092Network Management ResponseNotify
FEA6Control & QueryGP-0072CommandWrite
GP-0073Command ResponseNotify
GP-0074SettingsWrite
GP-0075Settings ResponseNotify
GP-0076QueryWrite
GP-0077Query ResponseNotify

Send Messages​

Messages are sent to the camera by writing to a write-enabled UUID and then waiting for a notification from the corresponding response / notification UUID. Responses and notifications indicate whether the message was valid and will be (asynchronously) processed. For example, to send a camera control command, a client should write to GP-0072 and then wait for a response notification from GP-0073.

See the following Protocol sections for steps to build and parse messages.

GoPro Setup​

This section details the GoPro-specific steps that are needed to configure / prepare the camera for communication.

Wait for Camera BLE Readiness​

It takes some time for the camera's BLE communication to become ready after establishing connection. In order to verify readiness, the client shall continuously poll Get Hardware Info until it returns a success status.