diff --git a/code/application/source/sf_app/code/source/app/sf_service.c b/code/application/source/sf_app/code/source/app/sf_service.c index c001a092c..f97504c08 100755 --- a/code/application/source/sf_app/code/source/app/sf_service.c +++ b/code/application/source/sf_app/code/source/app/sf_service.c @@ -1294,7 +1294,10 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) { break; #endif s32ret = sf_get_utc(); - + if ((s32ret == SF_SIM_ERROR_UTC) && (SF_ON != pCustomerParam->GpsSwitch)) { + SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 0}; + s32ret = sf_get_ntp(s32ret, ¤t_time); + } sf_4G_usb_net_apn_cfg(pfnParam); sf_USB_net_init(); if ((SF_ON == pCustomerParam->GpsSwitch)) { @@ -1421,6 +1424,10 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) { sf_USB_net_init(); s32ret = sf_get_utc(); + if ((s32ret == SF_SIM_ERROR_UTC) && (SF_ON != pCustomerParam->GpsSwitch)) { + SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 0}; + s32ret = sf_get_ntp(s32ret, ¤t_time); + } if ((SF_ON == pCustomerParam->GpsSwitch)) { open_gps(); } @@ -1464,6 +1471,10 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) { sf_USB_net_init(); s32ret = sf_get_utc(); + if ((s32ret == SF_SIM_ERROR_UTC) && (SF_ON != pCustomerParam->GpsSwitch)) { + SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 0}; + s32ret = sf_get_ntp(s32ret, ¤t_time); + } if ((SF_ON == pCustomerParam->GpsSwitch)) { open_gps(); }