TMK01-M/02-M/04-M full duplex digital Walkie Talkie wireless module User Manual

TMK01-M/02-M/04-M full duplex digital Walkie Talkie wireless module

All operations of the module are realized through commands of the external MCU. According to the required operations, the MCU sends corresponding commands to the module through the serial port according to the command table in the command section. The module executes the corresponding commands and feeds back the execution status. The specific process is as follows:

Command

Commands are used to control the module or obtain various working states of the module. When the external circuit sends control commands to the module, the commands include input commands and output commands. The external control CPU receives control commands and returns system status or command execution results. 

Under normal circumstances, after receiving the instruction, if the module cannot execute it, it will return an error instruction. Correct execution will return the same instruction to give the control CPU a feedback confirmation. After the module executes the instruction, if the system status changes, it will also return a status instruction.

For example, if the host sends a play channel instruction to the module, after receiving it, if the module is in standby mode, it can play. First, it returns the same instruction to indicate that the instruction has been received and starts executing. Then, the module calls the playback program to play the channel number. At this time, the module will return a playback status instruction. After the playback is completed, the module returns to standby mode and sends a standby status instruction. If the current state of the module is not suitable for playing the channel number, only an error instruction is returned.

The command interface is an asynchronous communication interface, one UART_TX to send and one UART_RX to receive, with a baud rate of 460800, one start bit, 8 data bits, and one stop bit. 

The output 0 is a low level and the output 1 is a high impedance. This design is to adapt to a wider interface level, so the input of the control end CPU should be designed as pull-up.

Affected by the driving ability and operating voltage of different control CPUs, the serial signal waveform may be distorted, causing code errors. Therefore, it is recommended to use 2K~10K pull-up resistors on the serial port to ensure signal integrity.

The serial port instruction bytes include three parts: a number of 0s consisting of a wake-up byte, a baud rate extraction byte 0x55, 18 bytes of control commands and 1 checksum byte. The preceding consecutive 0 bytes, the minimum is 16, are used to wake up the main control CPU in sleep mode of the module; the subsequent byte 0x55 measures the baud rate of the serial port for the internal CPU; the subsequent 18 bytes are control commands, starting with 0x0A, followed by 1 byte The main command byte, see Table 4 for specific definitions, the next 16 bytes are command parameter control bytes, if the main command byte is 0x0F, the first byte after it is the sub-command byte, see Table 5 for specific definitions, and the last byte Checksum, which is the exclusive or sum of the 17 bytes after 0x0A. See Figure 2 for details. 

 Command Table 

NumCommandI/ODefinitionParameter bytesNote
10x0FIControl command Combine control subcommands to implement various control functions, status reading and feedback See the
subcommands table
20xC3IO Write working mode  Current working mode, maximum working mode channel number, working channel
3 0x 03IO Read working mode  Current working mode, maximum working mode channel number, working channel
4 0x CFIO Change specified channel parameters   Change the working frequency and transmit power of the specified channel  
5 0x 3FIO Read specified channel parameters   Read the working frequency and transmit power of the specified channel  
6 0x A5IO Control password modification  Control password, new control password   
7 0x CAIO Write super password  Control password, super password 
8 0x 3AIO Read super password Control password, super password 
9 0x 5AIO Voice command 16-byte voice data 
10 0x 55IO Data command Up to 15 bytes of data in a single command, and the 16th byte is the valid data length 

All commands to change, read, and report the working status of the module are called control commands, and the command byte is 0x0F. Immediately following the command byte is one byte of control subcommand. The 15 bytes after the subcommand are control parameters, used in sequence, with the lower bits first. 

The interface design between the module and the module follows the following principles:
The output interface relative to the module must be set to open drain;
The input interface relative to the module must be set to pull-up.

Subcommand table of module control commands

Num Subcommands I/O Definition Parameter bytes Note
10x11IORead the working stateWorking status (0: Standby; 1: Playback; 2; Transmit only; 3: Receive only; 4: Transceiver; 5: USB; 6: Error; 7: Test; 8: Other modes)
Software information acquisition (0x80: Obtain software information)
2 0x12OReport working statusWorking status (0: Standby; 1: Playback; 2; Transmit only; 3: Receive only; 4: Transceiver; 5: USB; 6: Error; 7: Test; 8: Other modes)
Software information acquisition (0x80: Obtain software information)
3 0x18 IOTransmit control Enter the transmit state, the first byte is the working channel, default 00 indicates the current channel, such as 0xAA indicating the activation of VOX intercom mode; the second byte is the sound playback mode: 0: internal playback; 1: digital voice mode Equivalent to a PTT press
4 0x16IOStandbyThe first byte is the standby channel number
The second byte is the sound playback mode: 0: internal playback; 1: digital voice mode; 2: so-called mixed mode, internal playback and digital voice output
Used with PTT to stop transmission; the first byte function is currently not supported, default is 0
5 0x14 IPlayback commandsPlay data voiceUsed in conjunction with digital voice commands
6 0x1B OSend successData send success instruction Used in conjunction with data commands
7 0xF5IOInstruction errorControl and current status do not match
8 0x31 IOVolume upCurrent volume value 0~15, 15 maximum
9 0x32IOVolume downCurrent volume value 0~15, 15 maximum
10 0x34IOChannel plusCurrent channel value, maximum channel number set by mode setting command Ensure that the parameters of each channel are set correctly
11 0x37IOChannel minusCurrent channel value, maximum channel number set by mode setting command Ensure that the parameters of each channel are set correctly
12 0x39 IOLow battery warningBattery voltage, occupying two bytes Unit: millivolt
13 0x38IONormal battery Battery voltage, occupying two bytes Unit: millivolt
14 0x3BIOVoice broadcast0: Battery power,
1: Channel, 2: Channel mode
15 0x41IOVGA setupMicrophone gain level value (default 4) 0~15 levels, the larger the value, the greater the gain
16 0x42IOVGA readMicrophone gain level value (default 4) 0~15 levels, the larger the value, the greater the gain
17 0x51IOThreshold settingVOX trigger sensitivity, that is, voice threshold level value (default 0) 0~7 levels, the smaller the value, the more sensitive, that is, the lower the threshold
18 0x52IOThreshold readingVOX trigger sensitivity, that is, voice threshold level value (default 0) 0~7 levels, the smaller the value, the more sensitive, that is, the lower the threshold
19 0x81IOTransmission setting 0: Transmission prohibited; 1: Transmission allowed Control transmit function
20 0x82 IOTransmission reading 0: Transmission prohibited; 1: Transmission allowed Control transmit function
21 0xC1 IOUSB parameter mode Enter parameter setting mode after USB connection, module does not work After USB connection, set the working mode, the default is USB charging only mode
22 0xC0IOUSB charging only mode USB connection only for charging, module can work normally After USB connection, set the working mode, the default is USB charging only mode
23 0x00IOStop modeStop transceiving
24 0xFFIOActive stateExit stop mode
25 0x56IOSet channelGet and set the current working channel.
26 0x57 IORead channelGet and set the current working channel.
27 0x5BIOVolume settingGet and set the current volume level
28 0x5CIOVolume readingGet and set the current volume level 0~15 levels, the larger the value, the greater the volume
29 0xDFIORestore dataRestore factory settings
30 0xDDIOSave settingsSave all parameters of the current settings This instruction must be used, otherwise the parameters will not be saved

Data structure definition

Working mode read and write data structure 

The working mode read and write data occupies the data bytes after the command:

struct{
unsigned char Standard; //0,
unsigned char OpMode; //1
unsigned char Language; //2
unsigned char ChannelMax; //3
unsigned char LocalChannel; //4
unsigned char Group[2]; //5,6
unsigned char LocalNum[2]; //7,8
unsigned char Priority; //9
unsigned char HotChannel[4]; //10,11,12,13
unsigned char PhoneSpecial[2]; //14,15
}MK_Mode;

