question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android scan not returning any device

See original GitHub issue

Version

Tell us which versions you are using:

  • react-native-ble-manager v6.2.4
  • react-native v ^0.55.4
  • Android 8.1

Expected behavior

I have a loop that:

  • connects to one of many advertising devices
  • does some logic (read/write/notify)
  • disconnects and move to the next device in the list.
  • Once every configured time in between iteration, a scan is invoked to identify devices In case there is a communication error with one device, it is removed from the list (unless, discovered again by a new scan).

This logic should work, even if devices are shut down and restarted, or bluetooth is disabled/enabled,

Actual behavior

I don’t have steps to reproduce, but I have observed (and it may take a couple of minutes or a couple of hours), that suddenly all devices are dropped from the list after failure to communicate, and from that moment on, scan returns 0 peripherals and I fail to communicate with the devices in an endless loop. Bluetooth on/off, does not resolve this, only shutting down the application and opening it again resolves this. When this happens, another app such as light blue (on the same phone, or a different one, can identify all the peripherals correctly).

Steps to reproduce

NA Have tried to pinpoint the issue, but was not able to.

Stack trace and console log

Hint: it would help a lot if you enable the debugger (“Pause on exceptions” in the “Source” panel of Chrome dev tools) and spot the place where the error is thrown

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
Sanjeevs1995commented, May 11, 2019

How can one close the issue where a proper solution is not found

0reactions
pumpkin123commented, Sep 6, 2019

I faced the same problem. Some device need LOCATION authority.

Solution: Open LOCATION authority in the device.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BLE Scan Started but doesn't find any device - Stack Overflow
I'm trying create a plugin that scan BLE devices for Flutter. I did it in Kotlin and i started scan from Flutter via...
Read more >
BLE: onLeScan of BluetoothAdapter.LeScanCallback is (not ...
I want to get periodic updates on the RSSI of the advertising packets of a BLE peripheral device. I therefore implemented BluetoothAdapter.LeScanCallback.
Read more >
How to scan a QR code with your iPhone or Android phone
How to scan a QR code with your iPhone or Android phone (no apps needed) ; Open the Camera app and hold your...
Read more >
Scan no longer works thru the hp smart app using Android cel...
If the issue persists , Use the Mopria Scan app to scan documents or photos from your HP printer to your Android device....
Read more >
How to scan a QR code with your iPhone or Android phone ...
How to scan a QR code with your iPhone or Android phone (no apps needed). QR codes are those pixelated squares you see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found