Hi everyone,
I'm currently working on a bluetooth speaker project, and what i'm trying to do now is to create a network to share the audio between several speakers. I tried first to investigate solutions with the ESP-MDF, but apparently the mesh network doesn't support audio yet.
So i decided to switch from mesh to my own Wi-Fi network, started to learn about Wi-Fi in general and its protocols, and found that apparently UDP is probably the best for audio sharing, as it's not necessary to establish a secured connection between the server and the client, and also no need to recover a lost audio packet when talking about streming. So I started to work with the UDP multicast example (https://github.com/espressif/esp-idf/tr ... _multicast), which work fine, as long as i'm using an external Access Point, but not when one of the ESP is the access point.
Let me explain this in more details: in my case, i want to have one speaker acting as a server, with which i can connect with my phone to or whatever by bluetooth, sending this one audio, which will share audio to one or many other speakers (clients).
But for my first tests, I didn't start with audio, but only some message (less than 40 bytes) every 1 or 2 seconds.
- I tried first with two ESP boards: first as sender and access point, second one as receiver, connected to the first one. I'm losing a lot of packets (more than 90%).
- Then I tried to use my phone as the access point for both boards, still having the first sending packets, and second one receiving them: i've got very good results, like losing less than 5% of the packets.
- Finally, i replace my phone with a third board acting only like access point, not sending or receiving anything, just used the simple_wifi example set as access point. Again, i'm losing loads of packets.
So i arrived at the conclusion that the problem must comes from the ESP configured as Access Point. So my question is the following: do you know if there are some parameters that i can change to improve the performance of the ESP when it turns to be Access Point? Or do you think something else could work better than multicast?
Any help will be gratefully received.
Using UDP multicast example to share audio
Re: Using UDP multicast example to share audio
I just did some other tests, by using unicast this time as I found that multicast can be an issue (https://tools.ietf.org/id/draft-mcbride ... nt-01.html). I've got very good results, even by using an ESP as Access Point (I miss the first packets, but then when I received one succefully, I also received pretty much every next ones), but I still don't get what the problem when I'm using multicast with an ESP as AP instead of my phone..
Re: Using UDP multicast example to share audio
Hello! I am not very experienced with the ESP32 and can sadly not answer any of your problems, but I am very much interested in building the same setup you described as your goal. 1 phone with a bluetooth connection streaming audio to multiple speakers. I would be very happy if I could get some more information about your project, the status and maybe if I could help you in some way / if we could collaborate.
Please contact me via email if you are willing to share some information with me
jakobgoldmann@gmx.at
Please contact me via email if you are willing to share some information with me
jakobgoldmann@gmx.at
-
- Posts: 2
- Joined: Mon Jun 01, 2020 1:46 pm
Re: Using UDP multicast example to share audio
Hi Piocky, did you get to succesfully produce this arrange of boards?
Thanks
Thanks
Who is online
Users browsing this forum: No registered users and 317 guests