Standard: defines the working mode. The high four bits are valid. Intercom mode (0x00), repeater mode (0x10), intercom + repeater mode (0x20). 

OpMode: defines the channel mode of the intercom. The current channel modes are: 4-channel mode (0x04), 6-channel mode (0x05), 8-channel mode (0x06). The 4-channel mode has the best voice quality. 

Language: Currently, only two languages are supported. 0 indicates Chinese and 1 indicates English; 

ChannelMax: Maximum number of channels, that is, the total number of channels; 

LocalChannel: Current working channel, starting from 0; 

Group: Occupies two bytes, low bit first, indicates the group number, maximum 999; 

LocalNum: Occupies two bytes, low bit first, indicates the number within the group, maximum 999. The group number and the number within the group constitute the local number of the intercom. The intercom can communicate with each other in groups with the same group number. LocalNum cannot be 0; 

Priority: Priority, a total of 2 levels, 3 is high priority, 0 is low priority. Priority is valid after priority reservation is opened.

HotChannel[4]: Hot call channel, full duplex version does not have this function.

PhoneSpecial[2]: Important control parameters, used to control various enable states, including transmission enable, priority reservation enable, etc., specifically as follows: struct PhoneSpecialDef{
unsigned short SideToneEn:1; //Default is 0, modification is invalid
unsigned short MultistardardEn:1; //Default is 0, modification is invalid
unsigned short TXPowerADJEn:1; //Default is 0, modification is invalid
unsigned short VOXAdjEn:1; //Default is 0, modification is invalid
unsigned short HotChannelEn:1; //Default is 0, modification is invalid
unsigned short TXEn:1; //Transmission enable, default is 1, disable transmission is 0
unsigned short ModeADJEn:1; //Default is 1, modification is invalid
unsigned short MultiChannelEn:1;//Default is 0, modification is invalid
unsigned short Battery_Alarm_EN:1; //Low battery warning enable, 0–close, 1–open
unsigned short Master_Reserve_En:1; //Priority reservation enable, default is 0, open is 1
};

Low bit first, high bit last. For example, transmission allowed PhoneSpecial[1] is 0x60, transmission prohibited 0x40, priority reservation open PhoneSpecial[2] is 0x02, close is 0x00.

Channel parameter read and write data structure 

The channel parameter read and write command specifies the read and write of the related parameters of the specified channel. The read command must attach the channel number, and other parameters are empty.It should be noted that the specified channel is not necessarily the current working channel.The channel parameter read and write data occupies the data bytes after the command. The structure definition is as follows: struct{
unsigned char Channel; //0
unsigned char Freq[4]; //1~4
unsigned char Target[2]; //5~6
unsigned char TXPower; //7
}MK_Channel;

Channel: indicates the specified channel number;  Freq: is the working frequency value, occupying 4 bytes, low byte first, unit is Hz;   Target: refers to the called intercom number of this channel. When Target is 0, all intercoms can receive it. When Target is not 0, only the number specified by Target can hear it. Using this function, point-to-point or point-to-multipoint intercom functions of the intercom can be realized; TXPower: refers to the transmit power, in dBm, the control range of TMK01/04 is 0~21dBm; TMK02 is 20~28dBm. 

The VGA parameter data structure

VGA parameter read-write data occupies 1 byte of data behind the command. the structure is defined as follows: struct{
unsigned char Sub_Command; //0
unsigned char VGA; //1
}MK_VGA Sub_Command is the subcommand, see the Subcommand table for details;  VGA is the data byte. According to the subcommand byte, it is the mic gain level.

The VOX parameter data structure

The VOX parameter read and write data occupies 1 byte of data behind the command, and the structure is defined as follows: struct{
unsigned char Sub_Command; //0
unsigned char VOX_GRADE; //1
}MK_VOX_GRADE Sub_Command is the subcommand, see the Subcommand table for details;  VOX_GRADE is the data byte. According to the subcommand byte, it is the VOX trigger sensitivity, that is, the voice threshold level value.

Encryption key parameter data structure

The encryption key parameter read and write data occupies 1 data byte after the command. The structure definition is as follows: struct{
unsigned char ConnectCode[4]; //1,2,3,4
unsigned char KEY[4]; // 5,6,7,8
unsigned char KEY2[4]; // 9,10,11,12
}MK_Key; ConnectCode[4] is the current four-digit login key, which can be used as the connection key to connect the management system software.  KEY[4] and KEY2[4] are two groups of four-digit keys to be modified. According to the command byte, they are communication keys. 

Channel selection data structure

Current selected channel data occupies 1 data byte behind the command, the structure is defined as follows: struct{
unsigned char Sub_Command; //0
unsigned char UsedChannel; //1,
}MK_CHN_Command; Sub_Command is the subcommand, see the Subcommand table for details;  UsedChannel is the data byte. According to the subcommand byte, it is the current working channel.

Volume parameter data structure

Volume parameter read and write data occupies 1 data byte behind the command, and the structure is defined as follows: struct{
unsigned char Sub_Command; //0
unsigned char SPK_Volume; //1,
}MK_SPK_Command; Sub_Command is the subcommand, see the Subcommand table for details;  SPK_Volume is the data byte. According to the subcommand byte, it is the current volume level. Levels 0 to 15 can be set.

Working software information data structure

Each working software information data reply code occupies 14 bytes. The structure definition is as follows: struct{
unsigned char Sub_Command; //0
unsigned char Sub_Command_Soft; //1, unsigned char Soft[14]; //2~15
}MK_SPK_Command; Sub_Command is a subcommand, 0x11, see the Subcommand table for details;  Sub_Command_Soft is a working software information command header, 0x80~0x8A, see 8.11 example; Soft [14] is a data byte, turn to ASCII value, including Chinese characters, for more details see the Control command example .

Digital voice

The digital voice sampling rate is 8K, and each sample occupies 16 bits (a short integer, signed short). During transmission, one serial port frame is 16 bytes, equivalent to 1ms of sampled voice.  When using digital voice, the additional parameters should be set to digital voice mode at the same time when controlling the transmission, and the digital voice should be continuous. Every 20 milliseconds, 20 frames of digital voice should be provided.  When the receive standby mode is set to digital voice or mixed mode (see the Subcommand table , the standby additional voice mode parameter is 1 or 2), the module will output digital voice at the speed of sending 20 frames every 20 milliseconds. The voice is the original sampled voice and can be played directly or saved. 

Data transmission

The module provides data transmission function, using the data command (0x55) in Table 4 for communication. The data length is 16 bytes, the first 15 bytes are data content, and the 16th byte is the valid data length.  The sender can send up to 15 bits of data in a single data command. When the data to be sent is greater than 15 bits, the data should be divided into packets of 15 bits per command and transmitted to the module. The module will automatically connect and send out the sender information. for more details see the Control command example . The sender information includes the send mode and the local number, the send mode has two types: broadcast and private, the high bits of 2 bytes, 0 is broadcast, 1 is private, the low 10 bits are the local number, the send mode is determined according to the call number, when the call number is 0, it is broadcast, otherwise it is private.When using the data transmission function, the next data should be sent after receiving the transmission success reply code (0x1B). The 15-bit data content of the receiver will include 2 parts, the first 2 bytes are the sender information, and the last 13 bytes are the data content. Data transmission can be performed in any state, such as intercom transmission, intercom reception, standby; but when the number of channels is occupied, it cannot be sent, the same as the intercom function. When transmitting data in intercom transmission state, a certain amount of voice bandwidth needs to be occupied. When used at the same time, it will reduce voice quality. It is not recommended to conduct large-scale data transmission. In addition, to ensure accurate data transmission, it is recommended that the transmission interval be greater than 100ms. 

Control command example

