@mkurtz was this fixed for you? I have had some cases with latest sweetblue (3.2) where I can't always disconnect reliably.
Posts made by caeduk
RE: Prevent reconnect regardless of disconnect reason
RE: Explicit disconnect triggers automatic reconnect?
I was able to make it work by always keeping the last updated connection state manually:
I have a BehaviourSubject (or BehaviourRelay) where I track the latest connection state I have a boolean flag inside the ReconnectFilter which I switch off and then it returns stopRetrying(), etc before I ask for a disconnect. I set a NoReconnectFilter() before asking for a disconnect. I call disconnect_remote() and undiscover() when I ask for a disconnect I explicitly trigger a STATE_DISCONNECTED on my BehaviourSubject after this, so the rest of the app continues and we get no more notification from sweetblue after this. Firmware update works normally and we recover from this.
RE: Native state doesn't match reported state
I found your post here https://forum.sweetblue.io/topic/12/explicit-disconnect-triggers-automatic-reconnect and I was actually able to make it work, but it's tricky