-
-
Notifications
You must be signed in to change notification settings - Fork 204
Open
Description
I'm working on a project that implements multiple virtual keyboard devices.
When switching devices I call NimBLEDevice::deinit(true) and then reinitialize again with init(). It works fine, but I'm limited in the number of devices by the nimble bond store. What's worse is that pairing/unpairing multiple devices on one virtual device can break bonding on others.
What would be ideal is a way to change NimBLE's NVS namespace name - that would keep bound devices for each virtual device separate.
I've hacked this by redefining NIMBLE_NVS_NAMESPACE in ble_store_nvs.c
//#define NIMBLE_NVS_NAMESPACE "nimble_bond"
const char* NIMBLE_NVS_NAMESPACE = "nimble_bond";and updating it in my code:
extern const char* NIMBLE_NVS_NAMESPACE;
// deinit before
sprintf(nvsName, "nimble_bond_%i", virtualDeviceIndex);
NIMBLE_NVS_NAMESPACE = nvsName;
// reinit afterThe above works, but an official way to do this would be nice.
(Also open to suggestions for an existing correct way to do this).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels