1、位移监测传感器上传参数修改
2、CatOneTask兼容新版4G模块 3、完善传感器类型SensorType_m结构
This commit is contained in:
@@ -28,6 +28,26 @@ static uint16_t CatSendErrCnt = 0;
|
||||
|
||||
#define CATONE_RESET_DELAY_TIME_MAX (5 * 60 * 1000)
|
||||
|
||||
//const char *CatOneATCmdStr[16] = {
|
||||
// "NULL",
|
||||
// "AT\r\n", //开机检测
|
||||
// "ATE0\r\n", //关回显
|
||||
// "AT+CPIN?\r\n", //识卡
|
||||
//// "AT+CIMI\r\n", //IMEI
|
||||
// "AT+CGSN=1\r\n",
|
||||
// "AT+LCCID\r\n", //读卡号
|
||||
// "AT+CEREG?\r\n", //查询注册状态
|
||||
// "AT+CGPADDR=1\r\n", //查询IP地址
|
||||
// "AT+CSQ\r\n", //查询信号强度
|
||||
// "AT+LDNSGIP=gxjt.cui635.cn\r\n",
|
||||
// "AT+LBS=0\r\n", //获取基站定位信息
|
||||
// "AT+LIPOPEN=", //设置TCP服务器地址和端口,AT+LIPOPEN="TCP","114.55.52.96",6803
|
||||
// "AT+LIPSEND=", //发送数据, AT+LIPSEND=0,1,20,"31313131313131323232323232"
|
||||
// "AT+LIPCLOSE=0\r\n",//断开连接
|
||||
// "AT+LBSPARA=http://locator-aep.xiot.senthink.com:80/locator/v0.1/locate,B84E427D95B1DF4A3F49B18DDF714C72\r\n",
|
||||
// "AT+CCLK?\r\n", //获取时间
|
||||
//};
|
||||
|
||||
const char *CatOneATCmdStr[16] = {
|
||||
"NULL",
|
||||
"AT\r\n", //开机检测
|
||||
@@ -35,17 +55,18 @@ const char *CatOneATCmdStr[16] = {
|
||||
"AT+CPIN?\r\n", //识卡
|
||||
// "AT+CIMI\r\n", //IMEI
|
||||
"AT+CGSN=1\r\n",
|
||||
"AT+LCCID\r\n", //读卡号
|
||||
"AT+QCCID\r\n", //读卡号
|
||||
"AT+CEREG?\r\n", //查询注册状态
|
||||
"AT+CGPADDR=1\r\n", //查询IP地址
|
||||
"AT+CSQ\r\n", //查询信号强度
|
||||
"AT+LDNSGIP=gxjt.cui635.cn\r\n",
|
||||
"AT+LBS=0\r\n", //获取基站定位信息
|
||||
"AT+LIPOPEN=", //设置TCP服务器地址和端口,AT+LIPOPEN="TCP","114.55.52.96",6803
|
||||
"AT+LIPSEND=", //发送数据, AT+LIPSEND=0,1,20,"31313131313131323232323232"
|
||||
"AT+LIPCLOSE=0\r\n",//断开连接
|
||||
"AT+LBSPARA=http://locator-aep.xiot.senthink.com:80/locator/v0.1/locate,B84E427D95B1DF4A3F49B18DDF714C72\r\n",
|
||||
"AT+CCLK?\r\n", //获取时间
|
||||
"AT+QLBS\r\n", //获取基站定位信息
|
||||
"AT+QIOPEN=", //设置TCP服务器地址和端口,AT+LIPOPEN="TCP","114.55.52.96",6803
|
||||
"AT+QISEND=", //发送数据, AT+LIPSEND=0,1,20,"31313131313131323232323232"
|
||||
"AT+QICLOSE=0\r\n",//断开连接
|
||||
"AT+QLBSCFG=\"server\",http://locator-aep.xiot.senthink.com:80/locator/v0.1/locate\r\n",
|
||||
"AT+QLBSCFG=\"token\",45B516D3078467E84DD2CFBF3532A4CB\r\n",
|
||||
"AT+CCLK?\r\n", //获取时间
|
||||
};
|
||||
|
||||
void Cat1DBGOnOff(bool OnOff)
|
||||
@@ -213,22 +234,22 @@ void CatOneAtCmdAnalyze(char *RxBuff)
|
||||
if(strstr(RxBuff, "OK") == NULL) {
|
||||
CatOne.ATCmdRet = CAT_ONE_RET_ERR;
|
||||
}
|
||||
p = strstr(RxBuff, "+LCCID");
|
||||
p = strstr(RxBuff, "+QCCID");
|
||||
if(p == NULL) {
|
||||
CatOne.ATCmdRet = CAT_ONE_RET_ERR;
|
||||
}
|
||||
memset(CatOne.SIM, 0, 32);
|
||||
ret = sscanf(p, "+LCCID: %s\r\n", CatOne.SIM);
|
||||
ret = sscanf(p, "+QCCID: %s\r\n", CatOne.SIM);
|
||||
if(ret != 1) {
|
||||
memset(CatOne.SIM, 0, 32);
|
||||
}
|
||||
break;
|
||||
|
||||
case CAT_ONE_LBS:
|
||||
p = strstr(RxBuff, "+LBS");
|
||||
p = strstr(RxBuff, "+QLBS");
|
||||
if(p != NULL) {
|
||||
double Longitude, Latitude;
|
||||
int ret = sscanf(p, "+LBS: %lf,%lf\r\n", &Longitude, &Latitude);
|
||||
int ret = sscanf(p, "+QLBS: %lf,%lf\r\n", &Longitude, &Latitude);
|
||||
if(ret == 2) {
|
||||
CatOne.LBSFlag = true;
|
||||
CatOne.Longitude = Longitude * 100000;
|
||||
|
||||
Reference in New Issue
Block a user