From: kyz Date: Fri, 4 Aug 2023 06:54:59 +0000 (+0800) Subject: 修改涂鸦配网流程 X-Git-Url: http://kyz.pub/gitweb/?a=commitdiff_plain;h=e50cea9b4869ec4489eaad35f32bc76ad32715e0;p=yn%2Falarmmonitor.git 修改涂鸦配网流程 --- diff --git a/app/inc/mg_version.h b/app/inc/mg_version.h index e133fe5..5d1f0a3 100644 --- a/app/inc/mg_version.h +++ b/app/inc/mg_version.h @@ -1,7 +1,7 @@ #ifndef __MG_VERSION_H__ #define __MG_VERSION_H__ -#define SW_VERSION "0.0.8" +#define SW_VERSION "0.0.9" #endif //__MG_VERION_H__ diff --git a/app/src/device_config.c b/app/src/device_config.c index bdeffe7..cd18107 100644 --- a/app/src/device_config.c +++ b/app/src/device_config.c @@ -750,7 +750,8 @@ int32_t is_wifi_config( mg_dev_t *dev ) //检查是否已经配网,需要wifi配网而且设备绑定 int32_t is_tuya_config( mg_dev_t *dev ) { - return is_wifi_config( dev ) && is_tuya_bind( dev ); + //return is_wifi_config( dev ) && is_tuya_bind( dev ); + return is_wifi_config( dev ); } int32_t tuya_bindcode_read( char * code, int32_t max_sz ) diff --git a/ble_wificonfig/Server/src/gatt-service.c b/ble_wificonfig/Server/src/gatt-service.c index 07df0b4..70e4b22 100644 --- a/ble_wificonfig/Server/src/gatt-service.c +++ b/ble_wificonfig/Server/src/gatt-service.c @@ -1392,6 +1392,10 @@ static int rk_blewifi_state_callback(RK_WIFI_RUNNING_State_e state, RK_WIFI_INFO } printf( "---------wificonfig connect[%s,%s] success[%d]!--------\n", wifi_ssid, wifi_password, wificonfig_wait_connect ); wificonfig_wait_connect = 0; + + //修改为 wifi 连接成功后,直接认为配网成功了。 2023/08/04 + netconfig_success_notify_cb(); //wificonfig success --> stop ble + break; case RK_WIFI_State_CONNECTFAILED: case RK_WIFI_State_CONNECTFAILED_WRONG_KEY: @@ -1639,7 +1643,7 @@ static DBusMessage *chr_write_value(DBusConnection *conn, DBusMessage *msg, if( len == 1 && chr->value[0] == 1 ){ printf( "ble wificonfig finish!\n" ); - netconfig_success_notify_cb(); + //netconfig_success_notify_cb(); }else{ printf( "ble wificonfig ...%d, data:%02x\n", len, len>0?chr->value[0]:0 ); }