MC8332GpsTask.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. /********************************************************************************
  2. * File Name: MC8332GpsTask.h
  3. * Function Describe: Header file for MC8332GpsTask.c
  4. * Explain:
  5. * Writer:
  6. * Date: 2016-3-11
  7. *******************************************************************************/
  8. #include "includes.h"
  9. unsigned int Mododrex_Net;
  10. void MC8332_GPS_RecvHandle(unsigned char *pMsg,unsigned short tempLen)
  11. {
  12. char buf[20];
  13. char buf2[50];
  14. char result[10];
  15. unsigned short cmd,ackCmd,smsLen;
  16. unsigned char Result,i,buBiaoResponsed;
  17. short targetIndex;
  18. SUTDS ds;
  19. ////////////////////////////////////////////
  20. // char buftest[100];
  21. // char buf22[3];
  22. // for(i=0;i<25;i++)
  23. // {
  24. // sprintf(buf22, "%02x", pMsg[i]);
  25. // strcat(buftest, buf22);
  26. // }
  27. // strcat(buftest, "\r\n");
  28. // SlwTrace(INF, buftest);
  29. ////////////////////////////////////////////
  30. //////////处理布标类型指令
  31. cmd = (pMsg[1]<<8) | (pMsg[2]&0xff);
  32. buBiaoResponsed=1;
  33. snprintf(buf2, sizeof(buf2), "\r\ncmd=%04x", cmd);
  34. SlwTrace(INF, buf2,1);
  35. switch(cmd)
  36. {//布标命令返回
  37. case TS_TERMINAL_REGISTRATION_REPLY://终端注册应答
  38. //7E 8100 000A 000166000016 0250 0100 00 20161118165030 E07E 成功
  39. //7E 8100 0003 000166000016 0251 0100 01 A07E 已注册
  40. Result = pMsg[15];
  41. snprintf(buf2, sizeof(buf2), "\r\nresult=%02x", Result);
  42. SlwTrace(INF, buf2,1);
  43. switch(Result)
  44. {
  45. case 0://00注册成功
  46. for(i =0; i < 7; i++)
  47. sutProductPara.AutH[i]=pMsg[16+i];
  48. SaveProductParaToFlash("AUTH-REC");
  49. snprintf(result, sizeof(result), "Ok");
  50. break;
  51. case 1://01 车辆已注册
  52. snprintf(result, sizeof(result), "Car Exist");break;
  53. case 2://02 无此车辆
  54. snprintf(result, sizeof(Result), "No car");break;
  55. case 3://03 终端已经被注册
  56. snprintf(result, sizeof(result), "Device Exist");break;
  57. case 4://04 数据库无此终端
  58. snprintf(result, sizeof(result), "No Record");break;
  59. default://无效值
  60. //统称失败
  61. snprintf(result, sizeof(result), "Faile");
  62. break;
  63. }
  64. snprintf(buf2, sizeof(buf2), "\r\n[Register]%d %s", Result,result);
  65. SlwTrace(INF, buf2,1);
  66. //注册应答后直接进行一次鉴权
  67. Authentication();
  68. break;
  69. case TS_TEXT_INFORMATION_ISSUED://文本下发
  70. //7E83000005000166000009000001 31323334ED7E
  71. smsLen = pMsg[3];
  72. smsLen <<= 8;
  73. smsLen &= 0xff00;
  74. smsLen |= pMsg[4];
  75. smsLen -= 1;//去掉后面较验码
  76. if(SMS_SIGNAL_LEN <= smsLen)
  77. smsLen = SMS_SIGNAL_LEN;
  78. memset(sutMess.GBKMess1, 0, sizeof(sutMess.GBKMess1));
  79. memcpy(sutMess.GBKMess1, pMsg+14, smsLen);
  80. sutMess.len = smsLen;
  81. //////////////////////////
  82. sutFeed.feedID=TS_SETTING_TERMINAL_PARAMETERS;
  83. ds.Data.ucData.b1=pMsg[11];
  84. ds.Data.ucData.b2=pMsg[12];
  85. sutFeed.feedliushuiID=ds.Data.usData;
  86. sutFeed.result=2;
  87. //////////////////////////
  88. if(sutMess.len > 0)
  89. SetGotNewMessage();
  90. break;
  91. case TS_PLATFORM_UNIVERSAL_ANSWER://通用平台应答
  92. //7E8001000500016600001602400000010201B57E
  93. //buf[0]=0x7e;
  94. //if(-1 != (targetIndex=FindTargetIndex((char *)pMsg, '\r', buf, 1,2)))
  95. targetIndex = tempLen;//这个长度是去掉了两个7E的长度
  96. {
  97. ackCmd=(pMsg[targetIndex-3]<<8) | (pMsg[targetIndex-2]&0xff);
  98. Result = pMsg[targetIndex-1];
  99. snprintf(buf2, sizeof(buf2), "\r\nLen=%d,ackCmd=%04x,result=%02x", tempLen,ackCmd,Result);
  100. SlwTrace(INF, buf2,1);
  101. switch(ackCmd)
  102. {
  103. case TS_TERMINAL_AUTHENTICATION://终端鉴权应答
  104. if(Result == 0)
  105. {//鉴权成功
  106. sutGpsInfo.isGpsAuthOk=1;
  107. snprintf(buf2, sizeof(buf2), "\r\n[ATH]Ok");
  108. //TSGpsServerConect();//鉴权成功后发一包终端应答包即可以支持文本接收了
  109. }else
  110. {
  111. sutGpsInfo.isGpsAuthOk=0;
  112. snprintf(buf2, sizeof(buf2), "\r\n[ATH]Faile");
  113. }
  114. SlwTrace(INF, buf2,1);
  115. break;
  116. case TS_LOCATION_INFORMATION_REPORTING://位置包应答
  117. SlwTrace(INF, "\r\nLocation ACK",1);
  118. break;
  119. case TS_TERMINAL_HEARTBEAT://心跳应答
  120. SlwTrace(INF, "\r\nHearTick ACK",1);
  121. break;
  122. case TS_SEND_SOS_SMS://SOS应答
  123. SlwTrace(INF, "\r\nSOS ACK",1);
  124. sutPocStatus.SOS_Flag++;
  125. break;
  126. }
  127. }
  128. break;
  129. case TS_TERMINAL_REQTIME://时间ACK
  130. //7e0f020007001899000022003a e20704130e2f02 427e
  131. SlwTrace(INF, "\r\nTimeAck",1);
  132. ds.Data.ucData.b1=pMsg[13];
  133. ds.Data.ucData.b2=pMsg[14];
  134. g_usModeYTime=ds.Data.usData-2000;
  135. g_usModemTime=pMsg[15];
  136. g_usModeDTime=pMsg[16];
  137. g_usModeHTime=pMsg[17];
  138. g_usModeMTime=pMsg[18];
  139. g_usModeSTime=pMsg[19];
  140. SetTime(g_usModeHTime, g_usModeMTime, g_usModeSTime);//保存下来,以便下次启动,没登陆前可以使用本地时间显示
  141. break;
  142. default:
  143. buBiaoResponsed=0;
  144. break;
  145. }
  146. if(buBiaoResponsed)
  147. g_ucModemSentTcpCt=0;
  148. /////////////处理其它类型指令
  149. }
  150. void AtHandle(char *pMsg)
  151. {
  152. int csq;
  153. short targetIndex;
  154. unsigned char tempSocket,i,temp;
  155. unsigned short tempLen;
  156. char buf[80]="\r\n";
  157. char bufTemp[3];
  158. char buf3[40];//////////////////////////
  159. STATUE ipStatus;
  160. if(0==ModemStrCmp(pMsg,"+CCSQ:"))
  161. {
  162. UpdateCsqValue(GetCCSQ(pMsg));
  163. }else if(0==ModemStrCmp(pMsg,"+CSQ:"))
  164. {
  165. UpdateCsqValue(GetCSQ(pMsg));
  166. }else if(0==ModemStrCmp(pMsg,"+MODODREX:")){
  167. Mododrex_Net=atoi(&pMsg[11]);
  168. snprintf(buf3,sizeof(buf3),"Mododrex_Netvalue........=%d\r\n",Mododrex_Net);
  169. SlwTrace(INF, buf3,1);
  170. }else if(0==ModemStrCmp(pMsg,"+POC_PPP:")){
  171. sutGpsStatus.PPPStatus=GetPPPStatus(pMsg);
  172. if(sutGpsStatus.PPPStatus == CLOSE) sutGpsStatus.IPStatus=0;
  173. }else if(0==ModemStrCmp(pMsg,"+TCPSTATUS:"))
  174. {//查询指令返回状态
  175. if(tcpControl ==2)//控制配置服务器操作
  176. {
  177. #if(USE_CONFIG_FUN==1)
  178. ipStatus = GetIPNewStatus(pMsg,CONFIG_SER_SOCKET);
  179. if(OPEN == ipStatus) sutConfig.g_ubConfigTcpStatus = 1;
  180. else if(CLOSE ==ipStatus)
  181. {
  182. if(sutConfig.g_ubConfigTcpStatus) sutConfig.g_ucTcpRetryNum=CONFIG_TCP_RETRY_CNT;
  183. sutConfig.g_ubConfigTcpStatus = 0;
  184. }
  185. #endif
  186. }else
  187. {
  188. ipStatus=GetIPNewStatus(pMsg,GPS_DATA_SOCKET);
  189. if(ipStatus != INVALID) sutGpsStatus.IPStatus = ipStatus;
  190. if(tcpControl == 1)
  191. {
  192. //sutGpsStatus.IPStatus=GetIPNewStatus(pMsg,GPS_DATA_SOCKET);
  193. if(sutGpsStatus.IPStatus == CLOSE) sutGpsInfo.isGpsAuthOk=0;//鉴权清掉,再次连接后要重新鉴权
  194. }else if(tcpControl == 0)
  195. {//HGS
  196. if(OPEN == sutGpsStatus.IPStatus)
  197. HgsConnetStatus=1;
  198. }
  199. }
  200. }else if(0==ModemStrCmp(pMsg,"+TCPRECV:")){//+TCPRECV:0,2,31
  201. if(-1 != (targetIndex=FindTargetIndex(pMsg, '\r', ":", 1,1)))
  202. {
  203. tempSocket = atoi(&pMsg[targetIndex]);//找到socket
  204. if(-1 != (targetIndex=FindTargetIndex(pMsg, '\r', ",",1,1)))
  205. {
  206. tempLen = atoi(&pMsg[targetIndex]);
  207. if(-1 != (targetIndex=FindTargetIndex(pMsg, '\r', ",",1,2)))
  208. {
  209. // if(changeDataFormat(&pMsg[targetIndex],tempLen))
  210. // {
  211. // SlwTrace(INF, "DataFormat Err",1);
  212. // return;
  213. // }
  214. if(tempSocket == GPS_DATA_SOCKET)
  215. {
  216. if(tcpControl == 0)
  217. {
  218. Hgs_Data_RecvHandle(&pMsg[targetIndex],tempLen);
  219. }else if(tcpControl == 1)
  220. {
  221. //走布标判断
  222. if(pMsg[targetIndex] == 0x7e && pMsg[targetIndex+tempLen-1] == 0x7e)
  223. {//是布标协议,进行转义
  224. tempLen=reduce((unsigned char *)&pMsg[targetIndex+1], tempLen-1);
  225. MC8332_GPS_RecvHandle((unsigned char *)&pMsg[targetIndex],tempLen);
  226. }else
  227. {
  228. SlwTrace(INF, "Unknown Protocol",1);
  229. }
  230. }
  231. /////////////////////////////////////////
  232. #if 0
  233. tempLen += 2;
  234. if(tempLen > 30) tempLen=30;
  235. for(i=0;i<tempLen;i++)
  236. {
  237. snprintf(bufTemp, sizeof(bufTemp), "%02x", pMsg[targetIndex+i]);
  238. strcat(buf, bufTemp);
  239. }
  240. //strcat(buf, "\r\n");
  241. SlwTrace(INF, buf,1);
  242. #endif
  243. /////////////////////////////////////////
  244. }else if(tempSocket == CONFIG_SER_SOCKET)
  245. {
  246. Hgs_Data_RecvHandle(&pMsg[targetIndex],tempLen);
  247. }
  248. else
  249. {
  250. //if(tempSocket == HGS_SERVER_SOCKET)
  251. //Hgs_Data_RecvHandle(&pMsg[targetIndex]);
  252. }
  253. }
  254. }
  255. }
  256. }else if(0==ModemStrCmp(pMsg,"+TCPOPEN:"))//连接指令返回状态
  257. { //+TCPOPEN:OK
  258. //+TCPOPEN:Already connected
  259. if((pMsg[9] == 'O' && pMsg[10] == 'K') ||
  260. (pMsg[9] == 'A' && pMsg[14] == 'd' && pMsg[23] =='t'))
  261. {
  262. if(tcpControl == 0)
  263. {
  264. HgsConnetStatus=1;
  265. HigosSendFlag=0;
  266. }else if(tcpControl== 1)
  267. {
  268. sutGpsStatus.IPStatus = OPEN;
  269. }else if(tcpControl == 2)
  270. {
  271. #if(USE_CONFIG_FUN==1)
  272. sutConfig.g_ubConfigTcpStatus=1;
  273. #endif
  274. }
  275. }
  276. }else if(0==ModemStrCmp(pMsg, "+TCPCLOSE:OK"))
  277. {
  278. }else if(0==ModemStrCmp(pMsg, "+TCPCLOSE:"))
  279. {//主动关掉或者服务器关掉都是这样
  280. if(tcpControl== 0)
  281. {
  282. if(pMsg[10] == GPS_DATA_SOCKET+0x30)
  283. {
  284. if(HgsConnetStatus != 2)
  285. HgsConnetStatus=0;
  286. }
  287. }else if(tcpControl == 2)
  288. {
  289. #if(USE_CONFIG_FUN==1)
  290. if(sutConfig.g_ubConfigTcpStatus) sutConfig.g_ucTcpRetryNum=CONFIG_TCP_RETRY_CNT;
  291. sutConfig.g_ubConfigTcpStatus = 0;
  292. #endif
  293. }
  294. }else if(0==ModemStrCmp(pMsg, "+CCLK:"))
  295. {//+CCLK: "17/09/28,04:48:35"
  296. //+CCLK: "80/01/06,00:10:44"
  297. //+CCLK: "17/10/19,07:22:35"
  298. g_usModeYTime=atoi(&pMsg[8]);
  299. g_usModemTime=atoi(&pMsg[11]);
  300. g_usModeDTime=atoi(&pMsg[14]);
  301. g_usModeHTime=atoi(&pMsg[17])+8;
  302. if(g_usModeHTime >= 24) g_usModeHTime -= 24;
  303. g_usModeMTime=atoi(&pMsg[20]);
  304. g_usModeSTime=atoi(&pMsg[23]);
  305. SetTime(g_usModeHTime, g_usModeMTime, g_usModeSTime);//保存下来,以便下次启动,没登陆前可以使用本地时间显示
  306. SlwTrace(INF, "UpdateTime",1);
  307. }else if(0==ModemStrCmp(pMsg, "^MODE:"))
  308. {//^MODE: 9 与下面位置不一,模块问题
  309. //^MODE:2 与上面位置不一,模块问题
  310. if(pMsg[6] == ' ') bufTemp[0]=pMsg[7];
  311. else bufTemp[0]=pMsg[6];
  312. snprintf(buf, sizeof(buf), "[Mode %c]", bufTemp[0]);
  313. switch(bufTemp[0])
  314. {
  315. case 0x30:strcat(buf, "No server");break;
  316. case 0x32:strcat(buf, "CDMA Mode");break;
  317. case 0x33:strcat(buf, "GSM");break;
  318. case 0x34:strcat(buf, "TD-SCDMA/EVDO");break;
  319. case 0x35:strcat(buf, "WCDMA");break;
  320. case 0x39:strcat(buf, "LTE");break;
  321. default:strcat(buf, "Unknow");break;
  322. }
  323. SlwTrace(INF, buf, 1);
  324. }else if(0==ModemStrCmp(pMsg, "^MSG:"))
  325. {
  326. if(0==ModemStrCmp(&pMsg[5], "Ready"))
  327. {//升级应用程序已开启
  328. UpdateStatus(MODEM_STATUS_READY);
  329. }else if(0==ModemStrCmp(&pMsg[5], "http:err"))
  330. {//指令执行失败
  331. UpdateStatus(MODEM_STATUS_CMD_VER_ERR);
  332. }else if(0==ModemStrCmp(&pMsg[5], "VerErr"))
  333. {//请求版本号有非数字数据
  334. UpdateStatus(MODEM_STATUS_CMD_VER_ERR);
  335. }else if(0==ModemStrCmp(&pMsg[5], "ver:err"))
  336. {//检查版本错误
  337. UpdateStatus(MODEM_STATUS_CMD_VER_ERR);
  338. }else if(0==ModemStrCmp(&pMsg[5], "nonewver"))
  339. {//没有更新版本
  340. UpdateStatus(MODEM_STATUS_NO_NEWVER);
  341. }else if(0==ModemStrCmp(&pMsg[5], "loading"))
  342. {//开始下载
  343. m_process=0;
  344. UpdateStatus(MODEM_STATUS_LOADING);
  345. }else if(0==ModemStrCmp(&pMsg[5], "HBD:"))
  346. {//正在下在百分比
  347. m_process=atoi(pMsg+9);
  348. UpdateStatus(MODEM_STATUS_LOADING);
  349. }else if(0==ModemStrCmp(&pMsg[5], "Done"))
  350. {//下载完成
  351. UpdateStatus(MODEM_STATUS_DONE);
  352. }else if(0==ModemStrCmp(&pMsg[5], "Installed"))
  353. {//升级完成
  354. UpdateStatus(MODEM_STATUS_INSTALLED);
  355. }else if(0==ModemStrCmp(&pMsg[5], "wget:"))
  356. {
  357. UpdateStatus(MODEM_STATUS_SER_ERR);
  358. }
  359. }else if(0==ModemStrCmp(pMsg, "+POC:START"))
  360. {
  361. sutPocStatus.modemRstFlag=1;
  362. sutPocStatus.ModemInactiveCt=0;//当模块重启后重新计数串口通讯异常计数器
  363. }
  364. }
  365. static char csqSendFlag=1;
  366. void UpdateCsqValue(int csq)
  367. {
  368. static int tCsq[2];
  369. static unsigned char tCsqCt=0;//为了兼容移动联通版本不能查CCSQ问题
  370. char validCsq=0,validcsq=0;
  371. if(csq == 99 ||
  372. (csq >=0 && csq <=31))
  373. {
  374. tCsq[csqSendFlag]=csq;
  375. }
  376. tCsqCt++;
  377. if(csqSendFlag==1||tCsqCt==2)
  378. {//收到了两组CSQ命令值,对比,如果都有效值,取大的值
  379. if(tCsq[0] >=0 && tCsq[0] <=31) validCsq=1;
  380. else if(tCsq[1] >=0 && tCsq[1] <=31) validcsq=1;
  381. else g_iCSQ=99;
  382. if(validCsq&&validcsq)
  383. {
  384. if(tCsq[0]>tCsq[1]) g_iCSQ=tCsq[0];
  385. else g_iCSQ=99;
  386. }else if(validCsq) g_iCSQ=tCsq[0];
  387. else if(validcsq) g_iCSQ=tCsq[1];
  388. tCsqCt=0;
  389. tCsq[0]=99;
  390. tCsq[1]=99;
  391. }
  392. }
  393. /************************************************
  394. 每10ms处理一次
  395. **************************************************/
  396. void GpsTaskTick(unsigned char reset)
  397. {
  398. static unsigned int sucSecCt=0;
  399. static unsigned char sucSteep=0;
  400. static unsigned char sucSynSentCt=0;
  401. unsigned char temp[4];
  402. char buf[55];
  403. int i;
  404. if(reset){
  405. sucSecCt=0;
  406. sucSteep=0;
  407. return;
  408. }
  409. //GPS Uart消息处理
  410. if(g_usUart3RecvLen)
  411. {
  412. process_nema((char *)RxBuffer3);
  413. g_usUart3RecvLen=0;
  414. }
  415. //===========以下控制每秒执行一次============
  416. if(os_time_get() < sucSecCt) return;
  417. sucSecCt=os_time_get()+100;
  418. //////////////////20170112////////////////////
  419. GpsCtrlSendPos();//里面涉及到鉴权,所以得跑起来
  420. //TCP发送防护,如果IPSTATUS一直等于SYN_SENT持续达10秒,则关闭TCP链路
  421. if(sutGpsStatus.IPStatus==SYN_SENT)
  422. {
  423. if(++sucSynSentCt>10){
  424. sucSynSentCt=0;
  425. g_ucModemSentTcpCt=0;
  426. snprintf(buf, sizeof(buf), "AT+TCPCLOSE=%d\r\n",GPS_DATA_SOCKET);
  427. ModemSendAT(buf);
  428. sutGpsStatus.IPStatus=CLOSE;
  429. g_ucModemSentTcpCt=0;
  430. sutGpsInfo.isServerLogin=0;
  431. }
  432. }else sucSynSentCt=0;
  433. //---以下控制---
  434. if(++sucSteep>4)sucSteep=0;
  435. //----
  436. if(sucSteep==0)
  437. {
  438. if(csqSendFlag==1)
  439. {//模块在电信卡的cdma和evdo下使用CCSQ
  440. //其它所有情况使用CSQ
  441. csqSendFlag=0;
  442. ModemSendAT("AT+CSQ\r\n");
  443. }else{
  444. csqSendFlag=1;
  445. ModemSendAT("AT+CCSQ\r\n");
  446. }
  447. snprintf(buf, sizeof(buf), "[ATH]%d,[GPS]%d,[BAT]%0.2f,[TICK]%d,%d,[CSQ]%d",
  448. sutGpsInfo.isGpsAuthOk,
  449. sutGpsInfo.isGpsValid,
  450. (double)g_iVbat/100,
  451. os_time_get(),
  452. sutGpsInfo.GPS_SecondCnt,
  453. g_iCSQ);
  454. SlwTrace(INF,buf,1);
  455. }
  456. else if(1==sucSteep)
  457. {
  458. ModemSendAT("AT+POC_PPP\r\n");
  459. }else if(2==sucSteep)
  460. {
  461. if(99==g_iCSQ)return;
  462. if(sutGpsStatus.PPPStatus==OPEN){
  463. snprintf(buf, sizeof(buf), "AT+TCPSTATUS=%d\r\n", GPS_DATA_SOCKET);
  464. ModemSendAT(buf);
  465. }else{
  466. SlwTrace(INF, "Wait POC_PPP",1);
  467. }
  468. }else if(3==sucSteep)
  469. {
  470. if(99==g_iCSQ) return;
  471. if(sutGpsInfo.isGpsWork==0)
  472. {
  473. if(sutGpsStatus.CheckCnt < 50)
  474. {
  475. if(++sutGpsStatus.CheckCnt >= 2)
  476. {
  477. sutGpsStatus.CheckCnt = NO_GPS_CHECK_TIMEOUT;//设置为此值时认为是没有GPS机型
  478. }
  479. }
  480. SlwTrace(INF,"GPS modem not work!",1);
  481. }
  482. if(sutGpsStatus.IPStatus!=OPEN && sutGpsStatus.PPPStatus==OPEN)
  483. {
  484. if(tcpControl == 1)
  485. {//当控制为GPS时才去连接
  486. sutGpsInfo.isServerLogin=0;
  487. snprintf(buf, sizeof(buf),"AT+TCPOPEN=%d,%s:%d\r\n",GPS_DATA_SOCKET,sutProductPara.GIP,sutProductPara.GpsPort);
  488. SlwTrace(INF,buf,0);
  489. ModemSendAT(buf);
  490. }
  491. }
  492. }else if(4==sucSteep)
  493. {
  494. if(99==g_iCSQ)return;
  495. if(sutGpsStatus.IPStatus==OPEN && 0==sutGpsInfo.isServerLogin)
  496. {
  497. sutGpsInfo.isServerLogin = OPEN;
  498. }
  499. }
  500. }
  501. //void UpdateNetValue(char*pMsg)
  502. //{
  503. //
  504. //}