Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
145
Ver.1.0.0
Data for second transfer:
0x01 0x00 0x5e 0x80 ... (12 bytes not listed)... 0x00 0x00 0xJK 0xHI
Data for third transfer:
0x02 0x00 0x25 0x08 ... (12 bytes not listed)... 0xfa 0x87 0xNO 0xLM
........
Data for penultimate transfer:
0xa8 0x05 0x02 0x04 ... (12 bytes not listed)... 0x00 0x00 0xST 0xPQ
Data for final transfer:
0xa9 0x05 0x44 0x58 0x00 0x00 0x01 0x00 0x00 0x00
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
0xWX 0xUV
Since the firmware data for final transfer are only
8 bytes, eight “0xff” are added to
complement 16 bytes. CRC calculation result for the former 18 bytes (0xa9 ~ 0xff) is
“0xUVWX”.
Figure 6-8 Master OTA Data
8) After firmware data are sent, Master checks if BLE link-layer data are all sent out
(Only when link-layer data is acked by Slave,
it’s considered the data is sent
successfully). If all data are sent, Master will send an ota_end command to inform
Slave.
“OTA end” packet is set as 6 valid bytes: first two bytes are “0xff02”, followed by
maximum adr_index value of new firmware (the two bytes are used to double check
if there’re OTA data lost on Slave side), the final two bytes are inverted value of the
maximum adr_index (equivalent to simple check). CRC check is not needed for
“OTA end”.