weliem / blessed-android

BLESSED, a Bluetooth Low Energy (BLE) library for Android
MIT License
557 stars 119 forks source link

#168 - Notify Failure #170

Closed sean7512 closed 1 year ago

sean7512 commented 2 years ago

This address the issue with notifications not working when attempting to notify all connected centrals that want to be notified. #168

sean7512 commented 1 year ago

Interesting. Even if I stop scanning (so in peripheral only) the notification doesn't work, so I don't think it's related to being both. I can go back to the drawing board.

sean7512 commented 1 year ago

Ok, so after some debugging some more (sorry, I've been doing so many combinations of things...)

  1. Notifications do work in 2.4.0 if I am not scanning (peripheral only)
  2. When doing both, after connecting, the library then receives a onConnectionStateChange event of disconnected, which then removes the device from the internal list and that is why it isn't working.

With that in mind, this PR is invalid and I can close the original Issue or rename the Issue to say that notifications don't work on 2.4.0 when acting as both a peripheral and central simultaneously.