The following is the Telnet protocol for direct communication protocol to the specified products listed below:

  1. Data exchange format

Fixed header, CMD, SIZE, DATA1, DATA2, … , DATAn, CHECKSUM

Fixed header: 2 bytes, header is fixed as 0xffff

CMD: 1 byte, Command

SIZE: 1 byte, packet size,counted from CMD till CHECKSUM

DATA: n bytes, payloads,variable length

CHECKSUM: 1 byte, CHECKSUM=CMD+SIZE+DATA1+DATA2+…+DATAn

  • Command and data structure definition:

typedef  enum  {

//

CMD_WRITE_SSID                                                                 = 0x11,// send SSID and Password to WIFI module

CMD_BROADCAST                                                = 0x12,// UDP cast for device echo,answer back data size is 2 Bytes

CMD_READ_ECOWITT                                                          = 0x1E,// read aw.net setting

CMD_WRITE_ ECOWITT                                                       = 0x1F, //write back awt.net setting

CMD_READ_WUNDERGROUND                        = 0x20,// read Wunderground setting

CMD_WRITE_WUNDERGROUND                       = 0x21, //write back Wunderground setting

CMD_READ_WOW                                                                 = 0x22, // read WeatherObservationsWebsite setting

CMD_WRITE_WOW                                                                = 0x23, // write back WeatherObservationsWebsite setting

CMD_READ_WEATHERCLOUD                          = 0x24,// read Weathercloud setting

CMD_WRITE_WEATHERCLOUD                         = 0x25, //write back Weathercloud setting

CMD_READ_SATION_MAC                                  = 0x26,// read MAC address

CMD_READ_CUSTOMIZED                 = 0x2A,// read Customized sever setting

CMD_WRITE_CUSTOMIZED                = 0x2B, // write back Customized sever setting

CMD_WRITE_UPDATE                                                           = 0x43,// firmware upgrade

CMD_READ_FIRMWARE_VERSION = 0x50,// read current firmware version number

CMD_READ_USR_PATH                       = 0x51,

CMD_WRITE_USR_PATH                     = 0x52,

// the following command is only valid for GW1000, WH2650 and wn1900支持:

CMD_GW1000_LIVEDATA                                   = 0x27, // read current data,reply data size is 2bytes.

             CMD_GET_SOILHUMIAD                                 = 0x28,// read Soilmoisture Sensor calibration parameters

             CMD_SET_SOILHUMIAD                                                 = 0x29, // write back Soilmoisture Sensor calibration parameters

CMD_GET_MulCH_OFFSET                                                = 0x2C, // read multi channel sensor offset value

CMD_SET_MulCH_OFFSET                                = 0x2D, // write back  multi channel sensor OFFSET value

CMD_GET_PM25_OFFSET                                  = 0x2E, // read PM2.5OFFSET calibration data

CMD_SET_PM25_OFFSET                                  = 0x2F, // writeback PM2.5OFFSET calibration data

             CMD_READ_SSSS                                                                            = 0x30,// read system info

             CMD_WRITE_SSSS                                                                           = 0x31,// write back system info

             CMD_READ_RAINDATA                                                   = 0x34,// read rain data

             CMD_WRITE_RAINDATA                                                  = 0x35, // write back rain data

             CMD_READ_GAIN                                                                             = 0x36, // read rain gain

             CMD_WRITE_GAIN                                                                            = 0x37, // write back rain gain

             CMD_READ_CALIBRATION                             = 0x38,// read sensor set offset calibration value

             CMD_WRITE_CALIBRATION                                           = 0x39,// write back  sensor set offset value

             CMD_READ_SENSOR_ID               = 0x3A,// read Sensors ID

CMD_WRITE_SENSOR_ID                 = 0x3B, // write back Sensors ID

CMD_READ_SENSOR_ID_NEW        = 0x3C,//// this is reserved for newly added sensors

             CMD_WRITE_REBOOT                                                     = 0x40,// system restart

             CMD_WRITE_RESET                                                        = 0x41,// reset to default

}CMD_LT;

//********************************************************************************************

#define SOIL_CH_MAX                                       8

#define WH31_CHANNEL                                              8

#define PM25_CH_MAX             4

#define LEAK_CH_MAX             4

typedef enum

