|
|
@@ -62,6 +62,7 @@ enum Step{
|
|
|
STEP_SEND, // 发送
|
|
|
STEP_RECV, // 等待发送结果
|
|
|
|
|
|
+ STEP_QUERY_ID, //查询SIM卡号
|
|
|
STEP_QUERY_CFUN, // 查询功能模式
|
|
|
STEP_SET_CFUN_0, // 设置最小功能模式
|
|
|
STEP_SET_CFUN_1, // 设置全功能模式
|
|
|
@@ -341,13 +342,24 @@ static void REGIST_Process()
|
|
|
result=bc260y.query_cereg(&mode, &stat, &lac, &ci);// 查询网络状态
|
|
|
if(result == Result_Success)
|
|
|
{
|
|
|
- PCTRL_GotoStep(&pctrl, STEP_CLOSE, "断开tcp连接");
|
|
|
+ PCTRL_GotoStep(&pctrl, STEP_QUERY_ID, "查询SIM卡号");
|
|
|
}
|
|
|
else if(result == Result_Failed)
|
|
|
{
|
|
|
goto_failure("查询网络状态失败");
|
|
|
}
|
|
|
break;
|
|
|
+ case STEP_QUERY_ID: //查询SIM卡号
|
|
|
+ result = bc260y.query_qccid(regist_request.sim);
|
|
|
+ if(result == Result_Success)
|
|
|
+ {
|
|
|
+ PCTRL_GotoStep(&pctrl, STEP_CLOSE, "关闭连接");
|
|
|
+ }
|
|
|
+ else if(result == Result_Failed)
|
|
|
+ {
|
|
|
+ goto_failure("查询SIM卡号失败");
|
|
|
+ }
|
|
|
+ break;
|
|
|
case STEP_CLOSE:
|
|
|
result=bc260y.close_socket(connectID);//防止以前链接没断开,断开tcp链接
|
|
|
if(result == Result_Success)
|