9.1 HCI Command Packet – Read Buffer Size (Opcode – 0x1005)
The HCI command packets serves the following purposes:
- The HCI event packet response indicates functioning and status of programming in the BM70/71 module.
- 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
Start | Opcode | Length | |
---|---|---|---|
Byte Number | 0 | 1-2 | 3 |
Size (bytes) | 1 | 2 | 1 |
Value | 0x01 | 0x1005 | 0 |
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.
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).
Start | Event Code | Length | Data | |
---|---|---|---|---|
Byte Number | 0 | 1 | 2 | 3-13 |
Value | 0x04 | 0x0E | 0x0B | See the following table |
Byte Number | Value | Parameter Description | Length |
---|---|---|---|
3 | 0xXX | Number of HCI command packets that can now be sent to the BM70/71 module from the host MCU | 1 byte |
4-5 | 0x1005 | HCI command opcode that was processed by the BM70/71 module | 2 bytes |
6 | 0xXX | 0x00 – Success 0x01-0xFF – See Table 11-13 | 1 byte |
7-8 | 0xXXXX | 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 |
9 | 0xXX | Synchronous data packet length. For the purposes of programming, the programmer can ignore this field. | 1 byte |
10-11 | 0xXXXX | Total number of HCI-ISDAP command packets. This is the number of buffers in the BM70/71 module. | 2 bytes |
12-13 | 0xXXXX | Total number of synchronous data packets. For the purposes of programming, the programmer can ignore this field. | 2 bytes |