1. Bluetooth Bootstrap
The bootstrap is Bluetooth initialization procedure. The hciattach is a user space application. which is used to boot up Qualcomm Bluetooth chip. This application should be started after the Bluetooth chip is powered on. In the booting phase, Qualcomm Bluetooth firmware (RAM patch and NVM file) is downloaded into the Bluetooth chip.
1.1 Bootstrap flow chart
The following figure describes the flow chart of Bootstrap.
1.2 HCI Vendor-Specific command for Qualcomm Chip
This section describes the vendor-specific commands that are used to download firmware and get chip firmware version.
1.2.1 EDL_PATCH_GETVER
This command is used to get current patch or ROM version information.
1.2.1.1 Return event
HCI_Command_Complete event is sent in response to the EDL_PATCH_GETVER command.
1.2.2 TLV_DOWNLOAD_REQ
TLV_DOWNLOAD_REQ is issued by host to download a TLV-style file. A TLV-style file is segmented into small pieces if it is too large. TLV_DOWNLOAD_REQ supports download maximum 243‑byte long patch data at one time. Therefore, to download a large TLV-style file completely, host must issue this command in a looping way.
1.2.2.1 Return event
HCI_Command_Complete event is sent by controller to indicate the executing status of previousTLV_DOWNLOAD_REQ command.
In rampatch downloading, there are two types of rampatch file:
- Non-optimized rampatch
- Optimized rampatch
For optimized rampatch, the controller does not send HCI_Command_Complete event for each TLV_DOWNLOAD_REQ command during rampatch downloading. HCI_Command_Complete event is sent to the last TLV_DOWNLOAD_REQ command for last rampatch segment. In NVM downloading, controller sends HCI_Command_Complete event for each NVM segment downloaded.
2. HCI Packet Format
2.1 HCI Command Packet
2.1.1 Opcode(2 octets)
2.1.2 Parameter_Total_Length(1 octet)
2.1.3 Parameter 0 - N(Parameter 0 - N)
2.2 HCI Event Packet
2.2.1 Event_Code(1 octet)
2.2.2 Parameter_Total_Length(1 octet)
2.2.3 Event_Parameter 0 - N(Parameter_Total_Length)
3. BlueZ Download BT FW
- hciattach /dev/ttymxc0 qca 115200 -t120 flow
4. References
- 80-WL520-14_REV_D_Bluetooth_HCI_Vendor_Specific_Commands_Application_Note
- Core_v5.3(Vol 4, Part E, 5.4)
5. Abbreviations and acronyms
- OGF(Opcode Group Field)
- OCF(Opcode Command Field)