123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- syntax = "proto3";
- import "google/protobuf/timestamp.proto";
- package sys.net;
- import "customoptions.proto";
- import "nanopb.proto";
- option (nanopb_fileopt).enum_to_string = true;
- enum auth_types{
- AUTH_UNKNOWN = 0;
- OPEN = 1;
- WEP = 2;
- WPA_PSK = 3;
- WPA2_PSK = 4;
- WPA_WPA2_PSK = 5;
- WPA2_ENTERPRISE = 6;
- WPA3_PSK = 7;
- WPA2_WPA3_PSK = 8;
- WAPI_PSK = 9;
- }
- enum radio_types {
- UNKNOWN = 0;
- PHY_11B = 1;
- PHY_11G = 2;
- PHY_11N = 3;
- LR = 4;
- WPS = 5;
- FTM_RESPONDER = 6;
- FTM_INITIATOR = 7;
- }
- message wifi_entry {
- option (nanopb_msgopt).packed_struct = true;
- string ssid = 1 [(nanopb).max_length = 32];
- string bssid = 2 [(nanopb).max_length = 32];
- uint32 channel = 3 [(nanopb).int_size = IS_8];
- auth_types auth_type = 4;
- repeated radio_types radio_type = 5 [(nanopb).type = FT_POINTER];
- 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 ip {
- option (nanopb_msgopt).packed_struct = true;
- 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 ap {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10059;
-
- ip ip = 1 [(cust_field).v_msg = '{"ip":"192.168.4.1","netmask":"255.255.255.0","gw":"192.168.4.1"}'];
- string password = 2 [(nanopb).max_length = 64,(cust_field).v_string = "squeezelite"];
-
-
- uint32 channel = 3 [(nanopb).int_size = IS_8,(cust_field).v_uint32 = 1];
- auth_types auth_mode = 4 [(cust_field).v_enum = "WPA2_PSK"];
- bool hidden = 5 [(cust_field).v_bool=false ];
-
- uint32 max_connection = 6 [(nanopb).int_size = IS_8,(cust_field).v_uint32 = 4];
-
- uint32 beacon_interval = 7 [(nanopb).int_size = IS_16, (cust_field).v_uint32 = 100];
- }
- message server {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10050;
- int32 cport = 1;
- int32 port = 2;
- string ip = 3 [(nanopb).max_length = 15];
- }
- message config {
- enum ps_types {
- NONE = 0;
- MIN_MODEM = 1;
- MAX_MODEM = 2;
- }
- option (nanopb_msgopt).packed_struct = true;
- bool disable_dhcp = 1;
- ip manual_ip = 2;
-
- repeated wifi_entry credentials = 3 [(nanopb).type = FT_CALLBACK, (nanopb).callback_datatype = "sys_net_wifi_entry*"];
- ap ap = 4;
- uint32 sta_polling_max_s = 5 [(nanopb).int_size = IS_16, (cust_field).v_uint32 = 600];
-
- uint32 ap_duration_s = 6 [(nanopb).int_size = IS_16, (cust_field).v_uint32 = 20];
-
-
- uint32 sta_polling_min_s = 7 [(nanopb).int_size = IS_16, (cust_field).v_uint32 = 15];
- uint32 dhcp_tmout_s = 8 [(nanopb).int_size = IS_16, (cust_field).v_uint32 = 30];
- bool eth_boot = 9 [(cust_field).v_bool = false];
-
-
- uint32 max_wifi_retry = 10 [(cust_field).v_uint32 = 3];
-
-
-
- uint32 max_ap_num = 11 [(cust_field).v_uint32 = 15];
-
-
- uint32 max_ssid_size = 12 [(cust_field).v_uint32 = 32];
-
-
- uint32 max_password_size = 13 [(cust_field).v_uint32 = 64];
- ps_types power_save_mode = 14 [(cust_field).v_enum = "MIN_MODEM"];
-
-
- uint32 max_initial_wifi_attempt = 15 [(cust_field).v_uint32 = 3];
-
-
-
-
-
- bool wifi_connect_fast_scan = 16;
- }
|