Compare commits
2 Commits
74bc2c078c
...
0f0c273d07
Author | SHA1 | Date | |
---|---|---|---|
0f0c273d07 | |||
4ea3ae008f |
@ -675,12 +675,7 @@ static void handle_system_event(key_event_t event)
|
||||
thing_init();
|
||||
init_bat_timer();
|
||||
// spi_led_init();
|
||||
<<<<<<< HEAD
|
||||
bk_printf("VER:%s\r\n","1.0.6");
|
||||
=======
|
||||
bk_printf("bk_misc_get_reset_reason = 0x%02X \n",bk_misc_get_reset_reason());
|
||||
bk_printf("VER:1.0.3 2025.05.27\r\n");
|
||||
>>>>>>> 0c7475e0d398483dba561d0acb30a572a0d6c861
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -184,8 +184,12 @@ static uint16_t *const s_boarding_attr_handle_list[sizeof(s_gatts_attr_db_servic
|
||||
//helloyifa
|
||||
&s_char_cmd_char_handle,
|
||||
};
|
||||
|
||||
static boarding_state m_state = BOARDING_STATE_IDLE;
|
||||
int ble_notify_boarding_state(boarding_state state){
|
||||
if(m_state == state){
|
||||
return 0;
|
||||
}
|
||||
m_state = state;
|
||||
uint8_t str_respone [32] = {0};
|
||||
memset(str_respone,0,sizeof(str_respone));
|
||||
switch (state)
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include "boarding_service.h"
|
||||
#include "components/bluetooth/bk_dm_bluetooth.h"
|
||||
|
||||
#include "wifi_boarding_utils.h"
|
||||
|
||||
#define TAG "bk_sconf"
|
||||
#define RCV_BUF_SIZE 256
|
||||
#define SEND_HEADER_SIZE 1024
|
||||
@ -836,7 +838,17 @@ static int bk_genie_sconf_wifi_event_cb(void *arg, event_module_t event_module,
|
||||
|
||||
case EVENT_WIFI_STA_DISCONNECTED:
|
||||
sta_disconnected = (wifi_event_sta_disconnected_t *)event_data;
|
||||
BK_LOGI(TAG, "STA disconnected, reason(%d)\n", sta_disconnected->disconnect_reason);
|
||||
BK_LOGE(TAG, "STA disconnected, reason(%d)\n", sta_disconnected->disconnect_reason);
|
||||
|
||||
//AP 不存在
|
||||
if(sta_disconnected->disconnect_reason == 257){
|
||||
ble_notify_boarding_state(BOARDING_STATE_AP_NOFOUND);
|
||||
}
|
||||
//密码错误
|
||||
if(sta_disconnected->disconnect_reason == 258 || sta_disconnected->disconnect_reason == WIFI_REASON_PREV_AUTH_NOT_VALID){
|
||||
ble_notify_boarding_state(BOARDING_STATE_PASSWORD_ERROR);
|
||||
}
|
||||
|
||||
/*drop local generated disconnect event by user*/
|
||||
if ((sta_disconnected->disconnect_reason == WIFI_REASON_DEAUTH_LEAVING &&
|
||||
sta_disconnected->local_generated == 1) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user