//Verison=2.2
//Example,Don't Delete flowing text!
//Button NIMI // Generator NIMI 
//Button NIMI 100 // Generator NIMI and Delay 100ms, 100 not is nessary
//Button INT0 // Generator INT0 and Delay 200ms
//Button RESETAMBE3000
//Button RESET3252
//Send 1 command, Receive 2 response with one is not verify.
//Command ID: CARRIER_LOST // necessary!
//Summary  // not essential, 
//Send command: 61 00 02 00 19 00 // necessary!
//Pause=300 // not essential, unit: ms; Pause 300ms after Send command
//Timeout=100 // not essential, unit: ms; if not receive '84 A9 61 ...' in 100ms after send command, Timeout error will happen!
//*Receive Data: 61 00 02 51 19 00 // not essential, receive but not verify
//Receive Data: 61 00 02 51 19 20 // not essential, receive and verify 
//.Set x = AA B0  -- Define var x ; Added in ver2.2
// ... 61 00 02 00 19 {x}   --- use the defined var, The {x} will be replaced with AA B0 
//

.Set READY_VAR = 01

Command ID:	PROTOCOL_OPTION  
Send	Command: 84 A9 61 00 02 00 55 80
Receive	Data:84 A9 61 00 02 00 55 00
Command ID:	DPMR_CC
Send	Command: 84 A9 61 00 04 03 5C 77 F5 D5 
Receive	Command:84 A9 61 00 02 03 5C 00
Command ID: DPMR_M_F
Send command: 84 A9 61 00 02 03 54 02
Receive Data: 84 A9 61 00 02 03 54 00

Command ID: ALOOP_4FSK_LOOP
Send command: 84 A9 61 00 04 00 18 03 00 00
Receive Data: 84 A9 61 00 02 00 18 00

