if(get_is_ln_get_device_token_success() == 0)
{
do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_DEVICE_TOKEN, NULL, 0);
+ // 重置网络计数
+ net_count = 0;
}
else
{
if (init_falg == false)
{
+ // 有网之后需要延迟5s
+ net_count ++;
+ if(net_count < 5)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "有网之后需要延迟 %d", net_count);
+ return;
+ }
//发送获取绑定用户ID
do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, NULL, 0);
+ // 获取到设备是未绑定状态,但是内部有绑定记录 需要恢复出厂
+ if(bind_status == true && uapi_ln_is_device_bound() == 0)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "恢复出厂");
+ restore_factory_settings();
+ return;
+ }
// 网络连接成功,调用HTTP服务获取设备Token
// 获取一下OTA 是否有最新版本
int ota = ota_update_boot();