I have just received the above device and have it working on my Lora Server.
I am however not able to decode the “data” field as per below
- data:“BAAKAorL2UESn36/QQ==”
Is there documentation available that explains the format of the data packet?
I have just received the above device and have it working on my Lora Server.
I am however not able to decode the “data” field as per below
Is there documentation available that explains the format of the data packet?
Found it!
Here it is:
#####################################################
hru3601a
#####################################################
unsigned char *puc;
appDataSize = 0;
appData[appDataSize++]=0x04;
appData[appDataSize++]=0x00;
appData[appDataSize++]=0x0A;
appData[appDataSize++]=0x02;
puc = (unsigned char *)(&flash_lorawan_para.temp);
appData[appDataSize++] = puc[0];
appData[appDataSize++] = puc[1];
appData[appDataSize++] = puc[2];
appData[appDataSize++] = puc[3];
appData[appDataSize++]=0x12;
puc = (unsigned char *)(&flash_lorawan_para.hum);
appData[appDataSize++] = puc[0];
appData[appDataSize++] = puc[1];
appData[appDataSize++] = puc[2];
appData[appDataSize++] = puc[3];
#####################################################
hru3601b
#####################################################
//传感器id 2byteS
appData[appDataSize++]=0x0b;
appData[appDataSize++]=0x00;
//数据总长 1bytes
appData[appDataSize++]=0x06;
// tvoc数据包 id4bit 数据类型 4bits 有效数据总长 1bytes 数据
appData[appDataSize++]=0x07;
puc = (unsigned char *)(&flash_lorawan_para.tvoc);
appData[appDataSize++] = puc[0];
appData[appDataSize++] = puc[1];
//co2 数据包 id4bit 数据类型 4bits 有效数据总长 1bytes 数据
appData[appDataSize++]=0x17;
puc = (unsigned char *)(&flash_lorawan_para.co2);
appData[appDataSize++] = puc[0];
appData[appDataSize++] = puc[1];