Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection problem with iOS 15 and no playback #163

Open
richardklingler opened this issue Jan 24, 2022 · 9 comments
Open

Connection problem with iOS 15 and no playback #163

richardklingler opened this issue Jan 24, 2022 · 9 comments
Labels
help wanted Extra attention is needed

Comments

@richardklingler
Copy link

When I disconnect my mac mini and want to add a connection from my iPhone 8 instead, a connection isn't possible at all...

I have to turn off Bluetooth on my mac mini or shut it down...
Then I am able to make a connection from my iPhone but playing back is not possible as the device isn't listed under the airdrop menu.

Under bluetooth settings it offers me to select what device type it is...like heaphone, speaker and so on.....
can this be set in the firmware?

Others not able to play back from an iOS device?

This is with the ESP32 -2.0.2 version as I use volume control from the source.

@pschatzmann
Copy link
Owner

https://github.com/pschatzmann/ESP32-A2DP/wiki/Auto-Reconnect

If you plan to use it from different devices I would recommend to switch the automatic reconnect off or set the retry to a very low value

@richardklingler
Copy link
Author

Well even if I remove the connection from the mac mini and switch it off...then restart the esp32 I can connect from my iPhone to the esp32....but just not play anything as the output device isn't listed....

@pschatzmann
Copy link
Owner

Did you switch the auto reconnect off ?

@richardklingler
Copy link
Author

richardklingler commented Jan 24, 2022

Very confusing this auto reconnect....

So for macOS I need to turn it on and for iOS off.....though iOS and macOS would now behave the same...

@pschatzmann
Copy link
Owner

On the ESP32 you would deactivate it with a2dp_sink.set_auto_reconnect(false, false, 0);

@richardklingler
Copy link
Author

Yes this works for iOS...but then for macOS it won't reconnect automatically on startup, which is the preferred method for a PC when the esp32 was selected as audio output...

Can I detect what device type is connected to the esp32?

@FairwindSrl
Copy link

I have found the same issue with Android (autoconnect=false): if I try to turn off Bluetooth on smartphone without disconnect or unpair the device, turn on Bluetooth and retry to connect, Android warn "connection failed".
This happens also in other condition, randomly.
After disconnection by remote, I have also try to call "end" method followed by "start" method in order to clean memory or variables, but the device still not connect (until I do a hard reset).
It is like as the ESP32 memory is not perfectly clean and Bluetooth core refuse or ignore connection.
I am testing connection from various devices (Android, iPhone, Windows Laptop).

@pschatzmann pschatzmann added the help wanted Extra attention is needed label Apr 20, 2022
@tomtomhoward
Copy link

tomtomhoward commented Sep 7, 2022

I am finding the same thing - I am trying to build a device that will be used by multiple users, in a music practice room.
I am using ESP32 so I can create devices that are nameable for each room.

I have auto reconnect off, I am using an example sketch but I have changed the pins (for physical soldering the DAC to the pins directly) and added a callback to turn on/off the LED for connection status.

If I connect with iPhone, disconnect, then reconnect I either get silence, or the ESP32 hangs and the light stays on after the phone has disconnected.
With a laptop, the ESP32 regularly hangs on disconnection, especially if I turn the bluetooth off directly rather than disconnecting properly.

Is there a watchdog that could be checked to restart the ESP32 in case of error? Manually resetting the ESP32 fixes it each time.

The only difference is I am using a2dp_sink.set_auto_reconnect(false); rather than (false, false, 0), the 2nd version above won't verify . In Arduino

Edit again: I have updated to the latest release June with the separate I2S output and ti seems more stable.
As my ESP32 is only running this audio output I have also restarted the ESP on disconnect as is back in about 0.5s and it clears out so it's a fresh session each time

Repository owner deleted a comment from dhdhdhdhdhdhhd Oct 5, 2023
@mrhempman69
Copy link

See also: #495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants