network_management.proto 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /* network_management.proto/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). */
  2. /* This copyright was auto-generated on Mon Nov 4 18:00:55 UTC 2024 */
  3. /***********************************************************************************************************************
  4. *
  5. * This file is automatically generated!!! Do not modify manually.
  6. *
  7. **********************************************************************************************************************/
  8. /**
  9. * Defines the structure of protobuf messages for network management
  10. */
  11. syntax = "proto2";
  12. package open_gopro;
  13. import "response_generic.proto";
  14. enum EnumProvisioning {
  15. PROVISIONING_UNKNOWN = 0;
  16. PROVISIONING_NEVER_STARTED = 1;
  17. PROVISIONING_STARTED = 2;
  18. PROVISIONING_ABORTED_BY_SYSTEM = 3;
  19. PROVISIONING_CANCELLED_BY_USER = 4;
  20. PROVISIONING_SUCCESS_NEW_AP = 5;
  21. PROVISIONING_SUCCESS_OLD_AP = 6;
  22. PROVISIONING_ERROR_FAILED_TO_ASSOCIATE = 7;
  23. PROVISIONING_ERROR_PASSWORD_AUTH = 8;
  24. PROVISIONING_ERROR_EULA_BLOCKING = 9;
  25. PROVISIONING_ERROR_NO_INTERNET = 10;
  26. PROVISIONING_ERROR_UNSUPPORTED_TYPE = 11;
  27. }
  28. enum EnumScanning {
  29. SCANNING_UNKNOWN = 0;
  30. SCANNING_NEVER_STARTED = 1;
  31. SCANNING_STARTED = 2;
  32. SCANNING_ABORTED_BY_SYSTEM = 3;
  33. SCANNING_CANCELLED_BY_USER = 4;
  34. SCANNING_SUCCESS = 5;
  35. }
  36. /*
  37. * Provision state notification
  38. *
  39. * Sent during provisioning triggered via @ref RequestConnect or @ref RequestConnectNew
  40. */
  41. message NotifProvisioningState {
  42. required EnumProvisioning provisioning_state = 1; // Provisioning / connection state
  43. }
  44. /*
  45. * Scanning state notification
  46. *
  47. * Triggered via @ref RequestStartScan
  48. */
  49. message NotifStartScanning {
  50. required EnumScanning scanning_state = 1; // Scanning state
  51. optional int32 scan_id = 2; // ID associated with scan results (included if scan was successful)
  52. optional int32 total_entries = 3; // Number of APs found during scan (included if scan was successful)
  53. required int32 total_configured_ssid = 4; // Total count of camera's provisioned SSIDs
  54. }
  55. /**
  56. * Connect to (but do not authenticate with) an Access Point
  57. *
  58. * This is intended to be used to connect to a previously-connected Access Point
  59. *
  60. * Response: @ref ResponseConnect
  61. *
  62. * Notification: @ref NotifProvisioningState sent periodically as provisioning state changes
  63. */
  64. message RequestConnect {
  65. required string ssid = 1; // AP SSID
  66. }
  67. /**
  68. * Connect to and authenticate with an Access Point
  69. *
  70. * This is only intended to be used if the AP is not previously provisioned.
  71. *
  72. * Response: @ref ResponseConnectNew sent immediately
  73. *
  74. * Notification: @ref NotifProvisioningState sent periodically as provisioning state changes
  75. */
  76. message RequestConnectNew {
  77. required string ssid = 1; // AP SSID
  78. required string password = 2; // AP password
  79. optional bytes static_ip = 3; // Static IP address
  80. optional bytes gateway = 4; // Gateway IP address
  81. optional bytes subnet = 5; // Subnet mask
  82. optional bytes dns_primary = 6; // Primary DNS
  83. optional bytes dns_secondary = 7; // Secondary DNS
  84. optional bool bypass_eula_check = 10; // Allow network configuration without internet connectivity
  85. }
  86. /**
  87. * Get a list of Access Points found during a @ref RequestStartScan
  88. *
  89. * Response: @ref ResponseGetApEntries
  90. */
  91. message RequestGetApEntries {
  92. required int32 start_index = 1; // Used for paging. 0 <= start_index < @ref ResponseGetApEntries .total_entries
  93. required int32 max_entries = 2; // Used for paging. Value must be < @ref ResponseGetApEntries .total_entries
  94. required int32 scan_id = 3; // ID corresponding to a set of scan results (i.e. @ref ResponseGetApEntries .scan_id)
  95. }
  96. /**
  97. * Request to disconnect from currently-connected AP
  98. *
  99. * This drops the camera out of Station (STA) Mode and returns it to Access Point (AP) mode.
  100. *
  101. * Response: @ref ResponseGeneric
  102. */
  103. message RequestReleaseNetwork {}
  104. /**
  105. * Start scanning for Access Points
  106. *
  107. * @note Serialization of this object is zero bytes.
  108. *
  109. * Response: @ref ResponseStartScanning are sent immediately after the camera receives this command
  110. *
  111. * Notifications: @ref NotifStartScanning are sent periodically as scanning state changes. Use to detect scan complete.
  112. */
  113. message RequestStartScan {}
  114. /**
  115. * The status of an attempt to connect to an Access Point
  116. *
  117. * Sent as the initial response to @ref RequestConnect
  118. */
  119. message ResponseConnect {
  120. required EnumResultGeneric result = 1; // Generic pass/fail/error info
  121. required EnumProvisioning provisioning_state = 2; // Provisioning/connection state
  122. required int32 timeout_seconds = 3; // Network connection timeout (seconds)
  123. }
  124. /**
  125. * The status of an attempt to connect to an Access Point
  126. *
  127. * Sent as the initial response to @ref RequestConnectNew
  128. */
  129. message ResponseConnectNew {
  130. required EnumResultGeneric result = 1; // Status of Connect New request
  131. required EnumProvisioning provisioning_state = 2; // Current provisioning state of the network
  132. /**
  133. * Number of seconds camera will wait before declaring a network connection attempt failed
  134. */
  135. required int32 timeout_seconds = 3;
  136. }
  137. enum EnumScanEntryFlags {
  138. SCAN_FLAG_OPEN = 0x00; // This network does not require authentication
  139. SCAN_FLAG_AUTHENTICATED = 0x01; // This network requires authentication
  140. SCAN_FLAG_CONFIGURED = 0x02; // This network has been previously provisioned
  141. SCAN_FLAG_BEST_SSID = 0x04;
  142. SCAN_FLAG_ASSOCIATED = 0x08; // Camera is connected to this AP
  143. SCAN_FLAG_UNSUPPORTED_TYPE = 0x10;
  144. }
  145. /**
  146. * A list of scan entries describing a scanned Access Point
  147. *
  148. * This is sent in response to a @ref RequestGetApEntries
  149. */
  150. message ResponseGetApEntries {
  151. required EnumResultGeneric result = 1; // Generic pass/fail/error info
  152. required int32 scan_id = 2; // ID associated with this batch of results
  153. /**
  154. * An individual Scan Entry in a @ref ResponseGetApEntries response
  155. *
  156. * @note When `scan_entry_flags` contains `SCAN_FLAG_CONFIGURED`, it is an indication that this network has already been provisioned.
  157. */
  158. message ScanEntry {
  159. required string ssid = 1; // AP SSID
  160. required int32 signal_strength_bars = 2; // Signal strength (3 bars: >-70 dBm; 2 bars: >-85 dBm; 1 bar: <=-85 dBm)
  161. required int32 signal_frequency_mhz = 4; // Signal frequency (MHz)
  162. required int32 scan_entry_flags = 5; // Bitmasked value from @ref EnumScanEntryFlags
  163. }
  164. repeated ScanEntry entries = 3; // Array containing details about discovered APs
  165. }
  166. /**
  167. * The current scanning state.
  168. *
  169. * This is the initial response to a @ref RequestStartScan
  170. */
  171. message ResponseStartScanning {
  172. required EnumResultGeneric result = 1; // Generic pass/fail/error info
  173. required EnumScanning scanning_state = 2; // Scanning state
  174. }
  175. /**
  176. * Set Wireless 2.0 Pairing State
  177. *
  178. * This is often colloquially referred to as "sending pairing complete"
  179. *
  180. * Response: @ref ResponseGeneric
  181. */
  182. message RequestPairingFinish {
  183. required EnumPairingFinishState result = 1; // Pairing state to set
  184. /**
  185. * This must be a non empty string but it does not actually affect anything.
  186. */
  187. required string phoneName = 2;
  188. }
  189. enum EnumPairingFinishState {
  190. SUCCESS = 0;
  191. FAILED = 1;
  192. }