Command ID: DPMR_SLD
Send command: 84 A9 61 00 06 03 56 11 22 c4 48 bf
Receive Data: 84 A9 61 00 02 03 56 00
Command ID: DPMR_HT_CI
Send command: 84 A9 61 00 03 03 57 41 FF
Receive Data: 84 A9 61 00 02 03 57 00
Command ID: DPMR_END_UE
Send command: 84 A9 61 00 04 03 4B 1f 28 00
Receive Data: 84 A9 61 00 02 03 4B 00
Command ID:	ADDRESSING_MODE
Send	Command: 84 A9 61 00 02 03 28 01
Receive	Command:84 A9 61 00 02 03 28 00
Command ID: DPMR_CALLED_ID
Send command: 84 A9 61 00 04 03 50 12 34 56
Receive Data: 84 A9 61 00 02 03 50 00
Command ID: DPMR_OWN_ID_BCD
Send command: 84 A9 61 00 05 03 53 11 22 33 44
Receive Data: 84 A9 61 00 02 03 53 00
Command ID: PROCESS_MODE
Send command: 84 A9 61 00 02 00 1A 03
Receive Data: 84 A9 61 00 02 00 1A 00
Command ID: REPORT_FIELD
Send command: 84 A9 61 00 02 00 1D FF
Receive Data: 84 A9 61 00 02 00 1D 00
//Command ID: ALOOP_4FSK_LOOP
//Send command: 84 A9 61 00 04 00 18 03 00 00
//Receive Data: 84 A9 61 00 02 00 18 00
Command ID: SEND_CREADY
Send command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
//Receive Data: 84 A9 61 00 02 03 17 0A
Command ID: SEND_HEAD_SF
Send command: 84 A9 61 00 02 00 60 5F
Receive Data: 84 A9 61 00 02 00 5f 00
// Receive Data: 84 A9 61 00 02 20 17 06
Receive Data: 84 A9 61 00 02 30 1B 04
Receive Data: 84 A9 61 00 03 30 57 41 FE
Receive Data: 84 A9 61 00 02 30 54 02
Receive Data: 84 A9 61 00 04 30 50 12 34 56
Receive Data: 84 A9 61 00 04 30 51 19 11 66
Receive Data: 84 A9 61 00 05 30 52 08 15 39 80
Receive Data: 84 A9 61 00 05 30 53 11 22 33 40
Receive	Command:84 A9 61 00 04 30 5C 77 F5 D5
Receive	Data:84 A9 61 00 02 30 27 05 
Pause 2000
Command ID: READ_DPMR_M_F
Send command: 84 A9 61 00 01 23 54
Receive Data: 84 A9 61 00 02 23 54 02
Command ID: RFAR_DPMR_M_F
Send command: 84 A9 61 00 01 33 54
Receive Data: 84 A9 61 00 02 33 54 02
Command ID: READ_DPMR_SLD
Send command: 84 A9 61 00 01 23 56
Receive Data: 84 A9 61 00 06 23 56 11 22 c4 48 b0
Command ID: RFAR_DPMR_SLD
Send command: 84 A9 61 00 01 33 56
Receive Data: 84 A9 61 00 06 33 56 11 22 c4 48 b0
Command ID: READ_DPMR_HT_CI
Send command: 84 A9 61 00 01 23 57
Receive Data: 84 A9 61 00 03 23 57 41 FE
Command ID: RFAR_DPMR_HT_CI
Send command: 84 A9 61 00 01 33 57
Receive Data: 84 A9 61 00 03 33 57 41 FE
Command ID: DPMR_SEND_END
Send command: 84 A9 61 00 01 03 61
Receive Data: 84 A9 61 00 02 03 61 00
Receive Data: 84 A9 61 00 02 20 17 0A
Receive Data: 84 A9 61 00 04 30 4B 1F 28 00
Pause 1000
Command ID: READ_DPMR_HT_CI
Send command: 84 A9 61 00 01 23 57
Receive Data: 84 A9 61 00 03 23 57 41 FE
Command ID: RFAR_DPMR_HT_CI
Send command: 84 A9 61 00 01 33 57
Receive Data: 84 A9 61 00 03 33 57 41 FE
Command ID: READ_DPMR_END_UE
Send command: 84 A9 61 00 01 23 4B
Receive Data: 84 A9 61 00 04 23 4B 1F 28 00
Command ID: RFAR_DPMR_END_UE
Send command: 84 A9 61 00 01 33 4B
Receive Data: 84 A9 61 00 04 33 4B 1F 28 00
Command ID: CARRIER_LOST
Send command: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 00 19 00
Pause 500
Command ID: CARRIER_READY
Send command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
Pause 1000
Command ID: DPMR_SEND_HEAD_SF
Send command: 84 A9 61 00 02 00 60 5F
Receive Data: 84 A9 61 00 02 00 5F 00
Receive Data: 84 A9 61 00 02 30 1B 04
Receive Data: 84 A9 61 00 03 30 57 41 FE
Receive Data: 84 A9 61 00 02 30 54 02
Receive Data: 84 A9 61 00 04 30 50 12 34 56
Receive Data: 84 A9 61 00 04 30 51 19 11 66
Receive Data: 84 A9 61 00 05 30 52 08 15 39 80
Receive Data: 84 A9 61 00 05 30 53 11 22 33 40
Receive	Command:84 A9 61 00 04 30 5C 77 F5 D5 
Receive	Data:84 A9 61 00 02 30 27 05 
Pause 1000
Command ID: SEND_END_CLOST
Send command: 84 A9 61 00 03 00 61 19 00
Receive Data: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 20 17 0A
Pause 1000
Command ID: REPORT_FIELD
Send command: 84 A9 61 00 02 00 1D 70
Receive Data: 84 A9 61 00 02 00 1D 00
Command ID: SEND_HEAD_SF_CREADY
Send command: 84 A9 61 00 04 00 60 5F 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 03 30 57 41 FE
Receive Data: 84 A9 61 00 02 30 54 02
Receive Data: 84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
Pause 1000
Command ID: SEND_END_CLOST
Send command: 84 A9 61 00 03 00 61 19 00
Receive Data: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 20 17 0A
Pause 500
Command ID: SEND_HEAD_CREADY
Send command: 84 A9 61 00 03 00 60 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 20 17 0A
Receive Data: 84 A9 61 00 03 30 57 41 FE
Receive Data: 84 A9 61 00 02 30 54 02
Receive Data: 84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
Pause 500
Command ID: CARRIER_LOST
Send command: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 00 19 00
Pause 500
Command ID: SEND_HEAD_END_CREADY
Send command: 84 A9 61 00 04 00 60 61 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 03 30 57 41 FE
Receive Data: 84 A9 61 00 02 30 54 02
Receive Data: 84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
Receive Data: 84 A9 61 00 02 20 17 0A
Receive Data: 84 A9 61 00 04 30 4B 1F 28 00

