SILICON LABS UG513 BT122 HCI Mode User Guide

June 6, 2024
SILICON LABS

SILICON LABS logo   UG513: BT122 HCI Mode User’s Guide

The document contains general assumptions of the HCI model implementation.

KEY FEATURES

  • HCI Mode support
  • DFU over UART possible in HCI mode
  • Bluetooth host flexibility

General Assumptions

Connection to the Host

In the HCI mode, the BT122 module acts as a Bluetooth controller (according to the Bluetooth Core nomenclature). HCI mode also requires a connection to a host device, which is achieved using UART interface as the main way of communication and control of the BT122 module.

General Rules

BT122 module is based on two main parts:

  • Texas Instruments CC2564C Bluetooth Dual Mode controller
  • Silicon Labs microcontroller

After restart, the microcontroller initializes the TI radio chip by sending all needed vendor settings and configurations. Next, the microcontroller provides Silicon Labs Bluetooth Stack (the BT Host implementation) and uses that to communicate with the TI controller via the HCI protocol, as described in the Bluetooth Core Specification. In the HCI mode, the microcontroller is also responsible for the  TI chip initialization and handling vendor commands. However, after that routine, all HCI commands,  events, and responses will be passed to and from the main BT122 UART port.

The Initial Proposal for the HCI Mode Firmware Preparation

To create any BT122 project, prepare XML configuration files that are used by BGBuild.exe to generate end firmware. The same concept is used to generate the HCI mode firmware, as follows:

  • Update the UART setting in hardware.xml file, for example:

  • Include a proper library in project.xml file:

Additionally, it is possible to turn on a sleep mode.
For more details, see UG496: BT122 Project Configuration User’s Guide.

HCI Mode Comparison for iWRAP and BT122

Table 2.1. Comparison of HCI Mode on iWRAP and BT122

Feature iWRAP BT122
HCI protocol BCSP, H4 H4
Interfaces UART, USB UART
UART baud rate Configurable, up to 3686400 bps Configurable, up to 3 Mbps
A way of launching the HCI mode iWRAP command; the setting of a proper value
in a dedicated PSKey The setting of the HCI mode in an XML configuration file

before building the firmware

Using BT122 Module with Host Bluetooth Stack

Custom Module Configuration

Three API commands are available in HCI mode, as follows:

  • dumo_cmd_system_reset
  • dumo_cmd_hardware_set_uart_configuration
  • dumo_cmd_system_get_info

See BT122 Dual Mode API Reference for detailed command documentation. To configure the serial port, type expected parameter values into the hardware configuration (see UG496: BT122 Project Configuration User’s Guide) or use the dumo_cmd_hardware_set_uart_configuration command.
To update firmware, reset the module in  DFU mode with the dumo_cmd_system_reset command. Next, update firmware according to section 4.3 of UG497: BT122 User’s Guide.

BlueZ Stack Example

BT122 module, flashed with HCI firmware, is ready to work with the host Bluetooth stack, for example, BlueZ stack. The following are example configuration steps on the code snippet below.
Because of resource limitations, set the maximum ACL packet length up to 350 bytes.
The highest stable serial port baud rate (for HCI mode) is 2 Mb/s. A higher serial port baud rate is not recommended for host Bluetooth stacks.
$ sudo attach /dev/ttyUSB0 any 2000000
$ sudo hciconfig hci0 aclmtu 350:3
$ sudo hciconfig hci0 up
After correct configuration, BT122 works as Bluetooth dual-mode device.
$ hciconfig
hci0: Type: Primary Bus: UART
BD Address: C4:64:E3:63:8A:AE ACL MTU: 350:3 SCO MTU: 180:4
UP RUNNING
RX bytes:21035348 acl:1089757 sco:0 events:722081 errors:0
TX bytes:79735765 acl:1137257 sco:0 commands:96 errors:0

References

  • Silicon Labs, BT122 Dual Mode API Reference, 2021
  • Silicon Labs, UG496: BT122 Project Configuration User’s Guide, 2021
  • Silicon Labs, UG497: BT122 User’s Guide, 2021

Version History

Revision 1.0
October 2021

  • Initial release.

Smart. Connected.
Energy-Friendly.SILICON LABS UG513 BT122 HCI Mode-

 | |
---|---|---

IoT Portfolio
www.silabs.com/products

|

Quality
www.silabs.com/quality

|

Support & Community
www.silabs.com/community

Disclaimer
Silicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and “Typical” parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes without further notice to the product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Without prior notification, Silicon Labs may update product firmware during the manufacturing process for security or reliability reasons. Such changes will not alter the specifications or the performance of the product. Silicon Labs shall have no liability for the consequences of use of the information supplied in this document. This document does not imply or expressly grant any license to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any FDA Class III devices, applications for which FDA premarket approval is required or Life Support Systems without the specific written consent of Silicon Labs. A “Life Support System” is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Silicon Labs disclaims all express and implied warranties and shall not be responsible or liable for any injuries or damages related to use of a Silicon Labs product in such unauthorized applications. Note: This content may contain offensive terminology that is now obsolete. Silicon Labs is replacing these terms with inclusive language wherever possible. For more information, visit www.silabs.com/about-us/inclusive- lexicon-project

Trademark Information
Silicon Laboratories Inc.®, Silicon Laboratories®, Silicon Labs®, SiLabs® and the Silicon Labs logo°, Bluegiga®, Bluegiga Logo®, EFM®, EFM32″, EFR, Ember, Energy Micro, Energy Micro logo and combinations thereof, “the world’s most energy friendly microcontrollers”, Redpine Signals®, WiSeConnect, n-Link, ThreadArche, EZLinke, EZRadiot, EZRadioPROt, Gecko’, Gecko OS, Gecko OS Studio, Precision32®, Simplicity Studio®, Telegesis, the Telegesis Logo®, USBXpress®, Zentri, the Zentri logo and Zentri DMS, Z-Wave®, and others are trademarks or registered trademarks of Silicon Labs. ARM, CORTEX, Cortex-M3, and thumbs are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. Wi-Fi is a registered trademark of the Wi-Fi Alliance. All other products or brand names mentioned herein are trademarks of their respective holders.

SILICON LABS logo

Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
USA
www.silabs.com

silabs.com | Building a more connected world.

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

SILICON LABS User Manuals

Related Manuals