Implement TCP IoT Communication Protocol

Job ID: 31210329

Budget: $15 – $25 USD

I am using Omni smart lock IoT. This task is to create TCP link between firebase, gprs/gps lock and app.
Instruction format
Note: Instructions are in string form, each item is separated by',', and each instruction ends with a new
line ('\n'). and
When the server sends instructions, it needs to add 0xFFFF before the instruction header, HEX form
<1> <2> <3> <4> <5> <6> <7> <8>
0xFFFF*CMDS,OM,123456789123456,200318123020,XX,DDD#< New Line >
Item Content Note
1 0xFFFF Two bytes start bit, HEX form, non-"0xFFFF "string, add method seeAppendix I
2 *CMDS instruction header server -> lock use *CMDS, lock -> server use *CMDR
3 OM Manufacturer code
4 123456789123456 Lock unique ID number, using lock communication module IMEI number (15 bits)
5 200318123020 time, format yyMMddHHmmss ,200318123020->2020-03-18 12:30:20
6 XX Type of instruction
7 DDD
The instruction bikeries content items, which may have multiple items,
separated by',',
8 # End of instruction #,
9 Instruction check value, *
10 < New Line > end with newline'\n'