device.isConnected does not return the true connection state
See original GitHub issueThe following code prints incorrect information as far as I can tell:
console.log('await device.isConnected()', await device.isConnected()); // logs false
await device.connect();
console.log('await device.isConnected()', await device.isConnected()); // logs false
The first log statement should be false, but the second log statement should be true.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
device.isConnected does not return the true connection state
I think I see what's happening, the device.isConnected() call is returning an updated device, but the state of the original device does not...
Read more >If isConnected returns true, why does Exeption say that it isn't ...
isConnected() tells you about the state of the Socket . If you have ever connected or accepted it, it returns true. Even after...
Read more >IoT Hub Device twin returning connectionState ...
Re: IoT Hub Device twin returning connectionState = Disconnected, when it's actually connected.
Read more >Fix your Google Nest Wifi or Google Wifi network
Follow these troubleshooting steps to fix: Google Nest Wifi router or point or Google Wifi point shows offline in mesh test; Can't connect...
Read more >How to troubleshoot Android Wi-Fi connection problems
Return to your Android device's Settings > Wireless & Networks > Wi-Fi ... When status is Connected, tap Advanced to view the client's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, this gives incorrect results as well, I would expect the bleManager to be maintaining the global state of the device at all times:
This issue is still present on version 2.0.0. Everytime I try to check the status of a connected device by using isDeviceConnected it always returns false. Please check the following code, despite of sending a connected device Id, I always get Device AA:BB:CC:DD:EE:FF is NOT connected!:
Context: I need to check by using the built-in RN AppState component whether a device the user was using before switching of apps (or after coming back from background) it’s still connected…
Is there any fix in progress or a workaround available?
Thanks in advance!
Federico