{                           

    //eWH24_SENSOR = 0x00,

    eWH65_SENSOR = 0x00,

    //eWH69_SENSOR,

    eWH68_SENSOR,

    eWH80_SENSOR,  //80H(

    eWH40_SENSOR,

    eWH25_SENSOR,

    eWH26_SENSOR,

    eWH31_SENSORCH1,

    eWH31_SENSORCH2,

    eWH31_SENSORCH3,

    eWH31_SENSORCH4,

    eWH31_SENSORCH5,

    eWH31_SENSORCH6,

    eWH31_SENSORCH7,

    eWH31_SENSORCH8,

    eWH51_SENSORCH1,

    eWH51_SENSORCH2,

    eWH51_SENSORCH3,

    eWH51_SENSORCH4,

    eWH51_SENSORCH5,

    eWH51_SENSORCH6,

    eWH51_SENSORCH7,

    eWH51_SENSORCH8,

    eWH41_SENSORCH1,

    eWH41_SENSORCH2,

    eWH41_SENSORCH3,

    eWH41_SENSORCH4,

    //————-

    eWH57_SENSOR,

    eWH55_SENSORCH1,

    eWH55_SENSORCH2,

    eWH55_SENSORCH3,

eWH55_SENSORCH4,  

    eWH34_SENSORCH1 = 31,

    eWH34_SENSORCH2 = 32,

    eWH34_SENSORCH3 = 33,

    eWH34_SENSORCH4 = 34,

    eWH34_SENSORCH5 = 35,

    eWH34_SENSORCH6 = 36,

    eWH34_SENSORCH7 = 37,

    eWH34_SENSORCH8 = 38,

    // the sensor sequence can not be altered!!

    //————-

    eMAX_SENSOR

}SENSOR_IDT;

//——————————————————————————————————————————————–

#define ITEM_INTEMP                                                    0x01//Indoor Temperature (℃)                                                          2

#define ITEM_OUTTEMP                                                                0x02//Outdoor Temperature (℃)                                       2

#define ITEM_DEWPOINT                                              0x03//Dew point (℃)                                                                                         2

#define ITEM_WINDCHILL                                             0x04//Wind chill (℃)                                                                                         2

#define ITEM_HEATINDEX                                             0x05//Heat index (℃)                                                                          2

#define ITEM_INHUMI                                                     0x06//Indoor Humidity (%)                                                                  1

#define ITEM_OUTHUMI                                                 0x07//Outdoor Humidity (%)                                                               1

#define ITEM_ABSBARO                                                                0x08//Absolutely Barometric (hpa)                                   2

#define ITEM_RELBARO                                                0x09//Relative Barometric (hpa)                                       2

#define ITEM_WINDDIRECTION                   0x0A//Wind Direction (360°)                                                              2

#define ITEM_WINDSPEED                                           0x0B//Wind Speed (m/s)                                                                     2

#define ITEM_GUSTSPEED                                           0x0C//Gust Speed (m/s)                                                                     2

#define ITEM_RAINEVENT                                            0x0D//Rain Event (mm)                                                                      2

#define ITEM_RAINRATE                                                               0x0E//Rain Rate (mm/h)                                                                  2

#define ITEM_RAINHOUR                                              0x0F//Rain hour (mm)                                                                         2

#define ITEM_RAINDAY                                                  0x10//Rain Day (mm)                                                                          2

#define ITEM_RAINWEEK                                              0x11//Rain Week (mm)                                                                       2

#define ITEM_RAINMONTH                                           0x12//Rain Month (mm)                                                                      4

#define ITEM_RAINYEAR                                                               0x13//Rain Year (mm)                                                                      4

#define ITEM_RAINTOTALS                                           0x14//Rain Totals (mm)                                                                       4

#define ITEM_LIGHT                                                        0x15//Light (lux)                                                                                   4

#define ITEM_UV                                                                              0x16//UV (uW/m2)                                                                                            2

#define ITEM_UVI                                                                             0x17//UVI (0-15 index)                                                                     1

#define ITEM_TIME                                                                          0x18//Date and time                                                                                         6

#define ITEM_DAYLWINDMAX                                      0X19//Day max wind(m/s)                                                                  2

#define ITEM_TEMP1                                                      0x1A//Temperature 1(℃)                                                                    2

#define ITEM_TEMP2                                                      0x1B//Temperature 2(℃)                                                                    2

#define ITEM_TEMP3                                                      0x1C//Temperature 3(℃)                                                                    2

#define ITEM_TEMP4                                                      0x1D//Temperature 4(℃)                                                                    2

#define ITEM_TEMP5                                                      0x1E//Temperature 5(℃)                                                                    2

#define ITEM_TEMP6                                                      0x1F//Temperature 6(℃)                                                                    2

#define ITEM_TEMP7                                                      0x20//Temperature 7(℃)                                                                    2

#define ITEM_TEMP8                                                      0x21//Temperature 8(℃)                                                                    2

#define ITEM_HUMI1                                                       0x22//Humidity 1, 0-100%                                                                  1

#define ITEM_HUMI2                                                       0x23//Humidity 2, 0-100%                                                                  1

#define ITEM_HUMI3                                                       0x24//Humidity 3, 0-100%                                                                  1

#define ITEM_HUMI4                                                       0x25//Humidity 4, 0-100%                                                                  1

#define ITEM_HUMI5                                                       0x26//Humidity 5, 0-100%                                                                  1

#define ITEM_HUMI6                                                       0x27//Humidity 6, 0-100%                                                                  1

#define ITEM_HUMI7                                                       0x28//Humidity 7, 0-100%                                                                  1

#define ITEM_HUMI8                                                       0x29//Humidity 8, 0-100%                                                                  1

#define ITEM_PM25_CH1                                              0x2A//PM2.5 Air Quality Sensor(μg/m3)                          2

