It has already been explained in this topic. Next time read the thread before asking a question. I will repeat:
No scanning and connection permissions.
(Canned Response ABG - Bluetooth non-BLE SCAN Permission Blocks)
These blocks can be dragged into your Blocks Editor to request permission(s) for Bluetooth non-BLE scanning and connecting. All three parts are needed.
You also will need to pull in TinyDB into your project.
Thanks to @Anke for the original code.
My changes include
- use of the Screen1 permission blocks to avoid the possibility of a typo
- using a TinyDB tag particular to BT permissions and only for BT permissions.
Special note for Xiaomi devices: