-
Notifications
You must be signed in to change notification settings - Fork 346
Unify nRF & ESP BLE interface #1277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
well did a first test with thinknode M5 ... it connects but I have no response to APPSTART :( I have an heltec_v3, I'll try with it ... update: I erased the device, removed it from the PC and did the pairing again ... now I can connect Is it necessary to to a full erase before using it with the new lib ? |
On my test devices it was not necessary, but the MAC is the same and bluetooth keys on ESP are on the NVS partition, they can conflict. A factory reset won't erase that. On paper IDF and nimBLE does not use the same namespace on NVS, but it can cause hard-to-debug bugs. Completely ditching ESP-IDF and using a brand new lib so starting fresh on flash is recommended. |
ripplebiz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
|
regarding NVS clearing: #1294 |
this won't be enough now because after upgrade if the user can't reconnect, then can't invoke factory reset. we can create code to call nvs format exactly once, but after the countless nRF corruption errors from the past weeks(months?) I would highlight in the next release's changelog that a backup - full erase - restore is highly recommended. |
need to re-think the BLE bonding invalidation, and how to make this a seamless update for users.
|
we can do a one-time NVS clear, but we can't ask the phone to re-pair. iOS notoriusly disregards anything and just tries to connect forcefully to a bond. |
Core Stuff
Unified common code into SerialBLECommon.h base class
(it should reside in a helpers/bluetooth folder with all the nrf/esp files, but this PR is not for tidying up)
ESP32: Migrated from ESP32 BLE library to NimBLE - Re-pair could be needed! Full erase would be preferable for updating to clear out old BT library stuff from the flash. Factory reset does not clear that.
Connection
Dynamic connection parameters
Queue & Transfer Improvements
ESP32 Specific:
Well... everything that nRF had already are now in ESP's interface :) even "turbo mode"
The two platform's BLE interface is now more or less the same (with library dependent differences of course)