mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-11 14:07:11 +03:00
initial refactoring
This commit is contained in:
74
protobuf/proto/Network.proto
Normal file
74
protobuf/proto/Network.proto
Normal file
@@ -0,0 +1,74 @@
|
||||
syntax = "proto3";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
|
||||
package sys;
|
||||
import "customoptions.proto";
|
||||
import "nanopb.proto";
|
||||
enum WifiAuthTypeEnum{
|
||||
AUTH_UNKNOWN = 0;
|
||||
AUTH_OPEN = 1;
|
||||
AUTH_WEP = 2;
|
||||
AUTH_WPA_PSK = 3;
|
||||
AUTH_WPA2_PSK = 4;
|
||||
AUTH_WPA_WPA2_PSK = 5;
|
||||
AUTH_WPA2_ENTERPRISE = 6;
|
||||
AUTH_WPA3_PSK = 7;
|
||||
AUTH_WPA2_WPA3_PSK = 8;
|
||||
AUTH_WAPI_PSK = 9;
|
||||
}
|
||||
enum WifiRadioTypesEnum {
|
||||
PHY_UNKNOWN = 0;
|
||||
PHY_11B = 1;
|
||||
PHY_11G = 2;
|
||||
PHY_11N = 3;
|
||||
PHY_LR = 4;
|
||||
PHY_WPS = 5;
|
||||
PHY_FTM_RESPONDER = 6;
|
||||
PHY_FTM_INITIATOR = 7;
|
||||
}
|
||||
|
||||
message IP {
|
||||
option (nanopb_msgopt).msgid = 10051;
|
||||
string ip = 14 [(nanopb).max_length = 15];
|
||||
string netmask = 15 [(nanopb).max_length = 15];
|
||||
string gw = 16 [(nanopb).max_length = 15];
|
||||
}
|
||||
|
||||
message WifiSTAEntry {
|
||||
string ssid = 1 [(nanopb).max_length = 32];
|
||||
string bssid = 2 [(nanopb).max_length = 32];
|
||||
uint32 channel = 3 [(nanopb).int_size = IS_8]; /**< channel of target AP. Set to 1~13 to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/
|
||||
WifiAuthTypeEnum auth_type = 4;
|
||||
WifiRadioTypesEnum radio_type = 5;
|
||||
google.protobuf.Timestamp last_try = 6;
|
||||
google.protobuf.Timestamp last_seen = 7;
|
||||
bool connected = 8;
|
||||
string password = 9 [(nanopb).max_length = 64];
|
||||
uint32 rssi = 10 [(nanopb).max_length = 8];
|
||||
}
|
||||
message WifiAP {
|
||||
IP ip = 1;
|
||||
string password = 2 [(nanopb).max_length = 64];
|
||||
uint32 channel = 3 [(nanopb).int_size = IS_8]; /**< channel of Access point AP. */
|
||||
WifiAuthTypeEnum auth_mode = 4 [(cust_field).v_enum = "AUTH_WPA2_PSK"];
|
||||
bool hidden = 5;
|
||||
// Max allowed connections. 4 is recommended
|
||||
uint32 max_connection = 6 [(nanopb).int_size = IS_8];
|
||||
// Recommended value: 100
|
||||
uint32 beacon_interval = 7 [(nanopb).int_size = IS_16];
|
||||
}
|
||||
message Server {
|
||||
option (nanopb_msgopt).msgid = 10050;
|
||||
int32 cport = 1;
|
||||
int32 port = 2;
|
||||
string ip = 3 [(nanopb).max_length = 15];
|
||||
}
|
||||
message NetworkConfig {
|
||||
bool disable_dhcp = 1;
|
||||
IP manual_ip = 2;
|
||||
// Wifi Credentials
|
||||
repeated WifiSTAEntry credentials = 3 [ (nanopb).max_count = 5 ];
|
||||
WifiAP ap = 4;
|
||||
WifiSTAEntry last_connected = 5 ;
|
||||
}
|
||||
Reference in New Issue
Block a user