移植到ESP32说明(依赖ESP-IDF):
https://github.com/bluekitchen/btstack/tree/master/port/esp32
一个蓝牙2.0 A2DP发送端,可以连接小米蓝牙音箱:
https://github.com/bluekitchen/btstack/blob/master/example/a2dp_source_demo.c
需要把源码里面这行:
static const char * device_addr_string = "00:21:3C:AC:F7:38";
里面的mac地址改为你的蓝牙喇叭地址.
使用方法:
b - AVDTP Source create connection to addr E8:07:BF:1C:43:74
B - AVDTP Source disconnect
c - AVRCP Target create connection to addr E8:07:BF:1C:43:74
C - AVRCP Target disconnect
x - start streaming sine
z - start streaming 'nao-deceased by disease'
p - pause streaming
离线