Description

The SessionDownload command is used to download a previously recorded session. Compared to the Playback command, this command uses a fast and drop-free protocol to ensure that the session will be completely and correctly transfered to a host even in the presence of packet drops due to a bad communication condition. Download speed and duration may vary.

Protocol

This command uses the Command-Ack-Response-Data protocol.

Command

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x4B ( 0b010 / 0b01011 )
1 Payload Length uint8_t 9
2 CRC uint8_t Calculated
3 Command uint8_t 0x07

Payload

Byte Name C Type Value
4 State uint8_t 0x00 (Stop) or 0x01 (Start)
5 - 6 Session Identifier uint16_t Varies
7 - 8 Payload Length (X) uint16_t See Below
9 - 12 Session Offset uint32_t Varies

Note: Payload length (X) is limited to 12 bytes due to the maximum packet length BLE limititation. X must be greater then zero.

Response

This response packet will be send before the download start and after the download has ended.

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x0B ( 0b000 / 0b01011 )
1 Payload Length uint8_t 3
2 CRC uint8_t Calculated
3 Command uint8_t 0x07

Payload

Byte Name C Type Value
4 State uint8_t 0x00 (Stop) or 0x04 (Download)
5 - 6 Session Identifier uint16_t Varies

Data

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x6B ( 0b011 / 0b01011 )
1 Payload Length uint8_t X
2 CRC uint8_t Calculated
3 Command uint8_t 0x07

Payload

Byte Name C Type Value
4 - 7 Session Offset uint32_t Varies
8 Data (First byte) uint8_t Varies
... ... ... ...
8 + (X-1) Data (Last byte) uint8_t Varies

Note: This packet length varies depending on the payload length specified in the command packet.