diff --git a/common/global.hpp b/common/global.hpp index 0f9d618..ec1f193 100644 --- a/common/global.hpp +++ b/common/global.hpp @@ -18,10 +18,10 @@ enum enumZigBeeTransmitStatus { //#define NR5G_MODULE -//#define Q4G_MODULE +#define Q4G_MODULE //#define WIFI_MODULE //#define NR5G_MEIGE -#define BLUETEETH_MODULE +//#define BLUETEETH_MODULE class GlobalConfig diff --git a/uart/uart.cpp b/uart/uart.cpp index 20ffc86..db96d9c 100644 --- a/uart/uart.cpp +++ b/uart/uart.cpp @@ -1328,6 +1328,13 @@ int Uart::FindRecvPackage(int bytesRead, char *mUartRecvBuf, char *head) { memcpy(RecvBuf, &UartRecvBuf[i], 100); if (!CheckCrc(RecvBuf, 99)) { zlog_warn(zct, "CheckCrc error ShortAddr :%s command = %d ", strShortAddr.c_str(), command); + char tmp[10] = {0x00}; + char tmp2[10] = {0x00}; + for (int j = 0; j < 100; j++) { + sprintf(tmp, "%02x ", UartRecvBuf[i + j] & 0xff); + strcat(tmp2, tmp); + } + zlog_warn(zct, " crc error str = %s", tmp2); break; } }