Pause 500
Command ID: CARRIER_LOST
Send command: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 00 19 00
Pause 500
Command ID: SEND_H_E_H_E_CREADY
Send command: 84 A9 61 00 06 00 60 61 60 61 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 03 30 57 41 FE
Receive Data: 84 A9 61 00 02 30 54 02
Receive Data: 84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
Receive Data: 84 A9 61 00 04 30 4B 1F 28 00
Receive Data: 84 A9 61 00 02 20 17 0A
Pause 500
Command ID: CARRIER_LOST
Send command: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 00 19 00
Pause 500
Command ID: CARRIER_READY
Send command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
Pause 500
Command ID: DPMR_SEND_SF
Send command: 84 A9 61 00 01 00 5F
Receive Data: 84 A9 61 00 02 00 5F 00
Receive Data: 84 A9 61 00 02 30 54 02
Receive Data: 84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
// Could be 84 A9 61 00 02 30 27 01 depending on the reception of superframe (first half or second half)


//Command ID: DPMR_SEND_HEAD_SF
//Send command: 84 A9 61 00 02 00 60 5F 
//Receive Data: 84 A9 61 00 02 00 5F 00
//Receive Data: 84 A9 61 00 03 30 57 41 FE
//Receive Data: 84 A9 61 00 02 30 54 02
//Receive Data: 84 A9 61 00 04 30 50 12 34 56
Pause 5000
Command ID: DPMR_SEND_END
Send command: 84 A9 61 00 01 03 61
Receive Data: 84 A9 61 00 02 03 61 00
Receive Data: 84 A9 61 00 02 20 17 0A
Receive Data: 84 A9 61 00 04 30 4B 1F 28 00
Pause 500
Command ID: CARRIER_LOST
Send command: 84 A9 61 00 02 00 19 00
Receive Data: 84 A9 61 00 02 00 19 00
Command ID: REPORT_FIELD
Send command: 84 A9 61 00 02 00 1D f0
Receive Data: 84 A9 61 00 02 00 1D 00
Command ID: DPMR_HT_CI
Send command: 84 A9 61 00 03 03 57 11 FE
Receive Data: 84 A9 61 00 02 03 57 00
Command ID: DPMR_END_UE
Send command: 84 A9 61 00 04 03 4B 00 28 00
Receive Data: 84 A9 61 00 02 03 4B 00
//Command ID: AMLOOP_CODEC_CODEC_LOOP
//Send command: 84 A9 61 00 04 00 18 03 11 00
//Receive Data: 84 A9 61 00 02 00 18 00
//Command ID: CARRIER_LOST
//Send command: 84 A9 61 00 02 00 19 00
//Receive Data: 84 A9 61 00 02 00 19 00
Command ID: SEND_CREADY
Send command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive Data: 84 A9 61 00 02 00 19 00
Pause 1000
Command ID:	DPMR_SEND_HEAD_SF
Send	Command: 84 A9 61 00 02 00 60 5F
Pause 100
Receive	Command:84 A9 61 00 02 00 5F 00
Receive	Command:84 A9 61 00 02 30 1B 04
Receive	Command:84 A9 61 00 03 30 57 11 FE
Receive	Command:84 A9 61 00 02 30 54 02
Receive	Command:84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
Pause 4000
Command ID:	DPMR_SEND_END
Send	Command: 84 A9 61 00 01 03 61 
Receive	Command:84 A9 61 00 02 03 61 00
Receive	Command:84 A9 61 00 02 20 17 0A
Receive	Command:84 A9 61 00 04 30 4B 00 28 00
Pause 1000
Command ID: CARRIER_LOST
Send	Command: 84 A9 61 00 02 00 19 00
Receive	Data:84 A9 61 00 02 00 19 00
Pause 50
Command ID:	CARRIER_READY
Send	Command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive	Command:84 A9 61 00 02 00 19 00
Command ID:	DPMR_SEND_HEAD
Send	Command: 84 A9 61 00 01 03 60 
Receive	Command:84 A9 61 00 02 03 60 00
Receive	Command:84 A9 61 00 02 20 17 0A
Receive	Command:84 A9 61 00 02 30 1B 04
Receive	Command:84 A9 61 00 03 30 57 11 FE
Receive	Command:84 A9 61 00 02 30 54 02
Receive	Command:84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
Pause 1000
Command ID: CARRIER_LOST
Send	Command: 84 A9 61 00 02 00 19 00
Receive	Data:84 A9 61 00 02 00 19 00
Pause 50
Command ID:	CARRIER_READY
Send	Command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive	Command:84 A9 61 00 02 00 19 00
Command ID:	DPMR_SEND_HEAD_END
Send	Command: 84 A9 61 00 02 00 60 61
Receive	Command:84 A9 61 00 02 00 61 00
Receive	Command:84 A9 61 00 02 30 1B 04
Receive	Command:84 A9 61 00 03 30 57 11 FE
Receive	Command:84 A9 61 00 02 30 54 02
Receive	Command:84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05
Receive	Command:84 A9 61 00 02 20 17 0A

