How to properly switch bluetooth devices? #436
-
I am using a2dp_sink.
Though it seems like after disconnecting, I just get some sound coming out of the speaker and once I connect to a new device, the esp32 completely crashes/restarts. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
When I was testing, I was disconnecting from my phone and then reconnecting from the same or another device... If you don't disconnect from the phone you run the risk that the phone might try to reconnect which might mess up what you try to do I don't think that you should call set_discoverability() yourself, but rely on the API to set this automatically based on the status. |
Beta Was this translation helpful? Give feedback.
When I was testing, I was disconnecting from my phone and then reconnecting from the same or another device...
I confirm that you better set auto_reconnect(false);
If you don't disconnect from the phone you run the risk that the phone might try to reconnect which might mess up what you try to do
Did you already try to call end() and then start() ?
I don't think that you should call set_discoverability() yourself, but rely on the API to set this automatically based on the status.