0

I have a Bluetooth LE module I connect to with an App (Xamarin based, but not sure that's important).

I have noticed that I have some case where I connect to the module, then quickly (attempt to) disconnect, and the module "disappears". It does not show on scans from other devices.

What's really surprising is that the module stays "invisible" until I turn off the android device I ran the app on, or power-cycle the device with the module. Surprising to me -- even turning off Bluetooth in android device does not "free it up", BUT "Airplane Mode" does!

I was able to verify that when it gets into this "invisible" mode, the module believes it is still connected. But I assume that the android Bluetooth stack should drop the connection when the app exits. And even if not, turning off Bluetooth would end connections, wouldn't it?

FreakyAli
  • 13,349
  • 3
  • 23
  • 63
bobwki
  • 794
  • 6
  • 22
  • I've seen this with my bluetooth device as well. I'm using react-native for my app, but the bluetooth stack can get into a state where even after I've hard-closed the app, the phone still seems to have a connection until I airplane-mode the thing. But only sometimes. This is mainly on android, though I've noticed the same on iOS. – ArtHare Nov 28 '18 at 01:50
  • well, of course, this will happen as your application has connected another device using Bluetooth if you terminate the application why would Bluetooth care to disconnect on its own? – FreakyAli Nov 28 '18 at 06:15
  • @G.hakim, I'm surprised that the O.S. doesn't clean up resources for the app. It does under most circumstances when I just end the app -- but not this one. – bobwki Nov 28 '18 at 16:43
  • Well its very simple there are certain things that the device or you can say the os cannot turn off until it has permission to do the same, bluetooth and wifi are one of those things. – FreakyAli Nov 28 '18 at 20:04

0 Answers0