#define ITEM_SOILTEMP1                                             0x2B//Soil Temperature(℃)                                                               2

#define ITEM_SOILMOISTURE1                   0x2C//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP2                                             0x2D//Soil Temperature(℃)                                                               2

#define ITEM_SOILMOISTURE2                   0x2E//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP3                                             0x2F//Soil Temperature(℃)                                                                2

#define ITEM_SOILMOISTURE3                   0x30//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP4                                             0x31//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE4                   0x32//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP5                                             0x33//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE5                   0x34//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP6                                             0x35//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE6                   0x36//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP7                                             0x37//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE7                   0x38//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP8                                             0x39//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE8                   0x3A//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP9                                             0x3B//Soil Temperature(℃)                                                               2

#define ITEM_SOILMOISTURE9                   0x3C//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP10                                           0x3D//Soil Temperature(℃)                                                               2

#define ITEM_SOILMOISTURE10                 0x3E//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP11                                           0x3F//Soil Temperature(℃)                                                                2

#define ITEM_SOILMOISTURE11                 0x40//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP12                                           0x41//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE12                 0x42//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP13                                           0x43//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE13                 0x44//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP14                                           0x45//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE14                 0x46//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP15                                           0x47//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE15                 0x48//Soil Moisture(%)                                                                       1

#define ITEM_SOILTEMP16                                           0x49//Soil Temperature(℃)                                                2

#define ITEM_SOILMOISTURE16                 0x4A//Soil Moisture(%)                                                                       1

#define ITEM_LOWBATT                                                 0x4C//All sensor lowbatt 16 char                                      16

#define ITEM_PM25_24HAVG1                    0x4D//for pm25_ch1                                                                                           2

#define ITEM_PM25_24HAVG2                    0x4E//for pm25_ch2                                                                                            2

#define ITEM_PM25_24HAVG3                    0x4F//for pm25_ch3                                                                                            2

#define ITEM_PM25_24HAVG4                    0x50//for pm25_ch4                                                                                            2

#define ITEM_PM25_CH2                                              0x51//PM2.5 Air Quality Sensor(μg/m3)                          2

#define ITEM_PM25_CH3                                              0x52//PM2.5 Air Quality Sensor(μg/m3)                          2

#define ITEM_PM25_CH4                                              0x53//PM2.5 Air Quality Sensor(μg/m3)                          2

#define ITEM_LEAK_CH1           0x58//for Leak_ch1                          1

#define ITEM_LEAK_CH2           0x59//for Leak_ch2                          1

#define ITEM_LEAK_CH3           0x5A//for Leak_ch3                          1

#define ITEM_LEAK_CH4           0x5B//for Leak_ch4                          1

#define ITEM_LIGHTNING          0x60 // lightning distance (1~40KM)          1

#define ITEM_LIGHTNING_TIME     0x61// lightning happened time(UTC)           4

#define ITEM_LIGHTNING_POWER    0x62// lightning counter for the ay            4

#define ITEM_TF_USR1         0x63//Temperature(℃)                                                                                        4

#define ITEM_TF_USR2         0x64//Temperature(℃)                                                                                  4

#define ITEM_TF_USR3         0x65//Temperature(℃)                                                                                  4

#define ITEM_TF_USR4         0x66//Temperature(℃)                                                                                  4

#define ITEM_TF_USR5         0x67//Temperature(℃)                                                                                  4

#define ITEM_TF_USR6         0x68//Temperature(℃)                                                                                  4

#define ITEM_TF_USR7         0x69//Temperature(℃)                                                                                  4

#define ITEM_TF_USR8         0x6A//Temperature(℃)                                                                                  4

//the data packet in this sequence, and it should be followed strictly this data sequence

#define ITEM_SENSOR_CO2         0x70                                                                                                                        16

/* ——————Ecowitt—————–

  1 tf_co2           short               C         x10

  2 humi_co2         unsigned char         %        

  3 pm10_co2         unsigned short      ug/m3      x10

  4 pm10_24h_co2     unsigned short      ug/m3      x10

  5 pm25_co2         unsigned short      ug/m3      x10

  6 pm25_24h_co2     unsigned short      ug/m3      x10

  7 co2              unsigned short      ppm       

  8 co2_24h          unsigned short      ppm       

  9 co2_batt         u8                 (0~5) 

  ——————————————– */

//——————————————————————————————————————————————–

#if 1

typedef union //1 low bat  0 bat normal

{

             unsigned char batt;

             struct

             {

                             unsigned char wh41                           : 4; /* bit 0~3 */ // 0~5

                             unsigned char wh40                            : 1; /* bit 4 */

                             unsigned char wh26                            : 1; /* bit 5 */

                             unsigned char wh25                            : 1; /* bit 6 */

                             unsigned char wh24                            : 1; /* bit 7 */ //65, 69

             } bits;

} _sig_sen;

typedef union //1 low batt  0 batt normal

