Hi, everyone!
I'm trying to connect my ESP32 devkit to Windows 10 using Classic Bluetooth.
Firstly, I connected the ESP32 to 2 different Laptop and it worked.
Them, I tried to connect to a PC using a bluetooth dongle, but I have a problem: windows requires me to confirm a pin on ESP32.
How can I solve that?
Thank u
Classic Bluetooth Connection Problem
-
- Posts: 1
- Joined: Mon May 24, 2021 5:46 pm
Classic Bluetooth Connection Problem
- Attachments
-
- Pin
- Sem título.png (4.77 KiB) Viewed 2114 times
Re: Classic Bluetooth Connection Problem
There are three different modes available for pairing security (esp_gap_bt_api.h):
For BT classic, if you have secure simple pairing enabled in your sdkconfig then you can set the mode like this:
Have a look at this link: https://docs.espressif.com/projects/esp ... Pv7uint8_t
Code: Select all
#define ESP_BT_IO_CAP_OUT 0 /*!< DisplayOnly */ /* relate to BTM_IO_CAP_OUT in stack/btm_api.h */
#define ESP_BT_IO_CAP_IO 1 /*!< DisplayYesNo */ /* relate to BTM_IO_CAP_IO in stack/btm_api.h */
#define ESP_BT_IO_CAP_IN 2 /*!< KeyboardOnly */ /* relate to BTM_IO_CAP_IN in stack/btm_api.h */
#define ESP_BT_IO_CAP_NONE 3 /*!< NoInputNoOutput */ /* relate to BTM_IO_CAP_NONE in stack/btm_api.h */
Code: Select all
#if defined(CONFIG_BT_SSP_ENABLED)
esp_bt_sp_param_t param_type = ESP_BT_IO_CAP_NONE; // CHANGE THIS TO SET THE SECURITY MODE
esp_bt_io_cap_t iocap = BT_PAIRING_SECURITY;
ESP_ERROR_CHECK(esp_bt_gap_set_security_param(param_type, &iocap, sizeof(uint8_t)));
#endif
Who is online
Users browsing this forum: Majestic-12 [Bot] and 122 guests