1. Query mode parameters Ask:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A 03 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 03 Answer: 00 00 55 0A 03 20 04 10 1E 05 78 03 78 03 07 06 07 08 09 60 00 4B Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0x03 is the read parameter instruction byte,0x20 is the Standard parameter, indicating that the current mode is intercom + repeater, 0x04 is the OpMode parameter, the high four bits cannot be changed, the low four bits are valid, 04 indicates four-channel mode,0x10 is the Language parameter, the high four bits cannot be changed, the low four bits are valid, 10 indicates Chinese, 0x1E is the ChannelMax parameter, the default is 30 channels, 0x05 is the LocalChannel parameter, the default is channel 6, The first 0x78 0x03 is the Group parameter, the low bit comes first, the default is 888, The second 0x78 0x03 is the LocalNum parameter, the low bit comes first, the default is 888 0x07 is the Priority parameter, the default is the highest level,0x06 0x07 0x08 0x09 are the HotChannel parameters, multi-party mode does not have this function, modification is invalid, 0x60 0x00 are the enable parameters, refer to the parameter definitions, TXEn (transmit enable) and ModeADJEn (mode change enable) are turned on, you can transmit and modify the operating mode, the others are 0, closed, need to turn on 1 when using.

2. Modify mode parameters Ask: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A C3 10 04 10 1E 08 78 03 78 03 07 00 00 00 00 60 01 B7 Answer: 00 00 55 0A C3 10 04 10 1E 08 78 03 78 03 07 00 00 00 00 60 01 B7 Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0xC3 is the write parameter instruction byte, 0x10 is the Standard parameter, set to repeater mode,  0x04 is the OpMode parameter, the high four bits cannot be changed, the low four bits are valid, set to four-channel mode, 0x10 is the Language parameter, the high four bits cannot be changed, the low four bits are valid, set to Chinese,0x1E is the ChannelMax parameter, set to 30 channels, 0x08 is the LocalChannel parameter, set to channel 9,The first 0x78 0x03 is the Group parameter, the low bit comes first, set to 888, The second 0x78 0x03 is the LocalNum parameter, the low bit comes first, set to 888 0x07 is the Priority parameter, set to the highest level, 0x60 01 are the enable parameters, refer to the parameter definitions, TXEn (transmit enable), ModeADJEn (mode change enable), and Master_Reserve_En (priority reservation enable) are turned on, you can transmit, modify the operating mode, priority function is turned on, others are 0, closed.

3. Query specified channel parameters  Ask: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A 3F 05 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 3A Answer: 00 00 55 0A 3F 05 F3 43 2A 1C 78 03 14 03 07 00 00 00 00 60 01 B6  Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0x3F is the read channel parameter instruction byte, 0x05 is the Channel parameter, read the specified channel, channel 6,  0xF3 0x43 0x2A 0x1C is the Freq parameter, the low bit comes first, 472531955Hz,  0x78 0x03 is the Target parameter, the low bit comes first, 888, 0x14 is the TXPower parameter, 20dBm.  The following 03 07 00 00 00 00 60 01 bytes do not need to be considered, they are part of the module buf that has not been cleared.

4. Modify specified channel parameters  Ask: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A CF 05 F3 43 2A 1C 78 03 14 00 00 00 00 00 00 00 00 23  Answer: 00 00 55 0A CF 05 F3 43 2A 1C 78 03 14 03 07 00 00 00 00 60 01 46 Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0xCF is the write channel parameter instruction byte, 0x05 is the Channel parameter, write to the specified channel, channel 6,  0xF3 0x43 0x2A 0x1C is the Freq parameter, the low bit comes first, 472531955Hz,  0x78 0x03 is the Target parameter, the low bit comes first, 888, 0x14 is the TXPower parameter, 20dBm.  The following 03 07 00 00 00 00 60 01 bytes do not need to be considered, they are part of the module buf that has not been cleared. 

5. Intercom transmission  Ask: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A 0F 18 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 17  Answer: 00 00 55 0A 0F 18 00 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 18
00 00 55 0A 0F 12 03 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 55 0A 0F 12 04 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 16 Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0x0F is the control command main command byte, 0x18 is the control command transmit control subcommand byte (see Table 5 for details); the first reply is the same command returned after the command is executed correctly, and the second and third are current status reporting commands, 0x12 is the status subcommand byte, 0x03 and 0x04 are receive and transmit status ( see the Subcommand table for details ).

6. Exit intercom  Ask: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A 0F 16 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 19  Answer: 00 00 55 0A 0F 16 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1B
00 00 55 0A 0F 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1D Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0x0F is the control command main command byte, 0x16 is the control command standby subcommand byte (see Table 5 for details); the first reply is the same command returned after the command is executed correctly, and the second is the current status reporting command, 0x12 is the status subcommand byte, 0x00 is the standby status ( see the Subcommand table for details). 

7. Intercom mode sends data command Example 1 
Send: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A 55 01 02 03 04 05 06 07 08 00 00 00 00 00 00 00 08 55  Reply: 00 00 55 0A 0F 1B 00 0F 00 00 00 00 00 00 00 00 00 00 00 00 1B 
00 00 55 0A 0F 12 03 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 11 
00 00 55 0A 0F 12 04 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 16  
00 00 55 0A 0F 12 00 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 12  Receiver: 00 00 55 0A 55 78 83 01 02 03 04 05 06 07 08 2A 1C 78 03 14 08 F7  Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0x55 is the data command byte. The last byte 0x08 in the sender’s data is the number of valid data bytes, i.e. 8 bytes of data, the 8 bytes after 0x55; 0x1B in the reply indicates that the module has received the data and sent successfully. The data received by the serial port of the receiver, 0x78 0x83 is the sender information, the low bit is in front, the highest bit is 1, at this time it is private send mode, the low 10 bits are the local number, that is, 888, the checksum before 0x08 is the number of valid data bytes, that is, 8 bytes of data, the 8 bytes after the sender information; the content of 2A 1C 78 03 14 in the command is the unused part of the module buf, which is also invalid data and does not need to be considered. Note: The data content should fill in the last valid data count. The receiver obtains the data content according to this count. Example 2 
Send: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A 55 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0F 4A   Reply: 00 00 55 0A 0F 1B 05 10 1E 05 78 03 78 03 06 00 00 00 00 60 02 7E 
00 00 55 0A 0F 12 03 10 1E 05 78 03 78 03 06 00 00 00 00 60 02 71 
00 00 55 0A 0F 12 04 10 1E 05 78 03 78 03 06 00 00 00 00 60 02 76 
00 00 55 0A 0F 12 00 10 1E 05 78 03 78 03 06 00 00 00 00 60 02 72   Receiver: 00 00 55 0A 55 78 83 11 12 13 14 15 16 17 18 19 20 21 22 23 0D B2 
00 00 55 0A 55 78 83 24 25 00 00 00 00 00 00 00 00 00 00 00 02 AD   Explanation: The sender sends out 15 valid data. Because the receiver data contains 2 bytes of sender information, each data command can contain a maximum of 13 valid data. Therefore, the receiver receives two data commands. Other command content explanations are the same as Example 1.

8. Software information acquisition command  Send: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 0A 0F 11 80 00 00 00 00 00 00 0000 00 00 00 00 00 00 9E  Reply: 00 00 55 0A 0F 11 80 D2 D7 BA F4 B1 A6 4D 31 2D 4D 2F 45 2D 54 8F 
00 00 55 0A 0F 11 81 61 6C 6B 69 65 2D 4D 31 2D 4D 20 56 33 2E 8E 
00 00 55 0A 0F 11 82 30 2E 33 5F 34 38 30 4D 48 7A 2C 20 43 6F 8D 
00 00 55 0A 0F 11 83 70 79 72 69 67 68 74 28 43 29 20 62 79 20 8C 
00 00 55 0A 0F 11 84 54 6F 6F 6F 6E 65 2C 32 30 32 33 2E 30 34 8B  
00 00 55 0A 0F 11 85 2E 30 34 00 00 00 00 00 00 00 00 00 00 00 8A Explanation: 00 is the wakeup byte, 0x55 allows the internal CPU to measure the baud rate of the serial port, 0x0A is the start byte, 0x55 is the data command byte, 0x11 is the status acquisition instruction, and 0x80 is the parameter byte for acquiring software information. In the reply, the 14 bytes after 0x11 and 0x80 are software information. Because the complete software information is longer than 14 bytes, the subsequent 0x81, 0x82, 0x83, 0x84, and 0x85 all contain 14 bytes of software information until 0x00 ends. The data needs to be converted to ASCII values, including Chinese characters, for example: D2 D7 BA F4 B1 A6 4D 31 2D 4D 2F 45 2D 54 61 6C 6B 69 65 2D 4D 31 2D 4D 20 56 33 2E 30 2E 33 5F 34 38 30 4D 48 7A 2C 20 43 6F 70 79 72 69 67 68 74 28 43 29 20 62 79 20 54 6F 6F 6F 6E 65 2C 32 30 32 33 2E 30 34 2E 30 34; converted to ASCII values ​​is: Yihubao M1-M/E-Talkie-M1-M V3.0.3_480MHz, Copyright(C) by Tooone,2023.04.04.