{

             unsigned char batt;

             Struct {                  

                             unsigned char   ch1  : 1;     /* bit 0 */

                             unsigned char   ch2  : 1;     /* bit 1 */

                             unsigned char   ch3  : 1;     /* bit 2 */

                             unsigned char   ch4  : 1;     /* bit 3 */

                             unsigned char   ch5  : 1;     /* bit 4 */

                             unsigned char   ch6  : 1;     /* bit 5 */

                             unsigned char   ch7  : 1;     /* bit 6 */

         unsigned char   ch8  : 1;         /* bit 7 */

             } bits;

} _wh31_ch;

typedef union //val

{

             unsigned short batt;

             struct      {

                             unsigned char ch1               : 4;/* bit 0~3   */ // 0~5

                             unsigned char ch2               : 4;/* bit 4~7   */ // 0~5

                             unsigned char ch3               : 4;/* bit 8~11  */ // 0~5                      

                             unsigned char ch4               : 4;/* bit 12~15 */ // 0~5

             } bits;   

} _wh41_ch;

typedef union //1 low 0 normal

{

             unsigned short  batt;

             struct      {

         unsigned char   ch1  : 1;         /* bit 0 */

                             unsigned char   ch2  : 1;     /* bit 1 */

                             unsigned char   ch3  : 1;     /* bit 2 */

                             unsigned char   ch4  : 1;     /* bit 3 */

                             unsigned char   ch5  : 1;     /* bit 4 */

                             unsigned char   ch6  : 1;     /* bit 5 */

                             unsigned char   ch7  : 1;     /* bit 6 */

         unsigned char   ch8  : 1;         /* bit 7 */

         unsigned char   ch9   : 1;        /* bit 8  */

                             unsigned char   ch10  : 1;   /* bit 9  */

                             unsigned char   ch11  : 1;   /* bit 10 */

                             unsigned char   ch12  : 1;   /* bit 11 */

                             unsigned char   ch13  : 1;   /* bit 12 */

                             unsigned char   ch14  : 1;   /* bit 13 */

                             unsigned char   ch15  : 1;   /* bit 14 */

        unsigned char   ch16  : 1;        /* bit 15 */

             } word;

} _wh51_ch;

// battery voltage and low battery correlation

typedef union _sensor_batt

{

             unsigned char all_batt[16];

             // represented with battery voltage

             struct

{

 _sig_sen single;

                             _wh31_ch wh31;

                             _wh51_ch wh51;

        unsigned char wh57; // 0~5

                             unsigned char wh68; // 0.02V * val(received val) = wh68(current voltage);

                             unsigned char wh80; // 0.02V * val(received val) = wh80(current voltage);

        unsigned char wh45; // 0~5

        _wh41_ch wh41;      // batter level 0~5, <=1 for low battery

        unsigned char wh55[LEAK_CH_MAX]; //

             } val;

} sensor_batt;//

#endif

 //V1.5.9 introduced:

unsigned char wh34[TF_CH_MAX];//0.02V * val(received val) = wh34( current voltage);

//——————————————————————————————————————————————–

  • Wi-Fi configuration and looking for device within the local network

Wifi configuration 1 : APP side use took port 49123 and setup a TCP Server.  WIFI module side works with station+AP mode and setup a TCP Client to be connected with APP side server. If WIFI module connected successfully to APP side TCP server,  APP side TCP Server send CMD_WRITE_SSID command!

Wifi configuration 2: WIFI module works at station+AP mode, and setup a TCP Server at port 45000, waiting APP side for connection. When APP side connected to WIFI moule’s TCP Server,CMD_WRITE_SSID can be issued.

DescriptionLength(Bytes)Note
Fixed header2Fixed as  0xffff
CMD_WRITE_SSID10x11
Size1Packet size
SSID Size1SSID length
SSIDnMax 32
Password Size1Password length
PasswordnMax 64
Checksum1Checksum

WIFI answer back:

descriptionlength(byte)notes
Fixed header2Fixed as 0xffff
CMD_WRITE_SSID10x11
Size1Packet size
Result10x00: set success,0x01: set fail
Checksum1checksum

When console and APP device are on the same WLAN network, connected to a same router, APP side will send a command via UDP casting, after this command received, console wifi will reply back its MAC, IP, Port and AP’s SSID to APP device side. ( port 46000).

DescriptionLengthNotes
Fixed header2Fixed as 0xffff
CMD_BROADCAST10x12
Size1Packet size
Checksum1Checksum

WIFI replied:

DescriptionLengthNotes
Fixed header2Fixed as 0xffff
CMD_BROADCAST10x12
Size2Packet size (size is 2 Bytes)
MAC6Wifi module STA MAC
IP11Eg. 192.168.100.1中的192
IP21Eg. 192.168.100.1中的168
IP31Eg. 192.168.100.1中的100
IP41Eg. 192.168.100.1中的1
Port11Eg. 0x1194(45000)中的0x11
Port21Eg. 0x1194(45000)中的0x94
AP SSIDnWifi module’s AP SSID
Checksum1checksum

Console WIFI module setup TCP server at port 45000, waiting for APP side to be connected. If connection established, use the following command:

  1. Read ambietweather.net setting
