implement WPS-PBC function under setup/wlan/setup/
This commit is contained in:
@@ -31,6 +31,6 @@
|
|||||||
/*
|
/*
|
||||||
* firmeware version string
|
* firmeware version string
|
||||||
*/
|
*/
|
||||||
#define __FIRMWARE__ "2020080603"
|
#define __FIRMWARE__ "2020080605"
|
||||||
|
|
||||||
#endif // _CONFIG_H
|
#endif // _CONFIG_H
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ static void exit_wifi_password_event_cb( lv_obj_t * obj, lv_event_t event ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lv_obj_t *wifi_autoon_onoff;
|
lv_obj_t *wifi_autoon_onoff;
|
||||||
|
static void wps_start_event_handler( lv_obj_t * obj, lv_event_t event );
|
||||||
static void wifi_autoon_onoff_event_handler( lv_obj_t * obj, lv_event_t event );
|
static void wifi_autoon_onoff_event_handler( lv_obj_t * obj, lv_event_t event );
|
||||||
|
|
||||||
void wlan_setup_tile_setup( uint32_t wifi_setup_tile_num ) {
|
void wlan_setup_tile_setup( uint32_t wifi_setup_tile_num ) {
|
||||||
@@ -333,12 +334,25 @@ void wlan_setup_tile_setup( uint32_t wifi_setup_tile_num ) {
|
|||||||
lv_label_set_text( wifi_autoon_label, "enable on wakeup");
|
lv_label_set_text( wifi_autoon_label, "enable on wakeup");
|
||||||
lv_obj_align( wifi_autoon_label, wifi_autoon_onoff_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
lv_obj_align( wifi_autoon_label, wifi_autoon_onoff_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
||||||
|
|
||||||
|
lv_obj_t *wps_btn = lv_btn_create( wifi_setup_tile, NULL);
|
||||||
|
lv_obj_set_event_cb( wps_btn, wps_start_event_handler );
|
||||||
|
lv_obj_align( wps_btn, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, -40);
|
||||||
|
lv_obj_t *wps_btn_label = lv_label_create( wps_btn, NULL );
|
||||||
|
lv_label_set_text( wps_btn_label, "start WPS");
|
||||||
|
|
||||||
if ( wifictl_get_autoon() )
|
if ( wifictl_get_autoon() )
|
||||||
lv_switch_on( wifi_autoon_onoff, LV_ANIM_OFF);
|
lv_switch_on( wifi_autoon_onoff, LV_ANIM_OFF);
|
||||||
else
|
else
|
||||||
lv_switch_off( wifi_autoon_onoff, LV_ANIM_OFF);
|
lv_switch_off( wifi_autoon_onoff, LV_ANIM_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void wps_start_event_handler( lv_obj_t * obj, lv_event_t event ) {
|
||||||
|
switch( event ) {
|
||||||
|
case( LV_EVENT_CLICKED ): wifictl_start_wps();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void enter_wifi_setup_event_cb( lv_obj_t * obj, lv_event_t event ) {
|
static void enter_wifi_setup_event_cb( lv_obj_t * obj, lv_event_t event ) {
|
||||||
switch( event ) {
|
switch( event ) {
|
||||||
case( LV_EVENT_CLICKED ): mainbar_jump_to_tilenumber( wifi_setup_tile_num, LV_ANIM_ON );
|
case( LV_EVENT_CLICKED ): mainbar_jump_to_tilenumber( wifi_setup_tile_num, LV_ANIM_ON );
|
||||||
|
|||||||
@@ -34,9 +34,10 @@
|
|||||||
#define POWERMGM_BMA_WAKEUP _BV(7)
|
#define POWERMGM_BMA_WAKEUP _BV(7)
|
||||||
#define POWERMGM_WIFI_ON_REQUEST _BV(8)
|
#define POWERMGM_WIFI_ON_REQUEST _BV(8)
|
||||||
#define POWERMGM_WIFI_OFF_REQUEST _BV(9)
|
#define POWERMGM_WIFI_OFF_REQUEST _BV(9)
|
||||||
#define POWERMGM_WIFI_ACTIVE _BV(10)
|
#define POWERMGM_WIFI_WPS_REQUEST _BV(10)
|
||||||
#define POWERMGM_WIFI_SCAN _BV(11)
|
#define POWERMGM_WIFI_ACTIVE _BV(11)
|
||||||
#define POWERMGM_WIFI_CONNECTED _BV(12)
|
#define POWERMGM_WIFI_SCAN _BV(12)
|
||||||
|
#define POWERMGM_WIFI_CONNECTED _BV(13)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @brief setp power managment, coordinate managment beween CPU, wifictl, pmu, bma, display, backlight and lvgl
|
* @brief setp power managment, coordinate managment beween CPU, wifictl, pmu, bma, display, backlight and lvgl
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include <esp_wifi.h>
|
#include <esp_wifi.h>
|
||||||
|
#include <esp_wps.h>
|
||||||
|
|
||||||
#include "powermgm.h"
|
#include "powermgm.h"
|
||||||
#include "wifictl.h"
|
#include "wifictl.h"
|
||||||
@@ -42,6 +43,8 @@ char *wifipassword=NULL;
|
|||||||
struct networklist wifictl_networklist[ NETWORKLIST_ENTRYS ];
|
struct networklist wifictl_networklist[ NETWORKLIST_ENTRYS ];
|
||||||
wifictl_config_t wifictl_config;
|
wifictl_config_t wifictl_config;
|
||||||
|
|
||||||
|
static esp_wps_config_t esp_wps_config;
|
||||||
|
|
||||||
void wifictl_save_network( void );
|
void wifictl_save_network( void );
|
||||||
void wifictl_load_network( void );
|
void wifictl_load_network( void );
|
||||||
void wifictl_save_config( void );
|
void wifictl_save_config( void );
|
||||||
@@ -56,7 +59,7 @@ void wifictl_setup( void ) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
wifi_init = true;
|
wifi_init = true;
|
||||||
powermgm_clear_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_SCAN );
|
powermgm_clear_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_WPS_REQUEST );
|
||||||
|
|
||||||
// clean network list table
|
// clean network list table
|
||||||
for ( int entry = 0 ; entry < NETWORKLIST_ENTRYS ; entry++ ) {
|
for ( int entry = 0 ; entry < NETWORKLIST_ENTRYS ; entry++ ) {
|
||||||
@@ -74,13 +77,19 @@ void wifictl_setup( void ) {
|
|||||||
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_CONNECTED );
|
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_CONNECTED );
|
||||||
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_GRAY );
|
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_GRAY );
|
||||||
statusbar_show_icon( STATUSBAR_WIFI );
|
statusbar_show_icon( STATUSBAR_WIFI );
|
||||||
|
if ( powermgm_get_event( POWERMGM_WIFI_WPS_REQUEST ) )
|
||||||
|
statusbar_wifi_set_state( true, "wait for WPS" );
|
||||||
|
else {
|
||||||
|
powermgm_set_event( POWERMGM_WIFI_SCAN );
|
||||||
statusbar_wifi_set_state( true, "scan ..." );
|
statusbar_wifi_set_state( true, "scan ..." );
|
||||||
WiFi.scanNetworks();
|
WiFi.scanNetworks();
|
||||||
|
}
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
}, WiFiEvent_t::SYSTEM_EVENT_STA_DISCONNECTED);
|
}, WiFiEvent_t::SYSTEM_EVENT_STA_DISCONNECTED);
|
||||||
|
|
||||||
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||||
powermgm_set_event( POWERMGM_WIFI_ACTIVE );
|
powermgm_set_event( POWERMGM_WIFI_ACTIVE );
|
||||||
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_CONNECTED );
|
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_WPS_REQUEST );
|
||||||
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_GRAY );
|
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_GRAY );
|
||||||
statusbar_show_icon( STATUSBAR_WIFI );
|
statusbar_show_icon( STATUSBAR_WIFI );
|
||||||
int len = WiFi.scanComplete();
|
int len = WiFi.scanComplete();
|
||||||
@@ -95,11 +104,17 @@ void wifictl_setup( void ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
}, WiFiEvent_t::SYSTEM_EVENT_SCAN_DONE );
|
}, WiFiEvent_t::SYSTEM_EVENT_SCAN_DONE );
|
||||||
|
|
||||||
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||||
powermgm_set_event( POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_ACTIVE );
|
powermgm_set_event( POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_ACTIVE );
|
||||||
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN );
|
if ( powermgm_get_event( POWERMGM_WIFI_WPS_REQUEST ) ) {
|
||||||
|
Serial.printf("SSID: %s, psk: %s\r\n", WiFi.SSID().c_str(), WiFi.psk().c_str() );
|
||||||
|
wifictl_insert_network( WiFi.SSID().c_str(), WiFi.psk().c_str() );
|
||||||
|
wifictl_save_config();
|
||||||
|
}
|
||||||
|
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_WPS_REQUEST );
|
||||||
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_WHITE );
|
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_WHITE );
|
||||||
statusbar_show_icon( STATUSBAR_WIFI );
|
statusbar_show_icon( STATUSBAR_WIFI );
|
||||||
String label(wifiname);
|
String label(wifiname);
|
||||||
@@ -110,22 +125,49 @@ void wifictl_setup( void ) {
|
|||||||
// label.concat(WiFi.localIPv6().toString());
|
// label.concat(WiFi.localIPv6().toString());
|
||||||
statusbar_wifi_set_state( true, label.c_str() );
|
statusbar_wifi_set_state( true, label.c_str() );
|
||||||
asyncwebserver_setup();
|
asyncwebserver_setup();
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
}, WiFiEvent_t::SYSTEM_EVENT_STA_GOT_IP );
|
}, WiFiEvent_t::SYSTEM_EVENT_STA_GOT_IP );
|
||||||
|
|
||||||
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||||
powermgm_set_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_SCAN );
|
powermgm_set_event( POWERMGM_WIFI_ACTIVE );
|
||||||
powermgm_clear_event( POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST );
|
powermgm_clear_event( POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST );
|
||||||
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_GRAY );
|
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_GRAY );
|
||||||
statusbar_show_icon( STATUSBAR_WIFI );
|
statusbar_show_icon( STATUSBAR_WIFI );
|
||||||
|
if ( powermgm_get_event( POWERMGM_WIFI_WPS_REQUEST ) )
|
||||||
|
statusbar_wifi_set_state( true, "wait for WPS" );
|
||||||
|
else {
|
||||||
|
powermgm_set_event( POWERMGM_WIFI_SCAN );
|
||||||
statusbar_wifi_set_state( true, "scan ..." );
|
statusbar_wifi_set_state( true, "scan ..." );
|
||||||
WiFi.scanNetworks();
|
WiFi.scanNetworks();
|
||||||
|
}
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
}, WiFiEvent_t::SYSTEM_EVENT_WIFI_READY );
|
}, WiFiEvent_t::SYSTEM_EVENT_WIFI_READY );
|
||||||
|
|
||||||
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||||
powermgm_clear_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN );
|
powermgm_clear_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_WPS_REQUEST );
|
||||||
statusbar_hide_icon( STATUSBAR_WIFI );
|
statusbar_hide_icon( STATUSBAR_WIFI );
|
||||||
statusbar_wifi_set_state( false, "" );
|
statusbar_wifi_set_state( false, "" );
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
}, WiFiEvent_t::SYSTEM_EVENT_STA_STOP );
|
}, WiFiEvent_t::SYSTEM_EVENT_STA_STOP );
|
||||||
|
|
||||||
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||||
|
esp_wifi_wps_disable();
|
||||||
|
WiFi.begin();
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
|
}, WiFiEvent_t::SYSTEM_EVENT_STA_WPS_ER_SUCCESS );
|
||||||
|
|
||||||
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||||
|
esp_wifi_wps_disable();
|
||||||
|
statusbar_wifi_set_state( true, "WPS failed" );
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
|
}, WiFiEvent_t::SYSTEM_EVENT_STA_WPS_ER_FAILED );
|
||||||
|
|
||||||
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||||
|
esp_wifi_wps_disable();
|
||||||
|
statusbar_wifi_set_state( true, "WPS timeout" );
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
|
}, WiFiEvent_t::SYSTEM_EVENT_STA_WPS_ER_TIMEOUT );
|
||||||
|
|
||||||
xTaskCreate( wifictl_Task, /* Function to implement the task */
|
xTaskCreate( wifictl_Task, /* Function to implement the task */
|
||||||
"wifictl Task", /* Name of the task */
|
"wifictl Task", /* Name of the task */
|
||||||
5000, /* Stack size in words */
|
5000, /* Stack size in words */
|
||||||
@@ -259,7 +301,7 @@ bool wifictl_insert_network( const char *ssid, const char *password ) {
|
|||||||
// check if existin
|
// check if existin
|
||||||
for( int entry = 0 ; entry < NETWORKLIST_ENTRYS; entry++ ) {
|
for( int entry = 0 ; entry < NETWORKLIST_ENTRYS; entry++ ) {
|
||||||
if( !strcmp( ssid, wifictl_networklist[ entry ].ssid ) ) {
|
if( !strcmp( ssid, wifictl_networklist[ entry ].ssid ) ) {
|
||||||
strncpy( wifictl_networklist[ entry ].ssid, ssid, sizeof( wifictl_networklist[ entry ].ssid ) );
|
strncpy( wifictl_networklist[ entry ].password, password, sizeof( wifictl_networklist[ entry ].password ) );
|
||||||
wifictl_save_network();
|
wifictl_save_network();
|
||||||
WiFi.scanNetworks();
|
WiFi.scanNetworks();
|
||||||
powermgm_set_event( POWERMGM_WIFI_SCAN );
|
powermgm_set_event( POWERMGM_WIFI_SCAN );
|
||||||
@@ -315,7 +357,7 @@ void wifictl_off( void ) {
|
|||||||
void wifictl_standby( void ) {
|
void wifictl_standby( void ) {
|
||||||
log_i("standby");
|
log_i("standby");
|
||||||
if ( powermgm_get_event( POWERMGM_WIFI_ACTIVE ) ) wifictl_off();
|
if ( powermgm_get_event( POWERMGM_WIFI_ACTIVE ) ) wifictl_off();
|
||||||
while( powermgm_get_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN ) ) { yield(); }
|
while( powermgm_get_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_WPS_REQUEST ) ) { yield(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void wifictl_wakeup( void ) {
|
void wifictl_wakeup( void ) {
|
||||||
@@ -324,6 +366,37 @@ void wifictl_wakeup( void ) {
|
|||||||
wifictl_on();
|
wifictl_on();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wifictl_start_wps( void ) {
|
||||||
|
if ( powermgm_get_event( POWERMGM_WIFI_WPS_REQUEST ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
log_e("start WPS");
|
||||||
|
|
||||||
|
esp_wps_config.crypto_funcs = &g_wifi_default_wps_crypto_funcs;
|
||||||
|
esp_wps_config.wps_type = ESP_WPS_MODE;
|
||||||
|
strcpy(esp_wps_config.factory_info.manufacturer, ESP_MANUFACTURER);
|
||||||
|
strcpy(esp_wps_config.factory_info.model_number, ESP_MODEL_NUMBER);
|
||||||
|
strcpy(esp_wps_config.factory_info.model_name, ESP_MODEL_NAME);
|
||||||
|
strcpy(esp_wps_config.factory_info.device_name, ESP_DEVICE_NAME);
|
||||||
|
|
||||||
|
WiFi.mode( WIFI_OFF );
|
||||||
|
esp_wifi_stop();
|
||||||
|
|
||||||
|
statusbar_style_icon( STATUSBAR_WIFI, STATUSBAR_STYLE_GRAY );
|
||||||
|
statusbar_show_icon( STATUSBAR_WIFI );
|
||||||
|
statusbar_wifi_set_state( true, "wait for WPS" );
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
|
|
||||||
|
powermgm_set_event( POWERMGM_WIFI_WPS_REQUEST );
|
||||||
|
|
||||||
|
ESP_ERROR_CHECK( esp_wifi_set_mode( WIFI_MODE_STA ) );
|
||||||
|
ESP_ERROR_CHECK( esp_wifi_start() );
|
||||||
|
|
||||||
|
ESP_ERROR_CHECK( esp_wifi_wps_enable( &esp_wps_config ) );
|
||||||
|
ESP_ERROR_CHECK( esp_wifi_wps_start( 120000 ) );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -335,11 +408,13 @@ void wifictl_Task( void * pvParameters ) {
|
|||||||
vTaskDelay( 500 );
|
vTaskDelay( 500 );
|
||||||
if ( powermgm_get_event( POWERMGM_WIFI_ON_REQUEST ) ) {
|
if ( powermgm_get_event( POWERMGM_WIFI_ON_REQUEST ) ) {
|
||||||
statusbar_wifi_set_state( true, "activate" );
|
statusbar_wifi_set_state( true, "activate" );
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
WiFi.mode( WIFI_STA );
|
WiFi.mode( WIFI_STA );
|
||||||
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_ON_REQUEST );
|
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_ON_REQUEST );
|
||||||
}
|
}
|
||||||
else if ( powermgm_get_event( POWERMGM_WIFI_OFF_REQUEST ) ) {
|
else if ( powermgm_get_event( POWERMGM_WIFI_OFF_REQUEST ) ) {
|
||||||
statusbar_wifi_set_state( false, "" );
|
statusbar_wifi_set_state( false, "" );
|
||||||
|
lv_obj_invalidate( lv_scr_act() );
|
||||||
WiFi.mode( WIFI_OFF );
|
WiFi.mode( WIFI_OFF );
|
||||||
esp_wifi_stop();
|
esp_wifi_stop();
|
||||||
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_ON_REQUEST );
|
powermgm_clear_event( POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_SCAN | POWERMGM_WIFI_ON_REQUEST );
|
||||||
|
|||||||
@@ -27,6 +27,12 @@
|
|||||||
#define WIFICTL_LIST_FILE "/wifilist.cfg"
|
#define WIFICTL_LIST_FILE "/wifilist.cfg"
|
||||||
#define WIFICTL_CONFIG_FILE "/wificfg.cfg"
|
#define WIFICTL_CONFIG_FILE "/wificfg.cfg"
|
||||||
|
|
||||||
|
#define ESP_WPS_MODE WPS_TYPE_PBC
|
||||||
|
#define ESP_MANUFACTURER "ESPRESSIF"
|
||||||
|
#define ESP_MODEL_NUMBER "ESP32"
|
||||||
|
#define ESP_MODEL_NAME "ESPRESSIF IOT"
|
||||||
|
#define ESP_DEVICE_NAME "ESP STATION"
|
||||||
|
|
||||||
struct networklist {
|
struct networklist {
|
||||||
char ssid[64]="";
|
char ssid[64]="";
|
||||||
char password[64]="";
|
char password[64]="";
|
||||||
@@ -75,5 +81,6 @@
|
|||||||
void wifictl_wakeup( void );
|
void wifictl_wakeup( void );
|
||||||
bool wifictl_get_autoon( void );
|
bool wifictl_get_autoon( void );
|
||||||
void wifictl_set_autoon( bool autoon );
|
void wifictl_set_autoon( bool autoon );
|
||||||
|
void wifictl_start_wps( void );
|
||||||
|
|
||||||
#endif // _WIFICTL_H
|
#endif // _WIFICTL_H
|
||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
{"version":"2020080603","host":"http://www.neo-guerillaz.de","file":"ttgo-t-watch2020_v1.ino.bin"}
|
{"version":"2020080605","host":"http://www.neo-guerillaz.de","file":"ttgo-t-watch2020_v1.ino.bin"}
|
||||||
|
|||||||
Reference in New Issue
Block a user