Design tips for the main control ports 

In order to shorten the secondary development cycle of the module as much as possible, the module provides several direct control ports to facilitate rapid function implementation during design by bypassing UART commands. The following details the main design points of the main control ports.

USB interface 

The USB interface realizes two functions: one is module software upgrade, and the other is parameter modification. Connect USB before power-on, the module automatically enters the upgrade mode. Users can download the corresponding control software from our company website to realize software upgrade and parameter modification. If software upgrades and parameter modifications are not allowed for end users in secondary development, the USB interface does not need to be connected. However, in order to prevent bugs that need to be upgraded in the module and the end user experience, it is recommended that USB interfaces be retained as much as possible in secondary development products. 

Software upgrade  When the module is powered off and connected to USB and computer, it enters the software state after power-on, and software upgrade can be performed.  Parameter setting After the module is powered on, it is connected to USB and computer by default. The default is charging mode only. You need to send USB parameter mode instructions (0x0F 0xC1) via serial port to enter parameter mode to set parameters via USB interface. 

UART interface  The UART interface is a control interface specially provided for secondary development. All control functions can be realized through the instructions of the UART interface. It should be noted that the receiving end of the user CPU’s UART needs to be set to pull-up mode, and the sending end port needs to be set to open drain mode. It should be specially noted that in addition to the UART interface, the user’s other control interfaces can be completely unused, and all controls can be realized through UART.

Circuit design example  

In order to shorten the secondary development cycle of the module as much as possible, the company provides examples of some design circuits for reference.  Microphone circuit design   It is recommended to use differential input for microphones. In this case, the microphone pins of the module can be directly connected. A common electret microphone can use the following circuit:[A circuit diagram showing a microphone connected to a module through capacitors.]C1 and C2 are DC blocking capacitors, R1 is a pull-up resistor, and R2 is used to adjust the microphone sensitivity. The microphone output is connected to the MIC+ and MIC- pins of the module. MIC+ is the signal input end, and MIC- is the reference ground end. Adding a capacitor C3 in parallel on the microphone can enhance the low frequency response.The parameters in the figure are for reference only. C1 and C2 are generally around 1uF. R1 takes 10K, and R2 takes around 1K-4.7K. C3 takes around 0.1uF-0.47uF. The specific parameters should be adjusted according to the actual microphone sensitivity.The schematic in the figure uses a single power supply. For designs with positive and negative power supplies, MIC- should be connected to the negative power supply.

Microphone circuit

Notes: C250 and C251 can be left unconnected, C78 can use a 10uF capacitor, and 3.3V can range from 2V to 3.3V and needs to be independent or clean.

RF management circuit diagram  TMK01 needs to manage and match the RF transmission and reception. The following figure shows the recommended example of the TMK01 RF management and matching circuit. The three values ​​marked in the figure correspond to frequencies of 480MHz, 650MHz and 915MHz respectively.

TMK01 RF Matching Circuit

Notes: This is a recommended circuit for RF matching. Antenna matching needs to be matched according to the actual structure and circuit. You can communicate with antenna manufacturers. 

[A circuit diagram showing RF filters and matching circuits connected to a module.]This circuit uses band-pass filters to filter out unwanted frequencies and impedance matching circuits to match the 50 ohm impedance. The specific parameters should be adjusted according to the actual frequency used.The RF output of the TMK01 module needs to be managed and matched to achieve the optimal working state. If the RF part is improperly designed or unmatched, it may cause low power, poor anti-interference ability, reduced communication distance, and unstable working state.

Other circuits  The speaker is differential output. SPK_P and SPK_N can be directly connected to both ends of the speaker. For single-ended use, a DC blocking capacitor (not less than 220uF) needs to be added. Other circuits can refer to the circuit design of the demo board. Please contact thetechnical support for a copy if needed(sales@dwmzone.com). 

 Development tools 

The company provides a full set of module development tools for a fee, including a development board (including TMK01-M or TMK02-M or TMK04-M), Demo software, circuit diagrams, demonstration software, test accessories (USB data cable, serial communication cable, antenna, battery, wired headset, etc.). Users can purchase according to the contact information below.The development board is a simple walkie-talkie that contains four control buttons. Three of the buttons, the PTT button, UP button and DOWN button, are directly connected to the corresponding ports of the module. After power-on, all the corresponding control functions can be realized. The fourth button is the POWER button, which is used to turn the power on and off: press and hold until the red light turns on to turn on the power, and press and hold until the blue light turns red to turn off the power. In addition to the power interface, the development board also includes a USB port, headset interface and speaker output port. In addition to the power interface, the development board also includes a USB port and speaker output port.

development board

The USB interface can be used to upgrade the module software. The upgrade method is: turn off the power supply. Connect the USB cable to the computer, turn on the power supply, the module will automatically enter the upgrade mode after power-on, and you can use the host computer software to upgrade the software. The headset interface uses an ordinary walkie-talkie Y-headset to answer and talk, and supports wire control functions. The wire control function on the development board is not implemented by the module itself, but is controlled by the control CPU monitoring the wire control status and controlling the module through PTT control instructions. Users can freely design according to their own circuit design. Another function of the headset interface is to demonstrate instruction control. All walkie-talkie states and control instructions can be transmitted through this interface. At this time, the control CPU only performs transparent transmission of UART instructions, which is equivalent to directly controlling the module with the host computer. The control CPU will monitor status instructions and display the module status through lights: the blue light flashes periodically to indicate standby; the green light indicates playback; the yellow light indicates sending or receiving; the green light flashes to enter the test mode. It should be specially noted that the headset interface uses a universal Y-head walkie-talkie write frequency line on the market. The transmission and reception of the write frequency line reuse the same line, so when sending instructions, the same instructions will be received at the same time, plus the module feedback instructions will receive two identical return instructions. If the instruction is that the module status has changed, additional module output status report instructions will also be received.

Special statement

The module can be used with TMK05-M. Set TMK05-M to repeater mode to increase communication distance. The module adopts deep software and hardware hybrid encryption technology. Any intrusive test (such as opening the shield cover for testing) may cause software loss and hardware damage, causing the module to fail.Notes:1. The TMK05-M is a signal repeater module that can be used with the main module (TMK01/TMK02/TMK04) to increase communication distance by relaying signals. Set the TMK05-M to repeater mode in order to work with the main module.2. The module uses advanced encryption techniques involving both software and hardware. Any unauthorized access or tampering of the module could damage the software and hardware, causing the module to malfunction. Users should avoid directly accessing components under the shielding.

LT-M9500 LoRaWAN TVOC and eCO2 Temperature & Humidity Air Quality Sensor Node Connect to Dragino gateway and ChirpStack

