You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ESP32 devkit board plugged in via USB to PC. No other hardware plugged into the board.
Hardware Configuration
No connections to GPIO pins.
Version
v2.0.13
IDE Name
Arduino IDE 1.8.19
Operating System
Ubuntu 22.04
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
Logging shows the correct value ESP_BT_GAP_DEV_PROP_COD 0x40680 but the sketch shows cod: 26380. Note 0x40680 = 263808 (base 10) so the incorrect value is the decimal value with the least significant digit chopped off.
[ 7020][D][BluetoothSerial.cpp:467] esp_bt_gap_cb(): ESP_BT_GAP_DEV_PROP_COD 0x40680
[ 7027][D][BluetoothSerial.cpp:477] esp_bt_gap_cb(): ESP_BT_GAP_DEV_PROP_RSSI 189
[ 7034][I][BluetoothSerial.cpp:435] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : BlueTooth Printer : 17
>>>>>>>>>>>Found a new device asynchronously: Name: BlueTooth Printer, Address: 66:12:56:03:28:18, cod: 26380, rssi: -67
Board
ESP32 devkit
Device Description
ESP32 devkit board plugged in via USB to PC. No other hardware plugged into the board.
Hardware Configuration
No connections to GPIO pins.
Version
v2.0.13
IDE Name
Arduino IDE 1.8.19
Operating System
Ubuntu 22.04
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
Logging shows the correct value
ESP_BT_GAP_DEV_PROP_COD 0x40680
but the sketch showscod: 26380
. Note 0x40680 = 263808 (base 10) so the incorrect value is the decimal value with the least significant digit chopped off.arduino-esp32/libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp
Line 44 in 02e31b4
The COD is a 24 bit value so "val[6]" is too small. It would be better to display COD in hex like the log message.
Fixing BTAdvertisedDeviceSet::toString() will also make other examples show the correct COD.
Sketch
https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/DiscoverConnect/DiscoverConnect.ino
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: