diff --git a/APP_Framework/Framework/connection/4g/ec200t/ec200t.c b/APP_Framework/Framework/connection/4g/ec200t/ec200t.c index 7f9ba7132..47e0ff525 100644 --- a/APP_Framework/Framework/connection/4g/ec200t/ec200t.c +++ b/APP_Framework/Framework/connection/4g/ec200t/ec200t.c @@ -163,8 +163,8 @@ static int Ec200tIoctl(struct Adapter *adapter, int cmd, void *args) serial_cfg.serial_parity_mode = PARITY_NONE; serial_cfg.serial_bit_order = STOP_BITS_1; serial_cfg.serial_invert_mode = NRZ_NORMAL; - //serial receive timeout 1s - serial_cfg.serial_timeout = 1000; + //serial receive timeout 0.6s + serial_cfg.serial_timeout = 600; serial_cfg.is_ext_uart = 0; #ifdef ADAPTER_EC200T_DRIVER_EXT_PORT serial_cfg.is_ext_uart = 1; diff --git a/Ubiquitous/XiZi_IIoT/tool/bootloader/ota/ota.c b/Ubiquitous/XiZi_IIoT/tool/bootloader/ota/ota.c index e8a9d0ad2..e3d68c643 100644 --- a/Ubiquitous/XiZi_IIoT/tool/bootloader/ota/ota.c +++ b/Ubiquitous/XiZi_IIoT/tool/bootloader/ota/ota.c @@ -738,8 +738,8 @@ SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHE #ifdef OTA_BY_PLATFORM -#define FRAME_LEN 256 //每帧数据的数据包长度 -static uint8_t MqttRxbuf[512]; +#define FRAME_LEN 1024 //每帧数据的数据包长度 +static uint8_t MqttRxbuf[2048]; static uint8_t FrameBuf[FRAME_LEN]; static OTA_TCB AliOTA; /******************************************************************************* @@ -806,7 +806,7 @@ static void app_ota_by_platform(void) while(1) { memset(MqttRxbuf,0,sizeof(MqttRxbuf)); - datalen = MQTT_Recv(MqttRxbuf, 512); + datalen = MQTT_Recv(MqttRxbuf, sizeof(MqttRxbuf)); if(datalen > 0 && (MqttRxbuf[0] == 0x30)) { MQTT_DealPublishData(MqttRxbuf, datalen); @@ -879,7 +879,7 @@ static void app_ota_by_platform(void) ota_info.down.crc32= calculate_crc32(DOWN_FLAH_ADDRESS, AliOTA.size); memset(ota_info.down.version,0,sizeof(ota_info.down.version)); - create_version(ota_info.os.version, ota_info.down.version); + strncpy(ota_info.down.version, AliOTA.version, sizeof(ota_info.down.version)); memset(ota_info.down.description,0,sizeof(ota_info.down.description)); strncpy(ota_info.down.description, "MQTT OTA bin.",sizeof(ota_info.down.description)); diff --git a/Ubiquitous/XiZi_IIoT/tool/mqtt/aliyun_mqtt.h b/Ubiquitous/XiZi_IIoT/tool/mqtt/aliyun_mqtt.h index baad5e4a6..f44517c90 100644 --- a/Ubiquitous/XiZi_IIoT/tool/mqtt/aliyun_mqtt.h +++ b/Ubiquitous/XiZi_IIoT/tool/mqtt/aliyun_mqtt.h @@ -30,8 +30,8 @@ #define SERVERIP "101.133.196.127" #define SERVERPORT "1883" -#define PACK_SIZE 512 //存放报文数据缓冲区大小 -#define CMD_SIZE 512 //保存推送的PUBLISH报文中的数据缓冲区大小 +#define PACK_SIZE 512 //存放报文数据缓冲区大小 +#define CMD_SIZE 2048 //保存推送的PUBLISH报文中的数据缓冲区大小 typedef struct{ uint8_t Pack_buff[PACK_SIZE]; //存放发送报文数据缓冲区