For the first use, if it has been powered on, it can be used directly; if it has not been powered on, install the battery, plug the 2-core plug of the battery box into the battery socket (white) on the circuit board. Wait for the power indicator light to stay on, indicating that the program is running. If you need to reset the rotary switch again, please disconnect the power after setting (more than 1 minute to ensure that the microcontroller is completely reset or short-circuit the two short needles of the white socket on the main board) and then power on. At this time, users can install the sensor on site and put it into use.    The wireless sensor should be placed as high as possible and in a relatively open space. It is recommended to be more than 1 meter above the ground; avoid placing metal objects around the sensor to avoid weakening the wireless signal; electronic interference may come from the following objects, so they should be avoided: generators, high current equipment, high voltage relays, transformers, etc.; vibration or impact may also be a source of interference, so the equipment should be kept stationary as much as possible during installation. Please do not install the equipment in an environment beyond the measurement range of the sensor, otherwise it may cause the product to malfunction and permanent damage to the sensor.

Count the second one from the left in the figure as the sensor address selected by the rotary switch. The user needs to select and set the slave station address within 001~255. The setting will take effect after power off and restart.

The method of setting the address with the rotary switch is as follows:

As shown in the figure, the rotary switch and the values represented by each bit, switch to “ON” is the valid value, switch to the opposite direction of “ON” is the invalid value, the address is the sum of the valid values. For example: if the address is 100, then the 3rd, 6th and 7th bits of the rotary switch are switched to the ON position, that is, 4+32+64=100. 

Communication Protocol 

Register address 0000H 0001H 0002H 0003H 0004H 0005H 0006H 0007H 0008H
Parameters    Temperature Humidity CO2 TVOC Spare Spare Spare Spare Spare
Unit %RH PPM PPM          
Range -40-80 0-100 0-5000 0-50          
Sample Value /10 /10 /1 /10          
Operation Read only Read only Read only Read only          
Parameters  0009H 000AH 000BH 000CH 000DH 000EH 000FH    
Parameters Spare Spare Spare Spare Battery voltage Online sign signal strength    
Unit                  
Range                  
Sample Value                  
Operation                  

Connect to Dragino gateway and ChirpStack

Connect via LAN port with direct connection from PC ,Power on the gateway, access the gateway with the url( 10.130.1.1) in the browser( Access via WiFi AP network http:// IP_ADDRESS:8000 ), click LORA, and select correct frequency plan and frequency band mask. The default frequency band mask is: 1 . click Save & Apply

Select the LORANWAN configuration interface to set the NS address of the gateway. We use The CHIRPSTACK server as example for the test, so select CUSTOM and select it according to the real server address.  Record the GATEWAY EUI information. click Save & Apply.

Log in to the ChirpStack server Enter the IP address and port, enter the user name and password, and click Login.

Add a LORAWAN gateway. Click Gateways and CREATE to enter the gateway EUI, which is the gateway EUI shown in the pictures below.

Add an app Click Applications and click CREATE to add an app

 Click Add Application, add device, click CREATE to add device name.

Device Description DEVEUI of device, select the corresponding frequency band, and click Add Device, as shown in picture below.  AU915 communication is not very stable, which may be related to the frequency band. It is recommended to disable the frame count verification function.

Add APPKEY, enter APPKEY parameter in Application Key, and click SET device-keys.

Click DEVICE DATA to view the DATA


DECODE Example
function Decode(fPort, bytes, variables) {
var paramLength = bytes[2]/2;
var params = new Object();
for(var i=0;i<paramLength;i++)
{
params[“param”+i] = bytes[3+i2]256+bytes[4+i*2];
}
return params;
}

DECODER

function decodeUplink(input) {
var params = new Object();
params[“Temp”] = input.bytes[3]256+input.bytes[4]   

params[“Humi”] = input.bytes[5]256+input.bytes[6]   
params[“PM2.5”] = input.bytes[7]256+input.bytes[8] 

params[“TVOC”] = input.bytes[11]256+input.bytes[12]   

params[“CO2”] = input.bytes[13]256+input.bytes[14]    

params[“O3”] = input.bytes[17]256+input.bytes[18]    

params[“HCHO”] = input.bytes[11]256+input.bytes[22]  
return {
data: params
};
}

TTN Device Hardware options

Brand: stmicroelectronics Model: nucleo-wl55jc1 Hardware version: 1.0 Firmware version: 1.0

TTN Decoder

function decodeUplink(input) {
var params = new Object();
params[“Temp”] = input.bytes[3]256+input.bytes[4]   

params[“Humi”] = input.bytes[5]256+input.bytes[6]   
params[“PM2.5”] = input.bytes[7]256+input.bytes[8] 

params[“TVOC”] = input.bytes[11]256+input.bytes[12]   

params[“CO2”] = input.bytes[13]256+input.bytes[14]    

params[“O3”] = input.bytes[17]256+input.bytes[18]     params[“HCHO”] = input.bytes[11]256+input.bytes[22]
return {
data: params
};
}

AT Command for UHF/VHF Walkie Talkie radio module

Description

The default working mode of the module is wideband, the transmit/receive frequency points are 150.050MHz, and the transmit/receive subcarriers are 67Hz. If no AT command is received to change the parameters, the module will work according to the default parameters. 
In data communication mode, the PTT pin must remain high. 
The normal operation of the module requires a 3.6-4.2V power supply and at least 1A of current. When the PD pin is at a high level, the module works. When the PD pin is at a low level, the module is turned off.

1. After the module is powered on, if no AT command is received, the default working parameters are: Bandwidth: Wideband 
Transmit frequency: 150.050MHz  
Receive frequency: 150.050MHz
Transmit subcarrier: 67Hz 
Receive subcarrier: 67Hz
Squelch level: 2
Scrambler: Off 
Compression: Off
Transmit timeout: Off
MIC sensitivity: 6
Audio output level: 62. In data communication mode, the PTT pin cannot be low level. 3. Working conditions of the module:Recommended DC voltage: 3.6-4.2V, the power supply must provide more than 1A current; 
The PD pin of the module must be high level; 
PD can be used as the on/off control pin of the module. 

AT command type

1) Command without parameter:

AT+<command>,eg.:AT+DMOCONNECT

2) Command with parameter:AT+<command>=<par1>,<par2>,<par3>…

3) Response command format are as below :

<CR><LF><command string>

<CR><LF>

<CR> Enter,0x0D

<LF> Newline,0x0A。

1.2 AT Command format

All the AT command started with “AT”, And ended with<CR>。

The UART port default setting are as below:

8 bit data,

1 bit stop,

without parity ,

CTS/RTS,

9600 baut

ATcommand response format:

<CR><LF><command string><CR><LF>

Simplified instruction for SR105U and SR110V for the older version SR-FRS-V and SR-FRS-U AT command you can visit this link: https://docplayer.net/91122125-Sr-frs-0w5-wireless-transmit_receive-data-transfer-module-uhf-vhf-uart-communication-protocol.html

AT+DMOGRP: Set transmit frequency, receive frequency, sub audio, bandwidth, busy channel lockout, transmit power. 

Description: Set frequency, sub audio frequency, power, bandwidth and other parameters.

Format: AT+DMOGRP=RFV,TFV,RXCT,TXCT,Flag,Flag1Example (text input):
AT+DMOGRP=450.02500,450.02500,RR,TT,0,0  (Carriage return/line feed)
Because RR and TT represent sub audio frequencies, they cannot be entered directly in text format; see explanation below. RFV, TFV, frequency values, must be 5 digits after the decimal point.

Example (HEX input):
41 54 2B 44 4D 4F 47 52 50 3D 34 35 30 2E 30 32 35 30 30 2C 34 35 30 2E 30 32 35 30 30 2C 70 06 2C 70 06 2C 30 2C 30 0D 0A Response:
+DMOGRP:0 Success
+DMOGRP:1 Failure

Parameter description:

