Line 452: |
Line 452: |
| | Packet Id || 2 bytes || Packet id unique for this channel | | | Packet Id || 2 bytes || Packet id unique for this channel |
| |- | | |- |
− | | Packet Type || 1 byte || Type of this packet | + | | Not usable byte || 1 byte || Not usable byte |
| |- | | |- |
| | Packet payload || m bytes || Data payload | | | Packet payload || m bytes || Data payload |
Line 460: |
Line 460: |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! colspan="2" align="center" style="background: black; color: white;"|Packet Type | + | ! colspan="2" align="center" style="background: black; color: white;"|Not usable byte |
| + | |
| |- | | |- |
| | 1||Data packet requiring acknowledgment | | | 1||Data packet requiring acknowledgment |
Line 475: |
Line 476: |
| | Packet id || 2 bytes || same as in acknowledged packet | | | Packet id || 2 bytes || same as in acknowledged packet |
| |- | | |- |
− | | Packet type || 1 byte || 0x02 | + | | Not usable byte|| 1 byte || 0x00 |
| |} | | |} |
| | | |
Line 510: |
Line 511: |
| | | |
| Scenario: | | Scenario: |
− | | + | Module sends UDP channel packet with encapsulated AVL data packet. |
− | Module sends UDP channel packet with encapsulated AVL data packet (Packet type=1 or 0). If packet type is 0, server should respond with valid UDP channel acknowledgment packet. Since server should respond to the AVL data packet, UDP channel acknowledgment is not necessary in this scenario, so Packet type=1 is recommended. | + | Server sends UDP channel packet with encapsulated response |
− | | |
− | Server sends UDP channel packet with encapsulated response (Packet type=1 – this packet should not require acknowledgment) | |
− | | |
| Module validates AVL packet id and Number of accepted AVL elements. If server response with valid AVL packet id is not received within configured timeout, module can retry sending. | | Module validates AVL packet id and Number of accepted AVL elements. If server response with valid AVL packet id is not received within configured timeout, module can retry sending. |
| | | |
Line 527: |
Line 525: |
| | Len – 253, | | | Len – 253, |
| Id – 0xCAFE, | | Id – 0xCAFE, |
− | Packet type – 01 (without ACK)
| + | Not usable byte – 00 |
| || AVL packet id – 0xDD, | | || AVL packet id – 0xDD, |
| IMEI – 1234567890123456 | | IMEI – 1234567890123456 |
Line 547: |
Line 545: |
| | Len – 5, | | | Len – 5, |
| Id – 0xABCD, | | Id – 0xABCD, |
− | Packet type – 01 (without ACK)
| + | Not usable byte – 00 |
| || AVL packet id – 0xDD, | | || AVL packet id – 0xDD, |
| NumberOfAcceptedData – 2 | | NumberOfAcceptedData – 2 |
Line 742: |
Line 740: |
| | | |
| Communication with server is the same as with codec 8 protocol, except in codec8 extended protocol codec id is 0x8E. | | Communication with server is the same as with codec 8 protocol, except in codec8 extended protocol codec id is 0x8E. |
| + | |
| | | |
| Example: | | Example: |
Line 870: |
Line 869: |
| |- | | |- |
| | Len – 253, | | | Len – 253, |
− | Id – 0xCAFE, Packet type – 01 | + | Id – 0xCAFE, |
| + | Not usable byte – 00 |
| || AVL packet id – 0xDD, | | || AVL packet id – 0xDD, |
| IMEI – 1234567890123456 | | IMEI – 1234567890123456 |
Line 888: |
Line 888: |
| |- | | |- |
| | Len – 5, | | | Len – 5, |
− | Id – 0xCAFE, Packet type – 01 | + | Id – 0xCAFE, |
| + | Not usable byte – 00 |
| || AVL packet id -0xDD | | || AVL packet id -0xDD |
| Number of Accepted Data -2 | | Number of Accepted Data -2 |
Line 907: |
Line 908: |
| '''Packet identification''': 0xCAFE 2 bytes | | '''Packet identification''': 0xCAFE 2 bytes |
| | | |
− | '''Packet type''': 01 | + | '''Not usable byte''': 00 |
| | | |
| '''Packet id''': 1b | | '''Packet id''': 1b |
Line 1,659: |
Line 1,660: |
| | Packet Id || 2 bytes || Packet id unique for this channel | | | Packet Id || 2 bytes || Packet id unique for this channel |
| |- | | |- |
− | | Packet Type || 1 byte || Type of this packet | + | | Not usable byte || 1 byte || Not usable byte |
| |- | | |- |
| | Packet payload || m bytes || Data payload | | | Packet payload || m bytes || Data payload |
Line 1,667: |
Line 1,668: |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! colspan="3" align="center" style="background: black; color: white;"|Packet Type | + | ! colspan="3" align="center" style="background: black; color: white;"|Not usable byte |
| |- | | |- |
| | 1 ||Data packet requiring acknowledgment | | | 1 ||Data packet requiring acknowledgment |
Line 1,684: |
Line 1,685: |
| | Packet id || 2 bytes || same as in acknowledged packet | | | Packet id || 2 bytes || same as in acknowledged packet |
| |- | | |- |
− | | Packet type || 1 byte || 0x02 | + | | Not usable byte || 1 byte || 0x00 |
| |} | | |} |
| | | |
Line 1,720: |
Line 1,721: |
| '''Scenario:''' | | '''Scenario:''' |
| | | |
− | Module sends UDP channel packet with encapsulated AVL data packet (Packet type=1 or 0). If packet type is 0, server should respond with valid UDP channel acknowledgment packet. Since server should respond to the AVL data packet, UDP channel acknowledgment is not necessary in this scenario, so Packet type=1 is recommended. | + | Module sends UDP channel packet with encapsulated AVL data packet. |
− | | + | Server sends UDP channel packet with encapsulated response |
− | Server sends UDP channel packet with encapsulated response (Packet type=1 – this packet should not require acknowledgment) | |
− | | |
| Module validates AVL packet id and Number of accepted AVL elements. If server response with valid AVL packet id is not received within configured timeout, module can retry sending. | | Module validates AVL packet id and Number of accepted AVL elements. If server response with valid AVL packet id is not received within configured timeout, module can retry sending. |
| | | |
Line 1,737: |
Line 1,736: |
| | Len – 253, | | | Len – 253, |
| Id – 0xCAFE, | | Id – 0xCAFE, |
− | Packet type – 01 (without ACK)
| + | Not usable byte – 00 |
| || AVL packet id – 0xDD, | | || AVL packet id – 0xDD, |
| IMEI – 1234567890123456 | | IMEI – 1234567890123456 |
Line 1,756: |
Line 1,755: |
| | Len – 5, | | | Len – 5, |
| Id – 0xABCD, | | Id – 0xABCD, |
− | Packet type – 01 (without ACK)
| + | Not usable byte – 00 |
| || AVL packet id – 0xDD, | | || AVL packet id – 0xDD, |
| NumberOfAcceptedData – 2 | | NumberOfAcceptedData – 2 |
Line 1,775: |
Line 1,774: |
| Packet identification: 0xCAFE 2 bytes | | Packet identification: 0xCAFE 2 bytes |
| | | |
− | Packet type: 01
| + | Not usable byte : 00 |
| | | |
| Packet id: 1b | | Packet id: 1b |
Line 1,793: |
Line 1,792: |
| GPS data: 0f0e9ff0209a718000690000120000 | | GPS data: 0f0e9ff0209a718000690000120000 |
| | | |
− | UDP protocol is the same as TCP except message header is 7 bytes, which consist of: data length, packet identification, packet type and packet id. | + | UDP protocol is the same as TCP except message header is 7 bytes, which consist of: data length, packet identification, not usable byte and packet id. |
| | | |
| Then goes imei length and imei itself. | | Then goes imei length and imei itself. |