DescriptionLengthNotes
Fixed header2Fixed as 0xffff
CMD_READ_ECOWITT10x1E
Size1Packet size
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2Fixed as 0xffff
CMD_READ_ECOWITT10x1E
Size1Packet size
Uplaod interval10~5min (0: mean is OFF)
Checksum1checksum
  • Rewrite ambientweatehr.net  setting                    
DescriptionLengthNotes
Fixed header2Fixed as 0xffff
CMD_WRITE_ECOWITT10x1F
Size1Packet size
Uplaod interval10~5min (0: mean is OFF)
Checksum1checksum

Console WIFI module return data:

DescriptionLengthNotes
Fixed header2Fixed as 0xffff
CMD_WRITE_ECOWITT10x1F
Size1Packet size
Result10x00:success,0x01: fail
Checksum1checksum
  • Read back Wunderground setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_WUNDERGROUND10x20
Size1Packet size
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_WUNDERGROUND10x20
Size1Packet size
ID Size1ID Size
IDnASCII , max 32
Password Size1Password Size
PasswordnASCII , max 32
Fix11
Checksum1checksum
  • Rewrite Wunderground setting
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_WUNDERGROUND10x21
Size1Packet size
ID Size1ID Size
IDnASCII , max 32
Password Size1Password Size
PasswordnASCII , max 32
Fix11
Checksum1checksum

Console WIFI module return data:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_WUNDERGROUND10x21
Size1Packet size
Result10x00:sucess,0x01: fail
Checksum1checksum
  •  Read WeatherObservationsWebsite setting
DescriptionLengthNotes
Fixed header2固定 0xffff
CMD_READ_WOW10x22
Size1包长度
Checksum1checksum

Console return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_WOW10x22
Size1Packet size
ID Size1ID Size
IDnASCII , max 39
Password Size1Password Size
PasswordnASCII , max 32
StationNum Size(unused)1StationNum size(unused)
StationNum(unused)nASCII , max 32(unused)
Fix11
Checksum1checksum
  • Rewrite WeatherObservationsWebsite setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_WOW10x23
Size1Packet size
ID Size1ID Size
IDnASCII , max 39
Password Size1Password Size
PasswordnASCII , max 32
StationNum Size(unused)1StationNum size(unused)
StationNum(unused)32ASCII , max 32(unused)
Fix11
Checksum1checksum

Console return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_WOW10x23
Size1Packet size
Result10x00:sucess,0x01: fail
Checksum1checksum
  • Read Weathercloud setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_WEATHERCLOUD10x24
Size1 
Checksum1checksum

Console return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_WEATHERCLOUD10x24
Size1 
ID Size1ID Size
IDnASCII , max 32
Key Size1Key Size
KeynASCII , max 32
Fix11
Checksum1checksum
  • Write back Weathercloud setting
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_WEATHERCLOUD10x25
Size1 
ID Size1ID Size
IDnASCII , max 32
Key Size1Key Size
KeynASCII , max 32
Fix11
Checksum1checksum

Console return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_WEATHERCLOUD10x25
Size1 
Result10x00: success,0x01: fail
Checksum1checksum
  • Read customer server setting
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_CUSTOMIZED10x2A
Size1 
Checksum1checksum

Console return :

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_CUSTOMIZED10x2A
Size1 
ID Size1ID Size
IDnASCII , max 40
Password Size1Password Size
PasswordnASCII , max 40
Server Size1Server Size
ServernASCII , max 64
Port20-65535
Interval216-600
Type10:EC 1WU
Active10:Disable 1:Enable
Checksum1checksum
  1. Write back customer server setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_CUSTOMIZED10x2B
Size1 
ID Size1ID Size
IDnASCII , max 40
Password Size1Password Size
PasswordnASCII , max 40
Server Size1Server Size
ServernASCII , max 64
Port20-65535
Interval216-600
Type10:EC 1WU
Active10:Disable 1:Enable
Checksum1checksum

Console WiFi return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_CUSTOMIZED10x2B
Size1 
Result10x00:sucess,0x01: fail
Checksum1checksum
  1. Read customer usr_path setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_USRPATH10x51
Size1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_USRPATH10x51
Size1 
Ecowitt Path64ASCII , max 64
WU Path64ASCII , max 64
Checksum1checksum
  1. Write back customer usr_path setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_USRPATH10x52
Size1 
Ecowitt Path64ASCII , max 64
WU Path64ASCII , max 64
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_USRPATH10x52
Size1 
Result10x00:sucess,0x01: fail
Checksum1checksum
  1. Read Soilmoisture Sensor calibration parameter:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_GET_SOILHUMIAD10x28
Size1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header20xffff
CMD_GET_SOILHUMIAD10x29
Size1 
Channel1Channel number
Current humidity1Send by sensor
Current ad2Send by sensor
Customize Calibration Option1=1 enable, =0 default by sensor
Min ad1Customize Mode 0% AD(70~200)
Max ad2Customize Mode 100% AD(80~1000)
 
