9.1 HCI Command Packet – Read Buffer Size (Opcode – 0x1005)

The HCI command packets serves the following purposes:

  1. The HCI event packet response indicates functioning and status of programming in the BM70/71 module.
  2. To discover about sending the number of bytes of data to the BM70/71 module in an HCI command or HCI-ISDAP Flash command.
For the external programmer/host MCU, this effectively provides the size of the internal buffer available in the BM70/71 module for receiving packets. The host MCU must not send any HCI command packet or HCI-ISDAP command packet that is greater in total length than the value returned by the BM70/71 module from this command.
Note: Not following the buffer size limitation results in undefined device operation.
When starting a programming flow, the recommendation to the programmer is to send this HCI command packet as the first message to the BM70/71 module.

Command Format – Host MCU to BM70/71 Module

Table 9-1. Read Buffer Size Command Format
StartOpcodeLength
Byte Number01-23
Size (bytes)121
Value0x010x10050
Note: The opcode field for the HCI vendor command is formatted as Little Endian (LE). For the opcode (0x1005), byte[1] is 0x05 and byte[2] is 0x10.
Figure 9-1. Message Sequence for Read Buffer Size

Response Format – BM70/71 Module to Host MCU

The BM70/71 module responds to the command with an HCI command complete message (Command Complete Event (Opcode – 0x0E)) with additional parameters appended to indicate the BM70/71 module internal buffer sizes. These additional parameters indicate the packet length or buffer size and the total number of buffers available in the BM70/71 module. The following table provides details about the format and values of the response. Refer to Command Complete Event (Opcode – 0x0E) for the base format of the message. For more details on the HCI event, refer to the Bluetooth Core Specification (4.2).
Table 9-2. Read Buffer Size Event Response
StartEvent CodeLengthData
Byte Number0123-13
Value0x040x0E0x0BSee the following table
Table 9-3. Data Field Parameters
Byte NumberValueParameter DescriptionLength
30xXXNumber of HCI command packets that can now be sent to the BM70/71 module from the host MCU1 byte
4-50x1005HCI command opcode that was processed by the BM70/71 module2 bytes
60xXX

0x00 – Success

0x01-0xFF – See Table 11-13
1 byte
7-80xXXXX

HCI-ISDAP command packet length. This is the maximum accepted length, in bytes, of the HCI-ISDAP command packet, the BM70/71 module. The programmer must not send any total message size that exceeds this length.

2 bytes
90xXX

Synchronous data packet length. For the purposes of programming, the programmer can ignore this field.

1 byte
10-110xXXXX

Total number of HCI-ISDAP command packets. This is the number of buffers in the BM70/71 module.

2 bytes
12-130xXXXX

Total number of synchronous data packets. For the purposes of programming, the programmer can ignore this field.

2 bytes