Camera on the Home Network

Some cameras support Camera On the Home Network (COHN). This capability allows the client to perform command and control with the camera indirectly through an access point such as a router at home. For security purposes, all communications are performed over HTTPS.

Certificates

Secure communication with the camera over HTTPS requires two things: a trusted SSL/TLS certificate and Basic auth username/password used in the HTTPS header.

A provisioned camera has two certificates:

  • A Root CA cert provided to the client, which has a 1 year lifespan

  • A Camera cert, which contains the camera’s current IP address on the local network and is signed by the Root CA cert

This use of a certificate chain allows the camera’s IP address to change (e.g. when DHCP lease expires or when access point is reset/replaced) without the client needing to download and install/trust a new certificate.

Verifying Certificate

The camera acts as the Root Certificate Authority in creating the COHN certificate (Root CA cert). Clients can verify that the certificate is valid using utilities such as openssl:

$ openssl verify -CAfile '/path/to/GoProRootCA.crt' '/path/to/GoProRootCA.crt'
GoProRootCA.crt: OK

View Certificate Details

Most operating systems have utilities to view details about a SSL/TLS certificate:

  • MacOS: Right-mouse-click >> Quick Look

  • Windows: Right-mouse-click >> Properties

  • Ubuntu: Right-mouse-click >> Open with View File

  • OpenSSL : openssl x509 -in /path/to/GoProRootCA.crt -noout -text

Provisioning Procedure

In order to use the COHN capability, the camera must first be provisioned for COHN. At a high level, the provisioning process is as follows:

  1. Instruct the GoPro to Create COHN Certificate

  2. Use Get COHN Certificate to get the created COHN certificate

  3. Use Get COHN Status to get the Basic auth credentials

  4. Connect the camera to an access point

Tip

Depending on the use case, some of these steps can be performed via HTTP

../_images/plantuml_ble_cohn_provision.png

Once the camera is provisioned, the client can communicate with the camera via HTTPS. The camera supports nearly all functionality over HTTPS that it does over HTTP. For more details about HTTP/HTTPS, see the Open GoPro HTTP specification.

Operations

Clear COHN Certificate
https://img.shields.io/badge/HERO13 Black-ffe119 https://img.shields.io/badge/HERO12 Black-f58231
Type:

Protobuf

Request

Clear the COHN certificate.

Returns a ResponseGeneric with the status of the clear

UUID:

Command

Feature ID:
0xF1
Action ID:
0x66
Message:

RequestClearCOHNCert (docs) (source)

Response

Generic Response used across many response / notification messages

UUID:

Command Response

Feature ID:
0xF1
Action ID:
0xE6
Message:

ResponseGeneric (docs) (source)

Create COHN Certificate
https://img.shields.io/badge/HERO13 Black-ffe119 https://img.shields.io/badge/HERO12 Black-f58231
Type:

Protobuf

Request

Create the Camera On the Home Network SSL/TLS certificate.

Returns a ResponseGeneric with the status of the creation

UUID:

Command

Feature ID:
0xF1
Action ID:
0x67
Message:

RequestCreateCOHNCert (docs) (source)

Response

Generic Response used across many response / notification messages

UUID:

Command Response

Feature ID:
0xF1
Action ID:
0xE7
Message:

ResponseGeneric (docs) (source)

Get COHN Certificate
https://img.shields.io/badge/HERO13 Black-ffe119 https://img.shields.io/badge/HERO12 Black-f58231
Type:

Protobuf

Request

Get the COHN certificate.

Returns a ResponseCOHNCert

UUID:

Query

Feature ID:
0xF5
Action ID:
0x6E
Message:

RequestCOHNCert (docs) (source)

Response

COHN Certificate response triggered by RequestCOHNCert

UUID:

Query Response

Feature ID:
0xF5
Action ID:
0xEE
Message:

ResponseCOHNCert (docs) (source)

Get COHN Status
https://img.shields.io/badge/HERO13 Black-ffe119 https://img.shields.io/badge/HERO12 Black-f58231
Type:

Protobuf

Request

Get the current COHN status.

Response: NotifyCOHNStatus

Additionally, asynchronous updates can also be registered to return more NotifyCOHNStatus when a value changes.

UUID:

Query

Feature ID:
0xF5
Action ID:
0x6F
Message:

RequestGetCOHNStatus (docs) (source)

Response

Current COHN status triggered by a RequestGetCOHNStatus

UUID:

Query Response

Feature ID:
0xF5
Action ID:
0xEF
Message:

NotifyCOHNStatus (docs) (source)

Notification

Current COHN status triggered by a RequestGetCOHNStatus

UUID:

Query Response

Feature ID:
0xF5
Action ID:
0xEF
Message:

NotifyCOHNStatus (docs) (source)

Set COHN Setting
https://img.shields.io/badge/HERO13 Black-ffe119 https://img.shields.io/badge/HERO12 Black-f58231
Type:

Protobuf

Request

Configure a COHN Setting

Returns a ResponseGeneric

UUID:

Command

Feature ID:
0xF1
Action ID:
0x65
Message:

RequestSetCOHNSetting (docs) (source)

Response

Generic Response used across many response / notification messages

UUID:

Command Response

Feature ID:
0xF1
Action ID:
0xE5
Message:

ResponseGeneric (docs) (source)