RFV: Receive frequency value:400.00000-480.00000MHZ (integer multiple of 6.25K or 2K5)
TFV: Transmit frequency value:400.00000-480.00000MHZ (integer multiple of 6.25K or 2K5)
Note: The transmit frequency and receive frequency can be the same frequency or different frequencies (ASCII)
RXCT: DO D1 Receive coding has 2 BYTES. (Hexadecimal number)
Format: BCD code (see explanation below)
The low four bits of RXCT1 are the decimal part. If DEC is not set, fill in FF FF. For example:
67.7 D0D1 data 0x77 0x06 
D023N D0D1=23
80 D244N D0D1=44
82 D023I D0D1=23 
C0 D251I D0D1=51 C2
TXCT: Transmit encoding (hexadecimal number), the same as receive encoding.
Flag: (ASCII)
Bit0 Busy channel lockout (0: Off 1: On) (default off)
Bit1 Wide/narrow band (0: Wideband 1: Narrowband) (default wideband)
FLAG = bit1 *2+ bit0;
Flag1: (ASCII) (Invalid for SR105U model, please set FALG1 to 0)
Bit0 High/low power (0: High power 1: Low power) (default high power)
Default: Transmit/receive frequency 450.05000, sub audio 67Hz.
FLAG1 = 0; 

1. RXCT and TXCT are HEX, not ASCII, so commands cannot be sent directly in text format. For example:Enter the command in text mode on the computer:
AT+DMOGRP=450.02500,450.02500,RR,TT,0,0(press Enter)In the PC serial port tool, switch to send in hexadecimal (HEX) format. The result is:
41 54 2B 44 4D 4F 47 52 50 3D 34 35 30 2E 30 32 35 30 30 2C 34 35 30 2E 30 32 35 30 30 2C 52 52 2C 54 54 2C 30 2C 30 0D 0A
Red represents RR, TT corresponding positions
R R  T TIf the sub audio frequency you need is 67.0, after format conversion, the corresponding sub audio is 70 06; Replace RR and TT with 70 06, so the correct command is:
41 54 2B 44 4D 4F 47 52 50 3D 34 35 30 2E 30 32 35 30 30 2C 34 35 30 2E 30 32 35 30 30 2C 70 06 2C 70 06 2C 30 2C 30 0D 0A
Then click Send.Note:
1. Sub audio setting method:
1) For analog sub audio 
For example: 67.0 67.0 →06 70→ D0 D1= 70 06 
250.3 250.3 →25 03→ D0 D1= 03 25
2) For digital sub audio 
Positive polarity D1 MSB is 8; for example: 
D023N 023→8023→ D0 D1=23 80 
D244N 244→8244→ D0 D1=44 82
Negative polarity D1 MSB is C;
D023I 023→C023→ D0 D1=23 C0
D251I 251→C251→ D0 D1=51 C22. FLAG/FLAG1 setting method
BIT1 BIT0 according to the 8421 BCD code to take the value
FLAG = BIT1 * 2 + BIT0
FLAG1 = BIT1 * 2 + BIT0
For example:
1) FLAG: Bit1 = 1; bit0 = 0
FLAG corresponds to BCD code 2 + 0 = 2; FLAG set value is 2;
2) FLAG: Bit1 = 1; bit0 = 1
FLAG corresponds to BCD code 2 + 1 = 3; FLAG set value is 3; 
2) FLAG: Bit1 = 0; bit0 = 1
FLAG corresponds to BCD code 0 + 1 = 1; FLAG set value is 1; 

AT+DMOSAV: Automatic power saving function setting

CommandDescription: Set the automatic power saving function of the module. 

Format: AT+DMOSAV=X

Example:
AT+DMOSAV=0(Carriage return/line feed)

Response:
+DMOSAV:0 Success
+DMOSAV:1 Failure 

Parameter description:
X:
0 Set power saving on 
1 Set power saving off 
(The default is 0, automatic power saving is turned on) 

AT+DMOVOL: Output volume setting 

Description: Set the audio output volume level of the module. The larger the value, the greater the volume. Format: AT+DMOVOL=X 

Example: 
AT+DMOVOL=1 (Carriage return/line feed) 

Response: 
+DMOVOL:0 Success 
+DMOVOL:1 Failure  

Parameter description:
X: Volume level parameter value range: 1-9 
(The default is 6) 

AT+DMOVOX: Voice control function setting  

Description: Set the voice control trigger sensitivity of the module. The larger the value, the more sensitive the trigger.

Format: AT+DMOVOX=X

Example:  AT+DMOVOX=0 (Carriage return/line feed)

Response:
+DMOVOX: 0 Success 
+DMOVOX: 1 Failure 

Parameter description: 
X: Voice control level parameter value is 0-8 levels,  (default off) 
0: Turn off voice control trigger transmission 
1-8: Turn on voice control and represents the sensitivity level of voice control trigger.  (The default is 8) 

AT+DMOFUN: Parameter settings: squelch level, MIC sensitivity, transmit timeout, compression, scrambling 

Description: Set the parameters of the module: squelch level, transmit timeout, MIC sensitivity, scrambling, compressionFormat: AT+DMOFUN=SQL,MICLVL, TOT,SCRAMLVL ,COMP Example: 
AT+DMOFUN=2,6,0,0,0(Carriage return/line feed) Response: 
+DMOFUN:0 Success 
+DMOFUN:1 Failure  

Parameter description: 
SQ: Squelch level: 0-8 (0: Monitor mode)
MICLVL: MIC sensitivity level parameter value is 0-8 levels (default level 5) 
TOT: Transmit timeout, setting range: 0~9; (default off)
0: Turn off transmit timeout 
1~9: Represent transmit timeout 1 minute to 9 minutes respectively)
SCRAMLVL: Scrambling function parameter value 0-7.  (0 means scrambling is off), (default off)
COMP: Compression function switch 
0: Off 
1: On (default off)

AT+DMOMES SMS sender sending command 

Description: Set the SMS sending function of the module, air rate 1200 baud rate 

Format: AT+DMOMES=Lxxxxxxx Example: 
AT+DMOMES=7ABCDEFG(Carriage return/line feed)    
41 54 2B 44 4D 4F 4D 45 53 3D 07 41 42 43 44 45 46 47 0D 0A

Response: 
+ DMOMES:0 Success 
+ DMOMES:1 Failure  

Parameter description:
L: The character length of the SMS (hexadecimal number, maximum length 70BYTE).
XXXXXXX: SMS content

Notes:
1. When sending SMS in text format, the “7” in the text actually represents 0X37 and will be wrong. Before sending, you must switch to HEX format to send, and manually change 0X37 to 0X7.
Text input, directly converted to HEX, the length here is wrong:
41 54 2B 44 4D 4F 4D 45 53 3D 37 41 42 43 44 45 46 47 0D 0A 
You need to change 37 to 07, correct as follows:
41 54 2B 44 4D 4F 4D 45 53 3D 07 41 42 43 44 45 46 47 0D 0A2.

Note: The new modules cannot be compatible with the old products of the same type.

AT+DMOMES: SMS receiver automatic upload

Description: The module receives SMS upload function Format: +DMOMES=Lxxxxxxx 

Example:
+DMOMES=7ABCDEFG(Carriage return/line feed) 
(Note: The 7 here is not the text 7 (0X37), but the HEX 0X07)

Response: 
+ DMOMES:0  (MCU response to the module, no response is allowed)

Parameter description: 
L: The character length of the SMS, hexadecimal number, maximum length 70BYTE) 
XXXXXXX: SMS content 

AT+DMODTF DTMF: sending and receiving (please contact customization, the standard shipping version does not contain this function)  

 Send DTMF signal

Description: Send DTMF digits 0-9 or letters ABCD*#

Format: AT+DMODTF=XY Example: AT+DMODTF=09 

Response: 
+DMODTF:0 Success
+ DMODTF:1 Failure Parameter description: 
XY send digits 
00 send DTMF code: 0 
01 send DTMF code: 1 
02 send DTMF code: 2 
03 send DTMF code: 3 
04 send DTMF code: 4
05 send DTMF code: 5 
06 send DTMF code: 6 
07 send DTMF code: 7 
08 send DTMF code: 8
09 send DTMF code: 9
XY send characters:  
10 send DTMF: A
11 send DTMF: B
12 send DTMF: C 
13 send DTMF: D
14 send DTMF: *
15 send DTMF: # 

