r/bluetooth • • 6d ago

Why my RFCOMM headphone controller sometimes hung on "Connecting…" forever, and how I handle it now

I make a native macOS menu bar app that talks to Sony headphones over IOBluetooth RFCOMM (ANC, ambient, EQ). A few users reported it sitting on "Connecting…" forever. The channel was open, but the headphones never answered the session open request, and my code just kept waiting for an ACK that wasn't coming.

What 1.3 does now:

  • If the open request isn't acknowledged, it's resent at 3 s and again at 6 s
  • Each handshake attempt gets 8 s in total before it counts as failed
  • After a failed handshake, auto-reconnect backs off at 5 s, 15 s and 45 s, then stops and shows the reason instead of spinning
  • There's a Cancel button while it's connecting
  • 262 unit tests run on each build, 81 of them for the Sony code; the byte frames didn't change

Honest part: it's only tested on a real WH-1000XM5. Other models are Experimental.

Questions for people who've done RFCOMM on macOS: when a peer goes quiet, do you resend on the same channel or close and reopen it? And are 3/6 s resends reasonable, or too aggressive for a headset that's still waking up?

If you want to poke at it, it's free on the Mac App Store. If it works for you, an honest App Store review helps a solo dev a lot. If it doesn't, tell me here and I'll fix it.

https://apps.apple.com/app/apple-store/id6833635897?pt=128665136&ct=reddit-bluetooth&mt=8

I'm the dev, AMA.

1 Upvotes

1 comment sorted by

1

u/azardandona26 6d ago

Newest builds (with more logging around the handshake) are on TestFlight: https://testflight.apple.com/join/HZVTxTff