Closed nemoo2580 closed 3 years ago
That's an interesting finding. Would it be possible to try the Scan example from NimBLE Arduino library? And see if you get the same behavior.
We are using the last version of the library.
iNode Energy Meter sensor to your gateway
That's cool :-)
The problem is with active scanning (line) and low RSSI (that "sometimes" mean at the edge of the range).
Probably iNode Energy Meter is losing "Scan request" packet from ESP32 or ESP32 doesn't get a response and AdvertisedDeviceCallbacks is not invoked here.
Passive scaning works fine. Is active scanning needed for other currently supported sensors (getting additional data for advertisement)?
In my use case i need work with low RSSI and only one iNode sensor, so maybe I have to use my own compilation with pBLEScan->setActiveScan(false)
.
By the way, thanks for you good job with this project :)
Passive scaning works fine. Is active scanning needed for other currently supported sensors (getting additional data for advertisement)?
We have been using active scanning from the beginning, I may do some test to see if I'm able to retrieve the same amount of data with passive scanning.
In my use case I need work with low RSSI and only one iNode sensor, so maybe I have to use my own compilation with pBLEScan->setActiveScan(false).
If you want to integrate the device on a maintainable way, we may set this boolean as a parameter, at build, at run time by MQTT or alternating between passive and active.
But I will do some tests first.
By the way, thanks for you good job with this project :)
With pleasure, thanks for participating!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Hello. I am working on integrating the iNode Energy Meter sensor to your gateway, but I noticed that sometimes method
onResult
fromMyAdvertisedDeviceCallbacks
is not invoked for all found devices during Bluetooth scan. It may be a bug in the NimBLE library, but can be mitigated with devices returned from scan method:BLEScanResults foundDevices = pBLEScan->start(Scan_duration / 1000, false);
.To Reproduce
development
branch with profileesp32dev-ble
andtrace
log level.onResult
method) was displayed less time than number of found devices.Expected behavior Method
onResult
fromMyAdvertisedDeviceCallbacks
should be invoked for all found devices.Logs Logs with "TEST" phrase are from iterating over the found devices. For invalid behavior (only one log "Creating BLE buffer", but 2 devices found):
For valid behavior:
Environment: