ESP32 A2DP Sink - name of connected source?

daiku_north
Posts: 4
Joined: Thu Nov 18, 2021 8:32 pm

ESP32 A2DP Sink - name of connected source?

Postby daiku_north » Thu Nov 18, 2021 8:35 pm

I'm running ESP32 as an A2DP sink. I am successfully streaming audio, and getting the track metadata (song, artist, etc), but I'd also like to discover the name of the device I'm connected to (like my phone, usually). Is there a way to get that?

daiku_north
Posts: 4
Joined: Thu Nov 18, 2021 8:32 pm

Re: ESP32 A2DP Sink - name of connected source?

Postby daiku_north » Tue Nov 30, 2021 4:39 pm

I found this:
https://docs.espressif.com/projects/esp ... _bd_addr_t
But I can't get it to work. The data returned in the callback is gibberish, and varies over time. Is there an example of a successful implementation?

daiku_north
Posts: 4
Joined: Thu Nov 18, 2021 8:32 pm

Re: ESP32 A2DP Sink - name of connected source?

Postby daiku_north » Wed Dec 01, 2021 2:18 pm

I did get it to work. Make sure you check the "stat" field being 0 in the callback param before trusting the result.

Who is online

Users browsing this forum: No registered users and 65 guests