aaronk Well-Known Member Licensed User Longtime User Aug 8, 2017 #1 Hi, I am using the BLE2 lib - https://www.b4x.com/android/forum/threads/ble-2-bluetooth-low-energy.59937/ When I scan for devices: Code: Copy manager.Scan(Null) I then put my device in discovery mode and my app finds the device. So far so good. I then run my app, run the code as per above, then wait 30 seconds, then put my device in discovery mode. My app doesn't find the device. Questions: 1. Is there a timeout value for how long it scans for devices for ? 2. Am I correct if I connect to a BLE device, it will stop the scanning of devices and I then need to re-run the scan ?
Hi, I am using the BLE2 lib - https://www.b4x.com/android/forum/threads/ble-2-bluetooth-low-energy.59937/ When I scan for devices: Code: Copy manager.Scan(Null) I then put my device in discovery mode and my app finds the device. So far so good. I then run my app, run the code as per above, then wait 30 seconds, then put my device in discovery mode. My app doesn't find the device. Questions: 1. Is there a timeout value for how long it scans for devices for ? 2. Am I correct if I connect to a BLE device, it will stop the scanning of devices and I then need to re-run the scan ?
Erel B4X founder Staff member Licensed User Longtime User Aug 8, 2017 #2 Call Scan2 with AllowDuplicated set to False if you want to find the same device more than once. There is no timeout. Though you can force a rescan with this code: https://www.b4x.com/android/forum/t...aspberry-pi-android-things.81972/#post-519129 Upvote 0
Call Scan2 with AllowDuplicated set to False if you want to find the same device more than once. There is no timeout. Though you can force a rescan with this code: https://www.b4x.com/android/forum/t...aspberry-pi-android-things.81972/#post-519129