diff --git a/main/protocol.h b/main/protocol.h index f13134c..edbd946 100644 --- a/main/protocol.h +++ b/main/protocol.h @@ -38,6 +38,13 @@ #define CMD_SESSION_RENAME 0x43 #define CMD_HEARTBEAT 0x44 +/* Provisioning commands (0x6x, over BLE) */ +#define CMD_GET_WIFI_CFG 0x60 +#define CMD_SET_WIFI_STA 0x61 +#define CMD_SET_WIFI_AP 0x62 +#define CMD_GET_DEVICE_INFO 0x63 +#define CMD_WIFI_STATUS 0x64 + /* Responses: Firmware -> Client (0x0x, 0x2x) */ #define RSP_SWEEP_START 0x01 #define RSP_DATA_POINT 0x02 @@ -71,6 +78,17 @@ #define RSP_SESSION_RENAMED 0x43 #define RSP_CLIENT_LIST 0x44 +/* Provisioning responses (0x6x, over BLE) */ +#define RSP_WIFI_CFG 0x60 +#define RSP_SET_WIFI_RESULT 0x61 +#define RSP_DEVICE_INFO 0x63 +#define RSP_WIFI_STATUS 0x64 + +/* WiFi STA state values (for RSP_WIFI_STATUS) */ +#define WIFI_STATE_DISCONNECTED 0 +#define WIFI_STATE_CONNECTING 1 +#define WIFI_STATE_CONNECTED 2 + /* Session limits */ #define MAX_SESSIONS 8 #define MAX_SESSION_NAME 32