Receive DTMF signal  

Description: After the module demodulates the received DTMF, it automatically uploads it through the serial port. 

Format: +DMODTF:XY Example: +DMODTF:09 

Response:  None

Parameter description: 
XY received digits  
00 received DTMF code: 0 
10 received DTMF code: 1 
11 received DTMF code: 2
12 received DTMF code: 3
13 send DTMF code: 4
14 received DTMF code: 5
15 received DTMF code: 6 
16 received DTMF code: 7
17 received DTMF code: 8 
18 received DTMF code: 9
XY received characters: 
10 received DTMF: A
11 received DTMF: B 
12 received DTMF: C
13 received DTMF: D
14 received DTMF: *
15 received DTMF: # 

AT+DMOCONT: Handshake instruction, communication connection test

Description: Communication handshake command 

Format: AT+DMOCONT Example: AT+DMOCONT (Carriage return/line feed) 

Response:  +DMOCONT:0 

Parameter description: None. 

AT+DMOREST: Restore factory settings

Description: Reset all parameters to factory default settings 

Format: AT+DMOREST 

 Example: AT+DMOREST (Carriage return/line feed) 

Response: +DMOREST:0  

Parameter description: None. 

AT+DMOEND: Tail tone setting 

AT+DMOEND Echo tail setting (please contact customization if needed, standard shipping version does not contain this function) 

Description: Turn on or off echo tail setting 

Format: AT+DMOEND=X 

Example: AT+DMOEND=0 (Carriage return/line feed)

Response: +DMOEND:0  

Parameter description: 
X is an on/off switch to open or close the echo tail function 
0: Turn on echo tail; (default) 
1: Turn off echo tail;  

Special instructions: Unless there is a clear requirement, please be sure not to turn off the echo tail. Turning off the echo tail will cause a large noise when the receiving end closes the speaker at the end of transmission. 

AT+DMORSSI: RSSI signal strength query

Description: Query received signal strength, 

Format: AT+DMORSSI  

Example: AT+DMORSSI (Carriage return/line feed) 

Response: + DMORSSI:XXX XXX is the signal strength value, just a relative value;

Parameter description: 
XXX: 000-127 

Data reference: (The larger the returned value, the stronger the signal)

Receiving sensitivity: RSSI
OFF <30
-120 036
-110 046
-100 055
-90 065
-80 075
-70 085
-60 094
-50 103
-40 115
-30 127
-20 127
-10 127
0 127

1. Parameter settings can be retained after power off; 
2. After the module is powered on, you must delay 0.5S before setting various parameters of the module; 
3. Parameters cannot be set when the module is in the transmit state; 

AT+DMOVERQ: Query software version number 

Description: Query module version command 

Format: AT+DMOVERQ 

Example: AT+DMOVERQ  (Carriage return/line feed) 

Response:+DMOVERQ:105U-VXXX  

Parameter description: 
XXX is the software version number, such as 100 

WT51822-S4AT User Manual-Serial AT commands

WT51822-S4AT Serial transparent transmission means that modules are connected with user MCU via a common serial interface to establish a two-way communication between user MCU and mobile devices. The module can obtain at least 200bytes transmission data and automatically send the data by separated packets, each wireless packet maximum load is 20byte. The data packet, which is sent to the module by mobile device side, must send subcontracting automatically(1-20byte/package), the module will forward to the MCU serial receiving port after receiving the data packet. Users can modify the module basic Bluetooth parameters serial AT commands. For details, please check “serial AT command” description.

1. Serial hardware protocol: default 9600bps. 8, No verify bit 1, Stop bit

2.“Enable” serial ports enable control, low level enable module serial port function making data communication with the client host MCU properly; high level closes the serial port function. At this time, the module Bluetooth can still transmit broadcast code, and can be paired connection, but you can not use the serial port functions;

3.In order to save the size, the module uses the TXD / RXD double wire serial methods, without increasing the data flow control. So it is not recommended to set the serial rate too high, in caseof packet loss or error code, recommend to use 9600bps or other baud rates like no higher than 38400bps;

4.Bluetooth module default connection interval is 20ms, if you need to save power and adopt low-speed forwarding mode, you can adjust Bluetooth connection interval via the AT command, the longest interval Bluetooth connectivity is 2000ms;

Serial AT commands Description:

WT51822-S4AT Module will automatically recognize and distinguish serial data, the data packet began with AT character will be defaulted as AT commands and parsing, and will return the process results, so the data under transparent transmission mode cannot begin with AT character.

The test command

Command format: AT\r Syntax: AT \ r

Returning value: OK\r Return value: OK \ r

Content: send AT test commands, returning value OK indicates module AT commands tested successfully.

MAC address Operation Command

Command Format: AT + ADDR \ r?

Return Value: xxxxxxxxxxxx \ r

Content: Return the module‟s current MAC address: xxxxxxxxxxxx Command Format: AT + ADDR = 123456789ABC \ r Return value: OK \ r Content: modify the module MAC address again: 123456789ABC, return value OK indicates the success of reset MAC address. Note: If the Bluetooth module modified the module MAC address successfully under being connected state, but the module will not switch immediately to the new address , it needs to disconnect the module , then the module will be broadcast with a new MAC address.

Operation command of Serial Port Communication Baud-rate Command format: AT + BAUD = 19200 \ r

Return value: OK \ r ERROR \ r

Content: Re-edit module communication baud rate to 19200bps, Return OK indicates the success of modification, Return ERROR indicates that the new baud rate modification fails, the reason is set point value is not common serial port baud rate value. Command Format: AT + BAUD \ r? Return Value:19200\ r Content: Check the current module serial communication baud rate, the module returns the current setting of the baud rate 19200bps.

NOTE: The module default baud rate is 9600bps, because if the serial port baud rate is too high, it need to increase RTS / CTS data flow control, otherwise there will be errors, it is recommended that the baud rate is no more than 57600bps. The serial port baud rates that current module supports : 1200/2400/4800/9600/14400/19200/28800/38400/57600/76800/115200/230400。

Operation Command of the Device Name

Command Format: AT + NAME = Wireless-tag01 \ r

Return value: OK \ r ERROR \ r

Content: Rename the module: Wireless-tag01, the length of a name must be no more than 20 bytes, the return value OK indicates the success of the rename, the return ERROR represents the renamed fails, you may have exceeded the limit length . Command Format: AT + NAME \ r? Return Value: Wireless-tag01 \ r Content: Check the module‟s current device name, serial port return to the module‟s current device name: Wireless-tag01.

NOTE: Modify the device name under the state of the Bluetooth being connected, the module will not modify immediately .It needs to disconnect the Bluetooth connection, and then the module will broadcast with a new device name.

Read Command of Module Parameter

Command: AT + RX \ r

Return Value: NAME: Wireless-tag01 \ r BAUD: 19200 \ r MAC: 123456789ABC \ r

Contents: Check the module‟s current parameter, return to the module‟s current device name, serial port baud rate and device MAC address.

Set Command of Module Transmit Power

Command Format: AT + RFPM = 3 \ r

Return value: OK \ r ERROR \ r

Content: Reset the modules transmit power, for example ,set the module transmission power to level 4 ,the transmit power is -8dbm, return OK indicates power reset successes, return ERROR indicates power reset fails, the reason may the set power level is not in the level list.

Command Format: AT + RFPM \ r?

Return Value: -8dbm \ r

Content: Check the transmit power configuration of the currentBluetooth module, return to the current setting of the transmission power value: -8dbm. NOTE: Bluetooth module currently supports setting transmit power level in the following table:

Power Level Power Value

0 +4dbm

1 0dbm

2 -4dbm

3 -8dbm

4 -12dbm

5 -16dbm

