优化4G 复位
This commit is contained in:
parent
c072999dd7
commit
23d0d8d80e
@ -25,6 +25,7 @@ static long long connect_lost_time = 0; //ms
|
|||||||
static long long connect_time = 0; //ms
|
static long long connect_time = 0; //ms
|
||||||
|
|
||||||
Dial dial;
|
Dial dial;
|
||||||
|
int fd = -1;
|
||||||
|
|
||||||
void CheckThread()
|
void CheckThread()
|
||||||
{
|
{
|
||||||
@ -126,7 +127,15 @@ void CheckThread()
|
|||||||
iRet = data_publish(str2.c_str(), GlobalConfig::Topic_G.mPubCmd.c_str());
|
iRet = data_publish(str2.c_str(), GlobalConfig::Topic_G.mPubCmd.c_str());
|
||||||
if(iRet != 0 )
|
if(iRet != 0 )
|
||||||
{
|
{
|
||||||
LOG_ERROR("MQTT connect failed ,time check\n");
|
LOG_ERROR("MQTT connect failed ,time check\n");
|
||||||
|
#ifdef Q4G_MODULE
|
||||||
|
if(fd){
|
||||||
|
LOG_ERROR("MQTT connect failed ,4G Module\n");
|
||||||
|
write_data(fd,"AT+CFUN=1,1\r\n",15);
|
||||||
|
system("reboot");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef IMX6UL_GATEWAY
|
#ifdef IMX6UL_GATEWAY
|
||||||
char connect[10]={0x00};
|
char connect[10]={0x00};
|
||||||
readStringValue("config", "connect",connect,(char*)GlobalConfig::Config_G.c_str());
|
readStringValue("config", "connect",connect,(char*)GlobalConfig::Config_G.c_str());
|
||||||
@ -567,7 +576,7 @@ open5G:
|
|||||||
#endif
|
#endif
|
||||||
#ifdef Q4G_MODULE
|
#ifdef Q4G_MODULE
|
||||||
//4G
|
//4G
|
||||||
int fd = -1;
|
|
||||||
open4G:
|
open4G:
|
||||||
fd = config_uart("/dev/ttyUSB2",115200);
|
fd = config_uart("/dev/ttyUSB2",115200);
|
||||||
if (fd < 0){
|
if (fd < 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user