Skip to content

Bluetooth classic serial connection PIN provided but pairing is without PIN #4566

Closed
@Adminius

Description

@Adminius

Hardware:

Board: ESP32 WEMOS D1 MINI
Core Installation version: 1.0.4
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10

Description:

After flashing: Smartphone sees "ESP32test" asking if I would like to connect and it connects without asking for a PIN (tried different PINs with different length)

Expectation: Smartphone asks for PIN and connects after user inputs a correct PIN code

Sketch:

Using example sketch:
https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino
but with activated SerialBT.setPin(pin); (before or after SerialBT.begin is doesn't matter) and changed pin:

char *pin = "555555"; 
...
SerialBT.begin("ESP32test", true); 
SerialBT.setPin(pin);

Debug Messages:

[I][BluetoothSerial.cpp:510] _init_bt(): device name set
The device started in master mode, make sure remote BT device is on!
[I][BluetoothSerial.cpp:225] esp_spp_cb(): ESP_SPP_INIT_EVT
[I][BluetoothSerial.cpp:702] connect(): master : remoteName
[I][BluetoothSerial.cpp:379] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: cc:21:19:94:5b:be
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Galaxy S10e : 11
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: cc:21:19:94:5b:be
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Galaxy S10e : 11
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: cc:21:19:94:5b:be
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Galaxy S10e : 11
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:379] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:379] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[V][BluetoothSerial.cpp:392] esp_bt_gap_cb(): authentication success: Galaxy S10e
Connected Succesfully!
[I][BluetoothSerial.cpp:742] connect(): master : remoteName
[I][BluetoothSerial.cpp:379] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: cc:21:19:94:5b:be

Activity

cjcr

cjcr commented on Nov 25, 2020

@cjcr

Confirmed. The pin doesn't work as it should.

ketan

ketan commented on Dec 1, 2020

@ketan

Can confirm. This example seems to have commented out the setPin method. It does not work as expected.

stale

stale commented on Jan 30, 2021

@stale

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

Adminius

Adminius commented on Jan 30, 2021

@Adminius
Author

Any news?

stale

stale commented on Jan 30, 2021

@stale

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

juniorradu

juniorradu commented on Mar 17, 2021

@juniorradu

Same problem here. Any solution? Version 1.0.5

Gcopper22

Gcopper22 commented on Apr 1, 2021

@Gcopper22

Hello, a lot of people also me, we are trying to find an option to set static PIN on Bluetooth classic serial connection when pairing. A way to input custom PIN not the default 123456.An old way was created for 1.0.1 version adding a custom libbt.a file that was disabling ssp as far as i know .We want to be able to have this option on newer versions. I'll appreciate anyone who really want to help

ketan

ketan commented on Apr 1, 2021

@ketan
stale

stale commented on Jun 18, 2021

@stale

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

Adminius

Adminius commented on Jun 19, 2021

@Adminius
Author

push

stale

stale commented on Jun 19, 2021

@stale

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

40 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Bluetooth classic serial connection PIN provided but pairing is without PIN · Issue #4566 · espressif/arduino-esp32