Checksum1checksum
  1. Write back Soilmoisture Sensor calibration setting
DescriptionLengthNotes
Fixed header2 0xffff
CMD_SET_SOILHUMIAD10x29
Size1 
Channel1Channel number
Customize Calibration Option1=1 enable, otherwise =0
Min ad1Customize Mode 0% ADd(70~200)
Max ad2Customize Mode 100% ad(80~1000)
 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_SET_SOILHUMIAD10x29
Size1 
Result10x00: sucess,0x01: fail
Checksum1checksum
  1. Read multi channel temp sensor OFFSET setting                        
DescriptionLengthNotes
Fixed header2 0xffff
CMD_GET_MulCH_OFFSET10x2C
Size1 
Checksum1checksum

Console return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_GET_MulCH_OFFSET10x2C
Size1 
Channel1 
humidity offset1Range: -10 ~ 10, default: 0
Temperature offset1Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
………. 
WH31_CHANNEL-110~7
humidity offset1 
Temperature offset1Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
Checksum1checksum
  1. Write back multi channel temp sensor OFFSET setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_SET_MulCH_OFFSET10x2D
Size1 
Channel1 
humidity offset1Range: -10 ~ 10, default: 0
Temperature offset1Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
………. 
WH31_CHANNEL-110~7
humidity offset1 
Temperature offset1Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_SET_MulCH_OFFSET1 
Size1 
Result10x00: success , 0x01: fail
Checksum1checksum
  1. Read multi channel PM2.5OFFSET calibration setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_GET_PM25_OFFSET10x2E
Size1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_GET_PM25_OFFSET10x2E
Size1 
Channel1 
PM25offset2Range: -200 ~ 200, default: 0 Note: (-20~20 ug/m3)x10
………. 
PM25_CH_MAX-110~3
PM25offset1 
Checksum1checksum
  1. Write back multi channel PM2.5OFFSET calibration:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_SET_PM25_OFFSET10x2F
Size1 
Channel1 
PM25offset2Range: -200 ~ 200, default: 0 Note: (-20~20 ug/m3)x10
………. 
PM25_CH_MAX-110~3
PM25offset1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_SET_PM25_OFFSET10x2F
Size1 
Result10x00:sucess,0x01: fail
Checksum1checksum
  1. Read MAC
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SATION_MAC10x26
Size1 
Result10x00:sucess,0x01: fail
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SATION_MAC10x26
Size1 
Sta_mac[6]6sta_mac[0];sta_mac[1];sta_mac[2]; sta_mac[3];sta_mac[4];sta_mac[5];
Checksum1checksum
  • Read current sensor data. Note: returned packet size for data payload is 2 bytes.
DescriptionLengthNotes
Fixed header20xffff
CMD_GW1000_LIVEDATA10x27
Size1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header20xffff
CMD_GW1000_LIVEDATA10x27
Size2Size is2 Byte
ITEM_PM251 
Value2Unsigned short (valuex10)
ITEM_PM101 
Value2Unsigned short (valuex10)
ITEM_CH1_SOil_H1 
Value10~99
ITEM_CH2_TEMP1 
Value2signed short (valuex10)
… …
ITEM_CH7_TEMP1 
Value2 
ITEM_CH1_HUMI1 
Value10~99
ITEM_CH2_HUMI1 
ITEM_LOWBATT1 
Value16typedef union _sensor_batt
… …
ITEM_CH7_HUMI1 
Value1 
ITEM_TF_USR11 
Temperature Value2signed short (valuex10)
Battery Value1 0.02V * val
…….…… 
ITEM_TF_USR81 
Temperature Value2signed short (valuex10)
Battery Value1 0.02V * val
…….…… 
   
ITEM_SENSOR_CO21 
tf_co2  value2signed short (valuex10)
humi_co2 value1 
pm10_co2 value2unsigned short(valuex10)
pm10_24h_co2 value2unsigned short(valuex10)
pm25_co2 value2unsigned short(valuex10)
pm25_24h_co2 value2unsigned short(valuex10)
Co2  value2unsigned short
co2_24h value2unsigned short
co2_batt value10~5
   
Checksum1checksum
  • Read system parameter:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SSSS10x30
Size1 
Checksum1checksum

WIFI模块返回数据:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SSSS10x30
Size1 
Frequency (注)1Wireless Receive Frequency(Only read)
Sensor Type10:WH24  1:WH65
UTC TIME4Unsigned long(Only read)
Timezone Index1Local time zone index
DST Status1True or False
Checksum1checksum

typedef enum

{

             RFM433M = (unsigned char) 0,//  433MHz

             RFM868M = (unsigned char) 1,//  868MHz

             RFM915M = (unsigned char) 2,//  915MHz

             RFM920M = (unsigned char) 3 //  920MHz

} freq_t;

extern freq_t  Frequency;

  • Write back system parameter
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_SSSS10x31
Size1 
Frequency1(Only read)Can’t be rewritten.
Sensor Type10:WH24  1:WH65
UTC TIME4Unsigned long(Only read)
Timezone Index1Local time zone index
DST Status1True or False
Checksum1checksum

