Questions about Bluetooth streaming #26
-
I am investigating the idea of streaming Internet radio to a bluetooth speaker. I understand that the esp32 cannot do both WiFi and Bluetooth at the same time so I was thinking of using 2 esp32's and connecting them together using i2s. Which brings me to my question. Does the Bluetooth streamer only run at 44100, 16 bit? I am asking because various Internet radio stations stream at 320kbps or 128k bps so I am not sure how to couple the url streamer on one esp32 to the Bluetooth streamer (a2dp) on another esp32. Any help would be appreciated. Nice library BTW. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 15 replies
-
Interesting question. One small disclaimer: I did't try this myself so I don't know all the stumbling blocks!
I suggest that you experiment first a little bit with the following sketch: So there is a good chance that in most cases it might just work... |
Beta Was this translation helpful? Give feedback.
-
What I forgot to mention: As far as I know A2DP supports some adaptive speed adjustments and can automatically switch between the following rates
|
Beta Was this translation helpful? Give feedback.
-
Excellent thanks for the quick response. will try some things and report
back.
…On Wed, Oct 27, 2021 at 11:39 AM Phil Schatzmann ***@***.***> wrote:
What I forgot to mention: As far as I know A2DP supports some adapting
speed adjustments and can automatically switch between the following rates
- 16000
- 32000
- 44100
- 48000
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH6K5D2I4G5IW2GFR7NJWQ3UJBBN7ANCNFSM5G23DGDQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Craig Lindley / Heather Hubbard
New Recordings are here <http://craigandheather.net/spellbound.html>
Personal Website is here <http://craigandheather.net>
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
|
Beta Was this translation helpful? Give feedback.
-
My stupidity. I left out a letter in the bluetooth name.
But now I have a different problem which I am researching. I connected up
two esp32s using i2s as follows:
ESP32 #1 ESP32 #2
Vin Vin
Gnd Gnd
22 SD 32
21 WS 15
5 SCK 14
Where ESP32 #2 is the device which transmits the Bluetooth audio.
I first ran your sketch streams-generator-a2dp.ino on esp32 #2 and got a
nice tone from my speaker. I then replaced that sketch
with streams-i2s-a2dp.ino and put streams-generator-i2s.ino on esp32 #1
after changing the pin numbers of course and got nothing but random garbage
out. Since I wired Vin/Gnd in both devices together they boot at the same
time and I wonder if this is part of the problem.
I'll let you know what I find out.
…On Thu, Oct 28, 2021 at 10:53 PM Phil Schatzmann ***@***.***> wrote:
What was the problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH6K5D3ILQMM26MFITAQ4TTUJIZGXANCNFSM5G23DGDQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Craig Lindley / Heather Hubbard
New Recordings are here <http://craigandheather.net/spellbound.html>
Personal Website is here <http://craigandheather.net>
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
|
Beta Was this translation helpful? Give feedback.
-
If you have the posibility to add a button to switch between a2dp and internet radio... that would be the most easiest way there is. |
Beta Was this translation helpful? Give feedback.
-
I would like to join this discussion, but with a different question. Another thing, It might be nice to have the option of connecting to my earbuds (that already works perfectly) or to connect to my phone and then use recording software to either visualize or just for showing purpose. Issues could be, that the phone should be the Master in this case and to change the BT identifier of the ESP, in a manner that everything works together. |
Beta Was this translation helpful? Give feedback.
Interesting question. One small disclaimer: I did't try this myself so I don't know all the stumbling blocks!
I think most likely you will be streaming mp3. So the relevant information is provided by the codec. I noticed that most often I am getting the following output:
And this is exactly what you need for A2DP as well!
I suggest that you experiment first a little bit with the following sketch:
https://github.com/pschatzmann/arduino-audio-tools/tree/main/examples/examples-player/player-url-i2s
So there is a good chance that in most cases it might just work...