Closed LipJ01 closed 1 year ago
try master branch
fixed in 1.28.8
I've just tested. This is NOT fixed. Please reopen issue and perhaps slow down the releases a tad.
Hi! This problem also exists in version 1.29.11 (Flutter 3.16.2 on Android 11). Please reopen this thread.
@sprimm98 open a new issue.
also perhaps you can debug the issue, and open a PR. maybe the problem is here.
// Service UUIDs
List<String> serviceUuidsB = new ArrayList<String>();
if(serviceUuids != null) {
for (ParcelUuid s : serviceUuids) {
serviceUuidsB.add(uuidStr(s.getUuid()));
}
}
Thanks for replying @chipweinberger. For now, I'll set continuousUpdates
back to true
for scanning as this seems to solve the problem. I don't think there is an issue with that snippet above, maybe it's related to the Bluetooth module.
please can you try to debug it? ie why do you need to set continuousUpdates
to get a response?
this seems to be a common problem
its related to this bug: https://github.com/boskokg/flutter_blue_plus/issues/710#issuecomment-1837140039
can you add these logs
log(logLevel.DEBUG, remoteId + " advHex:" + advHex);
// filter duplicates
if (((boolean) mScanFilters.get("continuous_updates")) == false) {
boolean isDuplicate = mAdvSeen.containsKey(remoteId) && mAdvSeen.get(remoteId).equals(advHex);
mAdvSeen.put(remoteId, advHex); // remember
if (isDuplicate) {
log(logLevel.DEBUG, "filtered duplicate. " + remoteId);
return;
}
}
// filter keywords
String name = scanRecord != null ? scanRecord.getDeviceName() : "";
List<String> keywords = (List<String>) mScanFilters.get("with_keywords");
if (filterKeywords(keywords, name) == false) {
log(logLevel.DEBUG, "filtered keyword " + remoteId);
return;
}
// filter divisor
if (((boolean) mScanFilters.get("continuous_updates")) != false) {
int count = scanCountIncrement(remoteId);
int divisor = (int) mScanFilters.get("continuous_divisor");
if ((count % divisor) != 0) {
log(logLevel.DEBUG, "filtered divisor " + remoteId);
return;
}
}
These logs worked as expected, showing remoteId
and advHex
. So I went back to startScan
and assumed this was caused by CALLBACK_TYPE_FIRST_MATCH
. However, you have already addressed this in the latest release. Thanks.
Requirements
Have you checked this problem on the example app?
No
FlutterBluePlus Version
1.27.1-1.28.7
Flutter Version
3.14.0
What OS?
iOS
OS Version
17.1.1
Bluetooth Module
Nordic nRF52833
What is your problem?
The following code snippet no longer works the same. Prior to 1.27.1 This will find the serviceUUID that my ble device is advertising. Post 1.27.0 I always have empty serviceUUID field in advertismentData.
Logs