espressif / esp-at

AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266
Apache License 2.0
910 stars 829 forks source link

Add command to return BT Classic MAC address #850

Closed JHedgesBartec closed 2 months ago

JHedgesBartec commented 5 months ago

Is your feature request related to a problem?

When not using BLE on the ESP32-WROOM-32 it is not possible to get the MAC address of the BT controller

Describe the solution you'd like.

A new command which functions similar to AT+BLEADDR but works when BT Classic is initialised. Example Name AT+BTADDR

Describe alternatives you've considered.

No response

Additional context.

This would only work when the BT controller has been initialised with AT+BTINIT=1

Luxin812 commented 2 months ago

The AT+BTADDR? command has been added in the latest master version. You can compile the AT firmware based on the latest master branch for testing.

JHedgesBartec commented 2 months ago

Compiled master with BT Classic enabled and confirmed the AT+BTADDR? command is present:

AT+BTADDR?
+BTADDR:"24:0a:c4:00:36:88"

OK