Console WIFI return

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_SSSS10x31
Size1 
Result10x00:sucess,0x01: fail
Checksum1checksum
  • Read rainfall data
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_RAINDATA10x34
Size1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_RAINDATA10x34
Size1 
RainRate4Range: 0~60000 Note: (0mm ~6000.0mm)x10
RainDay4Range: 0~99999 Note: (0mm ~9999.9mm)x10
RainWeek4Range: 0~99999 Note: (0mm ~9999.9mm)x10
RainMonth4Range: 0~99999 Note: (0mm ~9999.9mm)x10
RainYear4Range: 0~99999 Note: (0mm ~9999.9mm)x10
Checksum1 

Write back rainfall:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_RAINDATA10x35
Size1 
RainDay4Range: 0~99999 Note: (0mm ~9999.9mm)x10
RainWeek4Range: 0~99999 Note: (0mm ~9999.9mm)x10
RainMonth4Range: 0~99999 Note: (0mm ~9999.9mm)x10
RainYear4Range: 0~99999 Note: (0mm ~9999.9mm)x10
Checksum1 

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_RAINDATA10x35
Size1 
Resulte10x00:sucess,0x01: fail
Checksum1checksum
  • Read sensor array calibration
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_GAIN10x36
Size1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_GAIN10x36
Size1 
Fixed2 1267
uvGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
solarRadGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
windGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
rainGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
Reserved2Reserved
Checksum1 

Write back calibration setting:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_ GAIN10x37
Size1 
Reserved2 1267(x 10)
uvGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
solarRadGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
windGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
rainGain2Range: 10~500, default: 100 Note: (0.10 ~5.00)x100
Reserved2Reserved
Checksum1 

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_ GAIN10x37
Size1 
Resulte10x00:sucess,0x01: fail
Checksum1checksum
  • Read sensor array offset setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_CALIBRATION1                                 0x38
Size1 
Checksum1checksum

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_CALIBRATION10x38
Size1 
inTempOffset2Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
inHumiOffset1Range: -10~10, default: 0
AbsOffset4Range: -800~800, default: 0 Note: (-80.0hpa~80.0hpa)x10
RelOffset4Range: -800~800, default: 0 Note: (-80.0hpa~80.0hpa)x10
outTempOffset2Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
outHumiOffset1Range: -10~10, default: 0
windDirOffset2Range: -180~180, default: 0
Checksum1 
  • Write back array offset setting:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_CALIBRATION10x39
Size1 
inTempOffset2Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
inHumiOffset1Range: -10~10, default: 0
AbsOffset4Range: -800~800, default: 0 Note: (-80.0hpa~80.0hpa)x10
RelOffset4Range: -800~800, default: 0 Note: (-80.0hpa~80.0hpa)x10
outTempOffset2Range: -100~100, default: 0 Note: (-10.0℃~10.0℃)x10
outHumiOffset1Range: -10~10, default: 0
windDirOffset2Range: -180~180, default: 0
Checksum1 

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_CALIBRATION10x39
Size1 
Resulte10x00:sucess,0x01: fail
Checksum1checksum
  •      Read Sensors ID parameter:

typedef enum

{

    //eWH24_SENSOR = 0x00,

    eWH65_SENSOR = 0x00,//  1: BATT low, 0: normal

    //eWH69_SENSOR,

    eWH68_SENSOR,// voltage=val*0.02V  if <=1.2V BAT is low

    eWH80_SENSOR,// 0.02V * val(received val) = wh80;

    eWH40_SENSOR,// 1: BATT low, 0: normal

    eWH25_SENSOR,// 1: BATT low, 0: normal

    eWH26_SENSOR,// 1: BATT low, 0: normal

    eWH31_SENSORCH1,// 1: BATT low, 0: normal

    eWH31_SENSORCH2,// 1: BATT low, 0: normal

    eWH31_SENSORCH3,// 1: BATT low, 0: normal

    eWH31_SENSORCH4,// 1: BATT low, 0: normal

    eWH31_SENSORCH5,// 1: BATT low, 0: normal

    eWH31_SENSORCH6,// 1: BATT low, 0: normal

    eWH31_SENSORCH7,// 1: BATT low, 0: normal

    eWH31_SENSORCH8,// 1: BATT low, 0: normal

    eWH51_SENSORCH1,// 1: BATT low, 0: normal

    eWH51_SENSORCH2,// 1: BATT low, 0: normal

    eWH51_SENSORCH3,// 1: BATT low, 0: normal

    eWH51_SENSORCH4,// 1: BATT low, 0: normal

    eWH51_SENSORCH5,// 1: BATT low, 0: normal

    eWH51_SENSORCH6,// 1: BATT low, 0: normal

    eWH51_SENSORCH7,// 1: BATT low, 0: normal

    eWH51_SENSORCH8,// 1: BATT low, 0: normal

    eWH41_SENSORCH1,// level0~5,<=1 for BATT low

    eWH41_SENSORCH2,// level0~5,<=1 for BATT low

    eWH41_SENSORCH3,// level0~5,<=1 for BATT low

    eWH41_SENSORCH4,// level0~5,<=1 for BATT low

    //————-

    eWH57_SENSOR,       // level0~5,<=1 for BATT low

    eWH55_SENSORCH1,// level0~5,<=1 for BATT low

    eWH55_SENSORCH2,// level0~5,<=1 for BATT low

    eWH55_SENSORCH3,// level0~5,<=1 for BATT low

eWH55_SENSORCH4,// level0~5,<=1 for BATT low  

eWH34_SENSORCH1 = 31,// v=val*0.02V  if v<=1.2V BATT low

eWH34_SENSORCH2 = 32,// v=val*0.02V  if v<=1.2V BATT low

eWH34_SENSORCH3 = 33,// v=val*0.02V  if v<=1.2V BATT low

eWH34_SENSORCH4 = 34,// v=val*0.02V  if v<=1.2V BATT low

eWH34_SENSORCH5 = 35,// v=val*0.02V  if v<=1.2V BATT low

eWH34_SENSORCH6 = 36,// v=val*0.02V  if v<=1.2V BATT low

eWH34_SENSORCH7 = 37,// v=val*0.02V  if v<=1.2V BATT low

eWH34_SENSORCH8 = 38,// v=val*0.02V  if v<=1.2V BATT low

 eWH45_SENSOR    = 39,// 0~5

//fixed sensor data sequence, not allowed for any order change.

    //————-

    eMAX_SENSOR

}SENSOR_IDT;

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SENSOR_ID10x3A
Size1 
Checksum1checksum

