/* network_management.proto/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). */ /* This copyright was auto-generated on Mon Nov 4 18:00:55 UTC 2024 */ /*********************************************************************************************************************** * * This file is automatically generated!!! Do not modify manually. * **********************************************************************************************************************/ /** * Defines the structure of protobuf messages for network management */ syntax = "proto2"; package open_gopro; import "response_generic.proto"; enum EnumProvisioning { PROVISIONING_UNKNOWN = 0; PROVISIONING_NEVER_STARTED = 1; PROVISIONING_STARTED = 2; PROVISIONING_ABORTED_BY_SYSTEM = 3; PROVISIONING_CANCELLED_BY_USER = 4; PROVISIONING_SUCCESS_NEW_AP = 5; PROVISIONING_SUCCESS_OLD_AP = 6; PROVISIONING_ERROR_FAILED_TO_ASSOCIATE = 7; PROVISIONING_ERROR_PASSWORD_AUTH = 8; PROVISIONING_ERROR_EULA_BLOCKING = 9; PROVISIONING_ERROR_NO_INTERNET = 10; PROVISIONING_ERROR_UNSUPPORTED_TYPE = 11; } enum EnumScanning { SCANNING_UNKNOWN = 0; SCANNING_NEVER_STARTED = 1; SCANNING_STARTED = 2; SCANNING_ABORTED_BY_SYSTEM = 3; SCANNING_CANCELLED_BY_USER = 4; SCANNING_SUCCESS = 5; } /* * Provision state notification * * Sent during provisioning triggered via @ref RequestConnect or @ref RequestConnectNew */ message NotifProvisioningState { required EnumProvisioning provisioning_state = 1; // Provisioning / connection state } /* * Scanning state notification * * Triggered via @ref RequestStartScan */ message NotifStartScanning { required EnumScanning scanning_state = 1; // Scanning state optional int32 scan_id = 2; // ID associated with scan results (included if scan was successful) optional int32 total_entries = 3; // Number of APs found during scan (included if scan was successful) required int32 total_configured_ssid = 4; // Total count of camera's provisioned SSIDs } /** * Connect to (but do not authenticate with) an Access Point * * This is intended to be used to connect to a previously-connected Access Point * * Response: @ref ResponseConnect * * Notification: @ref NotifProvisioningState sent periodically as provisioning state changes */ message RequestConnect { required string ssid = 1; // AP SSID } /** * Connect to and authenticate with an Access Point * * This is only intended to be used if the AP is not previously provisioned. * * Response: @ref ResponseConnectNew sent immediately * * Notification: @ref NotifProvisioningState sent periodically as provisioning state changes */ message RequestConnectNew { required string ssid = 1; // AP SSID required string password = 2; // AP password optional bytes static_ip = 3; // Static IP address optional bytes gateway = 4; // Gateway IP address optional bytes subnet = 5; // Subnet mask optional bytes dns_primary = 6; // Primary DNS optional bytes dns_secondary = 7; // Secondary DNS optional bool bypass_eula_check = 10; // Allow network configuration without internet connectivity } /** * Get a list of Access Points found during a @ref RequestStartScan * * Response: @ref ResponseGetApEntries */ message RequestGetApEntries { required int32 start_index = 1; // Used for paging. 0 <= start_index < @ref ResponseGetApEntries .total_entries required int32 max_entries = 2; // Used for paging. Value must be < @ref ResponseGetApEntries .total_entries required int32 scan_id = 3; // ID corresponding to a set of scan results (i.e. @ref ResponseGetApEntries .scan_id) } /** * Request to disconnect from currently-connected AP * * This drops the camera out of Station (STA) Mode and returns it to Access Point (AP) mode. * * Response: @ref ResponseGeneric */ message RequestReleaseNetwork {} /** * Start scanning for Access Points * * @note Serialization of this object is zero bytes. * * Response: @ref ResponseStartScanning are sent immediately after the camera receives this command * * Notifications: @ref NotifStartScanning are sent periodically as scanning state changes. Use to detect scan complete. */ message RequestStartScan {} /** * The status of an attempt to connect to an Access Point * * Sent as the initial response to @ref RequestConnect */ message ResponseConnect { required EnumResultGeneric result = 1; // Generic pass/fail/error info required EnumProvisioning provisioning_state = 2; // Provisioning/connection state required int32 timeout_seconds = 3; // Network connection timeout (seconds) } /** * The status of an attempt to connect to an Access Point * * Sent as the initial response to @ref RequestConnectNew */ message ResponseConnectNew { required EnumResultGeneric result = 1; // Status of Connect New request required EnumProvisioning provisioning_state = 2; // Current provisioning state of the network /** * Number of seconds camera will wait before declaring a network connection attempt failed */ required int32 timeout_seconds = 3; } enum EnumScanEntryFlags { SCAN_FLAG_OPEN = 0x00; // This network does not require authentication SCAN_FLAG_AUTHENTICATED = 0x01; // This network requires authentication SCAN_FLAG_CONFIGURED = 0x02; // This network has been previously provisioned SCAN_FLAG_BEST_SSID = 0x04; SCAN_FLAG_ASSOCIATED = 0x08; // Camera is connected to this AP SCAN_FLAG_UNSUPPORTED_TYPE = 0x10; } /** * A list of scan entries describing a scanned Access Point * * This is sent in response to a @ref RequestGetApEntries */ message ResponseGetApEntries { required EnumResultGeneric result = 1; // Generic pass/fail/error info required int32 scan_id = 2; // ID associated with this batch of results /** * An individual Scan Entry in a @ref ResponseGetApEntries response * * @note When `scan_entry_flags` contains `SCAN_FLAG_CONFIGURED`, it is an indication that this network has already been provisioned. */ message ScanEntry { required string ssid = 1; // AP SSID required int32 signal_strength_bars = 2; // Signal strength (3 bars: >-70 dBm; 2 bars: >-85 dBm; 1 bar: <=-85 dBm) required int32 signal_frequency_mhz = 4; // Signal frequency (MHz) required int32 scan_entry_flags = 5; // Bitmasked value from @ref EnumScanEntryFlags } repeated ScanEntry entries = 3; // Array containing details about discovered APs } /** * The current scanning state. * * This is the initial response to a @ref RequestStartScan */ message ResponseStartScanning { required EnumResultGeneric result = 1; // Generic pass/fail/error info required EnumScanning scanning_state = 2; // Scanning state } /** * Set Wireless 2.0 Pairing State * * This is often colloquially referred to as "sending pairing complete" * * Response: @ref ResponseGeneric */ message RequestPairingFinish { required EnumPairingFinishState result = 1; // Pairing state to set /** * This must be a non empty string but it does not actually affect anything. */ required string phoneName = 2; } enum EnumPairingFinishState { SUCCESS = 0; FAILED = 1; }