Receive	Command:84 A9 61 00 04 30 4B 00 28 00
Pause 1000
Command ID: CARRIER_LOST
Send	Command: 84 A9 61 00 02 00 19 00
Receive	Data:84 A9 61 00 02 00 19 00
Pause 50
Command ID:	CARRIER_READY
Send	Command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive	Command:84 A9 61 00 02 00 19 00
Command ID:	SEND_H_E_H_E_CREADY
Send	Command: 84 A9 61 00 06 00 60 61 60 61 19 {READY_VAR}
Receive	Command:84 A9 61 00 02 00 19 00
Receive	Command:84 A9 61 00 02 30 1B 04
Receive	Command:84 A9 61 00 03 30 57 11 FE
Receive	Command:84 A9 61 00 02 30 54 02
Receive	Command:84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 05 
Receive	Command:84 A9 61 00 04 30 4B 00 28 00
Receive	Command:84 A9 61 00 02 20 17 0A
Pause 1000
Command ID: CARRIER_LOST
Send	Command: 84 A9 61 00 02 00 19 00
Receive	Data:84 A9 61 00 02 00 19 00
Pause 50
Command ID:	CARRIER_READY
Send	Command: 84 A9 61 00 02 00 19 {READY_VAR}
Receive	Command:84 A9 61 00 02 00 19 00
Command ID:	DPMR_SEND_SF
Send	Command: 84 A9 61 00 01 00 5F 
Receive	Command:84 A9 61 00 02 00 5F 00
Receive	Command:84 A9 61 00 02 30 1B 05
Receive	Command:84 A9 61 00 02 30 54 02
Receive	Command:84 A9 61 00 04 30 50 12 34 56
Receive	Data:84 A9 61 00 02 30 27 01 
// Could be 84 A9 61 00 02 30 27 01 depending on the reception of superframe (first half or second half)
Pause 2000


Command ID:	DPMR_SEND_END
Send	Command: 84 A9 61 00 01 03 61 
Receive	Command:84 A9 61 00 02 03 61 00
Receive	Command:84 A9 61 00 02 20 17 0A
Receive	Command:84 A9 61 00 04 30 4B 00 28 00
Pause 1000
Command ID:	CARRIER_LOST
Send	Command: 84 A9 61 00 02 00 19 00
Receive	Command:84 A9 61 00 02 00 19 00
Command ID:	AMLOOP_CODEC_CODEC_LOOP
Send	Command: 84 A9 61 00 04 00 18 03 11 00
Receive	Command:84 A9 61 00 02 00 18 00




