Bluetooth Low Energy(BLE)
1 Function abstract
In general,the main function of ble is provision wifi to connect to an AP,implementation depends on relationship of ble sdk and upper layer app. There are two modes.
1.Standard HCI mode
2.Host controller all in one mode
1.1 Standard HCI mode
Bluetooth app、host launch on mcu, interact with bluetooth controller in HCI (paththrough maybe UART). Dev board barely participate in business and control by mcu totally.
Enable method:
CONFIG_BLUETOOTH=y
CONFIG_BT=n
CONFIG_BTDM_CONTROLLER_ONLY=y
Mainly flow: call bk_ble_enable_uart_controller_only and set UART parameter.
Example project: projects/wifi/controller
1.2 Host controller all in one mode
Both of bluetooth app, host controller launch on dev board. App enable adv, setting gatt DB and send recv data of peer, mcu app interact with bluetoot app in UART, USB, PCIE and so on. Both mcu and dev board need write business logic.
Enable method:
CONFIG_BLUETOOTH=y
CONFIG_BT=n
CONFIG_BTDM_CONTROLLER_ONLY=n
Bluetooth app flow: Pls ref to beken armino idk bluetooth provision example project
Other bluetooth usage: Pls ref to Bluetooth API
Example project:
projects/bluetooth/provisioning
Test method:
bluetooth_demo onenable bluetooth
bluetooth_demo testenable adv
Important
You need define protocol between mcu app with bluetooth app.
Don’t confuse armino idk provision with this provision project, there are some difference.