Console return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SENSOR_ID10x3A
Size1 
WH65_SENSOR10x01
WH65_ID4unsigned long
Battery1 
Wh65_signal10~4
WH68_SENSOR10x02
WH68_ID4unsigned long
battery1 
WH68_signal10~4
…SENSOR1..
…_ID4
battery  
…_signal10~4
Checksum1 
  • Read Sensors Status                                                                    
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SENSOR_ID_NEW10x3C
Size1 
Checksum1checksum

Console return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_SENSOR_ID_NEW10x3C
Size2 
WH65_SENSOR10x01
WH65_ID4unsigned long
battery1 
Wh65_signal10~4
WH68_SENSOR10x02
WH68_ID4unsigned long
battery1 
WH68_signal10~4
…SENSOR1..
…_ID4
battery  
…_signal10~4
Checksum1 
  • Write back Sensors ID:
DescriptionLengthNotes
Fixed header2固定 0xffff
CMD_WRITE_SENSOR_ID:10x3B
Size1包长度
WH65_SENSOR10x01
WH65_ID4Unsigned long
WH68_SENSOR10x02
WH68_ID4Unsigned long
…SENSOR1SENSOR_IDT
…_ID4Unsigned long
Checksum1 

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_SENSOR_ID10x3B
Size1 
Resulte10x00:success , 0x01: fail
Checksum1checksum

Note:if written ID = 0xFFFFFFFF, tell console to re-learn sensor by force. If written ID = 0xFFFFFFFE, tell console to disable this sensor by force.

  • Read firmware version info:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_FIRMWARE_VERSION10x50
Size1 
Checksum1 

                                Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_READ_FIRMWARE_VERSION10x50
Size1包长度
Versoin length1Max value 23Bytes
Version buffer For example: “EasyWeatherV1.2.0
Checksum1checksum
  • Firmware upgrade
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_UPDATE10x43
Size1 
ServerIP40xc0a80063 //”192.168.0.99″
ServerPort2                             1~65535
Checksum1 

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_ UPDATE10x43
Size1 
Resulte10x00:sucess,0x01: fail
Checksum1checksum

If user choose “Update firmware” ,app side send server IP and port number to the module. Console wifi setup a connection with server:

connect success

sent  “user1.bin” or  “user2.bin”

sent  firmware data size (eg: 33334566 bytes)

sent  “start”

sent   packet(1) //(packet size 1460bytes)

sent  “continue”

…..

……

sent   packet(n)

sent  “continue”

sent   packet (n+1)

sent  “end”

1.client connected with server, and send filename, server respond with file length;

2.client have file length received, send server with start, server return with 1st packet of firmware data

3.client have 1st packet firmware data received,  send server with continue,server reply with 2nd packet firmware data

……

4.client have (n-1)th firmware data packet received,  send server with  continue,server reply with nth packet firmware data

5.client have nth packet firmware data received, if all ok, send server with end.

  • Console reboot:
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_REBOOT10x40
Size1 
Checksum1 

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_REBOOT10x40
Size1 
Resulte10x00:sucess,0x01: fail
Checksum1checksum
  • Reset to default
DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_RESET10x41
Size1 
Checksum1 

Console WIFI return:

DescriptionLengthNotes
Fixed header2 0xffff
CMD_WRITE_RESET10x41
Size1 
Resulte10x00:sucess,0x01: fail
Checksum1checksum

Return to Help Center >>