[lpa]1。修改lps配置文件路径,待使用e-sim卡测试注网

This commit is contained in:
alisa 2023-08-23 01:44:08 +08:00
parent e21020dbac
commit f441ef1d98
4 changed files with 27 additions and 12 deletions

View File

@ -26,7 +26,9 @@
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
#include <sf_common.h> #include <sf_common.h>
#include "sf_sd_common.h" #include "sf_sd_common.h"
#endif #endif
#if 0 #if 0
#include "rtc.h" #include "rtc.h"
#include "Delay.h" #include "Delay.h"
@ -237,6 +239,13 @@ UINT32 DrvKey_DetNormalKey(void)
sf_save_camera_info(); sf_save_camera_info();
vos_perf_mark(&ttick); vos_perf_mark(&ttick);
} }
else if((0 == cmdflag) && (time == 20000))
{
cmdflag = 1;
printf("[%s:%d] SendKeyCnt:%d KeyTestPressCnt:%d time: %dms\n", __FUNCTION__, __LINE__, SendKeyCnt, KeyTestPressCnt, time);
//sf_network_switch();
}
} }
}else{ }else{
if(KeyTestPressCnt && (0 == sf_get_fw_update())){ if(KeyTestPressCnt && (0 == sf_get_fw_update())){

View File

@ -102,7 +102,7 @@ int main(int argc, char *argv[])
{ {
printf("*********************************************\n"); printf("*********************************************\n");
printf("* *\n"); printf("* *\n");
printf("* sf_app *\n"); printf("* sf_app-v1 *\n");
printf("* *\n"); printf("* *\n");
printf("*********************************************\n"); printf("*********************************************\n");
//gpio_direction_input(C_GPIO(10)); //gpio_direction_input(C_GPIO(10));

View File

@ -41,6 +41,8 @@
#include "sf_module.h" #include "sf_module.h"
#include "sf_otamng.h" #include "sf_otamng.h"
#include "lpasdk/api/lpasdk_api.h"
#include "sf_4G_sms_lpa_cmd.h"
#include "sf_commMng.h" #include "sf_commMng.h"
#include "sf_commu_mcu_reg.h" #include "sf_commu_mcu_reg.h"
@ -1295,11 +1297,11 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
s32ret = sf_4G_sim_init(pfnParam); s32ret = sf_4G_sim_init(pfnParam);
SF_APPCOMM_CHECK_RETURN(s32ret, s32ret); SF_APPCOMM_CHECK_RETURN(s32ret, s32ret);
SLOGD("\n");
#if SF_LPA_SDK #if 1
SLOGD("\n");
sf_sample_lpa_init(); sf_sample_lpa_init();
SLOGD("\n");
while(!sf_is_esim_init_finish()) while(!sf_is_esim_init_finish())
{ {
usleep(100*1000); usleep(100*1000);
@ -1530,7 +1532,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
s32ret = sf_4G_sim_init(pfnParam); s32ret = sf_4G_sim_init(pfnParam);
SF_APPCOMM_CHECK_RETURN(s32ret, SF_APP_ERROR_REQUEST); SF_APPCOMM_CHECK_RETURN(s32ret, SF_APP_ERROR_REQUEST);
#if SF_LPA_SDK #if 1 //SF_LPA_SDK
sf_sample_lpa_init(); sf_sample_lpa_init();
@ -1580,11 +1582,15 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
} }
#endif
s32ret = sf_4G_register_net_manual(pfnParam);
if(pCustomerParam->ProfileSwitchFlg) if(pCustomerParam->ProfileSwitchFlg)
{ {
pCustomerParam->ProfileSwitchFlg = 0; pCustomerParam->ProfileSwitchFlg = 0;
if(ret == SF_SIM_ERROR_REG_NET_REFUSE) if(s32ret == SF_SIM_ERROR_REG_NET_REFUSE)
{ {
sf_sms_lpa_command_recombination_log(SF_SMS_LPA_CMD_FAIL, SF_LPA_CUSTOM_ERROR_NETWORK_REJECTED); sf_sms_lpa_command_recombination_log(SF_SMS_LPA_CMD_FAIL, SF_LPA_CUSTOM_ERROR_NETWORK_REJECTED);
@ -1608,16 +1614,14 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
{ {
sf_sms_lpa_command_recombination_log(SF_SMS_LPA_CMD_SUCCESS, LPA_NO_ERROR); sf_sms_lpa_command_recombination_log(SF_SMS_LPA_CMD_SUCCESS, LPA_NO_ERROR);
memset(pCustomerParam->PreActiveProfileIccid, '\0', sizeof(pCustomerParam->PreActiveProfileIccid)); memset(pCustomerParam->PreActiveProfileIccid, '\0', sizeof(pCustomerParam->PreActiveProfileIccid));
if(ret == SF_SUCCESS) if(s32ret == SF_SUCCESS)
sf_sms_lpa_set_send_lpa_log_flg(1); sf_sms_lpa_set_send_lpa_log_flg(1);
// switch prlfile reboot in A reg net, reg 0,1 or reg 0,2, not need reboot again // switch prlfile reboot in A reg net, reg 0,1 or reg 0,2, not need reboot again
pCustomerParam->NetWorkNeedSearch = 0; pCustomerParam->NetWorkNeedSearch = 0;
} }
} }
#endif
s32ret = sf_4G_register_net_manual(pfnParam);
if (s32ret != SF_SUCCESS) { if (s32ret != SF_SUCCESS) {
sf_set_signal_ready_flag(TRUE); sf_set_signal_ready_flag(TRUE);
} }

View File

@ -62,6 +62,7 @@
#include "sf_4g_lpa.h" #include "sf_4g_lpa.h"
#endif #endif
/************************************************************************** /**************************************************************************
* C O N S T A N T S * * C O N S T A N T S *
**************************************************************************/ **************************************************************************/
@ -2025,7 +2026,8 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen)
paramSaveFlag = 1; paramSaveFlag = 1;
respFlag = 2; respFlag = 2;
break; break;
#if SF_LPA_SDK #if 0
SF_LPA_SDK
extern void sf_4g_operator_scan(UINT8 mode); extern void sf_4g_operator_scan(UINT8 mode);
extern void sf_network_select(UINT8 profileId); extern void sf_network_select(UINT8 profileId);