6 -20dbm

7 -30dbm

8 -40dbm

Reset Module Command

Command Format: AT + RESET \ r

Return value: OK \ r

Content: Module reset command, returns OK, the module reset successes. 7-Restore the Default Configuration Commands

Command Format: AT + DEFAULT \ r

Return value: OK \ r

Content: Recover the module configuration parameters to the default parameters, MAC address will also restore to the factory default address, return OK indicates the module successful recovery.

Query Command of Module Version Number

Command Format: AT + VERSION \ r

Return Value: V1.0 \ r

Content: Query module current version, return to module current version V1.0.

Customized Broadcast Data Command

Command Format: AT + ADD = 0123456A \ r

Return value: OK \ r ERROR \ r

Content: Users can add the customized broadcast data in Bluetooth broadcast data, such as adding 0123456A data in Bluetooth broadcast data, returns OK indicates added successfully , returns ERROR indicates failure added, data length may exceed the maximum limit 16byte.

Serial Number Command of Customized Product

Command Format: AT + PID = ABCD \ r

Return value: OK \ r ERROR \ r

Content: customized product serial number added in the broadcast data, returns OK indicates that the custom has been added, add a custom return ERROR indicates failure, possibly because the custom data is beyond the scope required by the serial number, the serial number of the module supports the content within 0000-FFFF.

Setting Command of Bluetooth Broadcast Interval

Command Format: AT + ADP = 500 \ r

Return value: OK \ r ERROR \ r

Contents: Bluetooth Broadcasting valid interval is 100ms-4000ms, if re-configure the Bluetooth radio interval to 500ms, returns OK indicates reset successfully, ERROR indicates reset failed.

Reset Command of Bluetooth Connection Interval

Command Format: AT + CIT = 300 \ r

Return value: OK \ r ERROR \ r

Content: An active Bluetooth connection interval is 20ms-2000ms, if resetting Bluetooth connection time interval to 300ms, returns OK indicates reset successfully, the return ERROR indicates reset failed.

NOTE: The module does not support dynamic modification process connection interval, only work when restart the module after modification.

Setting command of low-power sleep mode

Command Format: AT + SLEEP \ r

Return value: OK \ r

Content: To reduce module power consumption, module in idle state can be used to set to sleep by the sleep command, and then Bluetooth is turned off, power consumption is reduced. Module in sleep mode can be wake-up by an external interrupt, external interrupt wake-foot there are: enable, test, reset three pins, any one external pin interrupt, the module can wake from sleep, wake up way: reset pin falling edge wake up, pin state switches from high level to low level; enable, test Pin rising edge wake up, the pin status is switched from low to high; the module wake-up reset to re-enter the work state.

Test Mode of Transparent Transmission

When the users get the module samples, they always want to first test module Bluetooth functions without the support from hardware serial. According to this usage, the module designed Bluetooth transparent transmission test mode to give a high level signal to the test mode control foot (TEST pin) to control Bluetooth module into the transparent transmission test mode. At this time, the module can normally connect with the mobile device terminal APP through Bluetooth. The module will automatically transmitted back to the mobile terminal equipment after receiving the data transmitted from APP, realize two-way data communication function between Bluetooth module and the mobile device terminal. After the test, released TEST pin high level, re-powering or reset the module to enter normal operation status.

BLE Protocol Description(app port)

[Service UUID: 0x1234 ]

Application Examples of Bluetooth Module

Accessibility BLE-DK, WT51822-DK is tool designed for easy use its Wireless-Tag BLE Bluetooth WT51822-S1/S2/S4AT. You can easily connect the Bluetooth module with PC through the WT51822-DK. The Bluetooth module works as slave device, can be searched and matched by Bluetooth master terminal. After matched, input the data to Bluetooth module via serial port debugging tools and the Bluetooth module resent the data to the master module; at the same time, the Bluetooth module can send the data received from the master module to the serial port debugging tools. Developers can easily check the data content between the Bluetooth module and the master terminal.

The connection method of DEMO-Kit Tools and Bluetooth module: DEMO-Kit Tools interface is the currently popular XBee interface. Bluetooth module connect with Kit Tools by XBee adapter board. Welding the module posted in the corresponding XBee adapter board, and then inserted the adapter board into the Kit tools.

XBee adapter plate shown as below:

DEMO-Kit tool uses a FTDI USB-to-UART chip. so before connecting with PC, you first need to install the FTDI chip driver. After driver installation is successful, connect DEMO-KIT with PC through the USB cable, then the PC side can identify DEMO-Kit tools serial numbers;

Open the serial debugging tools in PC terminal, for example, the serial debugging assistant, the port number is FTDI Chip mapping Virtual COM port number, the serial port parameters set as follows: 9600 baud,; data format is 8 data bits, No parity, 1 stop bit format, and then open the serial port, read and modify the current Bluetooth module settings by AT commands ,

as shown;

Search the slave devices by mobile APP terminal, you can use thepublicly recognized bluetooth test software LightBlue in IOS system, and you can also use our company‟s self-made Blurtooth serial APP testing software in Android system. After searched the device name of Bluetooth module, you can successfully paired by clicking itand establish a Bluetooth connection, and send data to a Bluetooth module through this APP tool to establish data communication between a mobile terminal and Bluetooth modules. A. In the IOS system (only iphone4S or above version phones support Bluetooth 4.0) use LightBlue to test module connect function. Firstly, open iphone Bluetooth, run LightBlue APP, when LightBlue is running, it will automatically search for the slave unit, the slave list will be displayed with some main information, UUID Services, transmitting power, device names etc

Click the slave unit you want to connect, iphone will connect with the salve, afterthis, the program will automatically search all services from slave machine, as shown below.

Enter into the service by clicking the cooresponding service , you can see some characteristics included in the Services, shown as below

Click „Write new value‟, will enter into the communication field of Characteristic, write the input value, as below:

Module will push the data sets to the serial port via DEMO-KIT after receiving the data from LightBlue which can be displayed on the serial debugging tools by PC side:

In the Android system (only Android 4.3 or above systems support Bluetooth 4.0) , you can use our company self-made APP serial debugging tools: Using APP tools to search for Bluetooth devices:

Connect with Bluetooth device, and input data in the serial transmission window, sends data to Bluetooth device, the module will push the data sets to the serial port via DEMO-KIT after receiving the data from LightBlue which can be displayed on the serial debugging tools by PC side:

You can also use PC side debug tool to send data to the APP serial tool by module, APP display window shows the data sent by Module

App serial tool received data and showed in the display window:

It will create more comvenience and shorten the development period of bluetooth project by using our DEMO-KIT tool and self made APP serial debugging tool

User’s Manual for MH-Z Series Infrared CO2 Sensor Module Communication Protocol

1.Profile for the communication protocol

●All the data in this communication protocol is hexadecimal.

●The data length is fixed 9 bits.

●Baud rate:9600, data bit:8, stop bit:1, parity bit: none.

2.Command list and meaning.

3.Command list and meaning.

0x86- Read CO2 concentration (for 0-50000ppm range)

CO2 concentration = HIGH *256+ LOW Eg. 01 in hexadecimal is equals to 1 in decimal, F4 in hexadecimal is equals to 244 in decimal. CO2 concentration=01*256+244=500ppm

0x9C- Read CO2 concentration (for 0-150000ppm range)

CO2 concentration= Data 1 << 24 + Data 2 << 16 + Data 3 << 8 + Data 4

Checksum calculation method

Calculating Checksum:

1、Add Byte 1 to Byte 7: 0x01 + 0x86 + 0x00 + 0x00 + 0x00 + 0x00 + 0x00 = 0x87

2、Negative: 0xFF – 0x87 = 0x78

3、Then+1:0x78 + 0x01 = 0x79

C language

char getCheckSum(char *packet)
{
char i, checksum;
for( i = 1; i < 8; i++)
{
checksum += packet[i];
}
checksum = 0xff – checksum;