network_management.proto 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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 Wed Sep 11 20:31:30 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. }
  85. /**
  86. * Get a list of Access Points found during a @ref RequestStartScan
  87. *
  88. * Response: @ref ResponseGetApEntries
  89. */
  90. message RequestGetApEntries {
  91. required int32 start_index = 1; // Used for paging. 0 <= start_index < @ref ResponseGetApEntries .total_entries
  92. required int32 max_entries = 2; // Used for paging. Value must be < @ref ResponseGetApEntries .total_entries
  93. required int32 scan_id = 3; // ID corresponding to a set of scan results (i.e. @ref ResponseGetApEntries .scan_id)
  94. }
  95. /**
  96. * Request to disconnect from currently-connected AP
  97. *
  98. * This drops the camera out of Station (STA) Mode and returns it to Access Point (AP) mode.
  99. *
  100. * Response: @ref ResponseGeneric
  101. */
  102. message RequestReleaseNetwork {}
  103. /**
  104. * Start scanning for Access Points
  105. *
  106. * @note Serialization of this object is zero bytes.
  107. *
  108. * Response: @ref ResponseStartScanning are sent immediately after the camera receives this command
  109. *
  110. * Notifications: @ref NotifStartScanning are sent periodically as scanning state changes. Use to detect scan complete.
  111. */
  112. message RequestStartScan {}
  113. /**
  114. * The status of an attempt to connect to an Access Point
  115. *
  116. * Sent as the initial response to @ref RequestConnect
  117. */
  118. message ResponseConnect {
  119. required EnumResultGeneric result = 1; // Generic pass/fail/error info
  120. required EnumProvisioning provisioning_state = 2; // Provisioning/connection state
  121. required int32 timeout_seconds = 3; // Network connection timeout (seconds)
  122. }
  123. /**
  124. * The status of an attempt to connect to an Access Point
  125. *
  126. * Sent as the initial response to @ref RequestConnectNew
  127. */
  128. message ResponseConnectNew {
  129. required EnumResultGeneric result = 1; // Status of Connect New request
  130. required EnumProvisioning provisioning_state = 2; // Current provisioning state of the network
  131. /**
  132. * Number of seconds camera will wait before declaring a network connection attempt failed
  133. */
  134. required int32 timeout_seconds = 3;
  135. }
  136. enum EnumScanEntryFlags {
  137. SCAN_FLAG_OPEN = 0x00; // This network does not require authentication
  138. SCAN_FLAG_AUTHENTICATED = 0x01; // This network requires authentication
  139. SCAN_FLAG_CONFIGURED = 0x02; // This network has been previously provisioned
  140. SCAN_FLAG_BEST_SSID = 0x04;
  141. SCAN_FLAG_ASSOCIATED = 0x08; // Camera is connected to this AP
  142. SCAN_FLAG_UNSUPPORTED_TYPE = 0x10;
  143. }
  144. /**
  145. * A list of scan entries describing a scanned Access Point
  146. *
  147. * This is sent in response to a @ref RequestGetApEntries
  148. */
  149. message ResponseGetApEntries {
  150. required EnumResultGeneric result = 1; // Generic pass/fail/error info
  151. required int32 scan_id = 2; // ID associated with this batch of results
  152. /**
  153. * An individual Scan Entry in a @ref ResponseGetApEntries response
  154. *
  155. * @note When `scan_entry_flags` contains `SCAN_FLAG_CONFIGURED`, it is an indication that this network has already been provisioned.
  156. */
  157. message ScanEntry {
  158. required string ssid = 1; // AP SSID
  159. required int32 signal_strength_bars = 2; // Signal strength (3 bars: >-70 dBm; 2 bars: >-85 dBm; 1 bar: <=-85 dBm)
  160. required int32 signal_frequency_mhz = 4; // Signal frequency (MHz)
  161. required int32 scan_entry_flags = 5; // Bitmasked value from @ref EnumScanEntryFlags
  162. }
  163. repeated ScanEntry entries = 3; // Array containing details about discovered APs
  164. }
  165. /**
  166. * The current scanning state.
  167. *
  168. * This is the initial response to a @ref RequestStartScan
  169. */
  170. message ResponseStartScanning {
  171. required EnumResultGeneric result = 1; // Generic pass/fail/error info
  172. required EnumScanning scanning_state = 2; // Scanning state
  173. }