Title: Feature request: ability to change NVS namespace · Issue #1102 · h2zero/NimBLE-Arduino · GitHub
Open Graph Title: Feature request: ability to change NVS namespace · Issue #1102 · h2zero/NimBLE-Arduino
X Title: Feature request: ability to change NVS namespace · Issue #1102 · h2zero/NimBLE-Arduino
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 ...
Open Graph 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 ...
X 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 ...
Opengraph URL: https://github.com/h2zero/NimBLE-Arduino/issues/1102
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature request: ability to change NVS namespace","articleBody":"I'm working on a project that implements multiple virtual keyboard devices. \n\nWhen 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.\n\nWhat would be ideal is a way to change NimBLE's NVS namespace name - that would keep bound devices for each virtual device separate.\n\nI've hacked this by redefining `NIMBLE_NVS_NAMESPACE` in `ble_store_nvs.c`\n\n```c\n//#define NIMBLE_NVS_NAMESPACE \"nimble_bond\"\nconst char* NIMBLE_NVS_NAMESPACE = \"nimble_bond\";\n```\n\nand updating it in my code:\n\n```c\nextern const char* NIMBLE_NVS_NAMESPACE;\n\n // deinit before\n\n sprintf(nvsName, \"nimble_bond_%i\", virtualDeviceIndex);\n NIMBLE_NVS_NAMESPACE = nvsName;\n\n // reinit after\n```\n\nThe above works, but an official way to do this would be nice. \n\n(Also open to suggestions for an existing correct way to do this).\n","author":{"url":"https://github.com/toptensoftware","@type":"Person","name":"toptensoftware"},"datePublished":"2026-03-04T03:22:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/1102/NimBLE-Arduino/issues/1102"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6d396637-868e-f1bb-1f51-f641b1e575ac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87E6:3F11E1:72DB50:9C3AFD:6A4C3C22 |
| html-safe-nonce | c85aaab827d1f249888a658c049a151de5ff18aca739d5964155500d274a35e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0U2OjNGMTFFMTo3MkRCNTA6OUMzQUZEOjZBNEMzQzIyIiwidmlzaXRvcl9pZCI6IjQwNDExNzQyMTczODk2NjA1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 30d85d4a7b17746837d5d283a345da98dd39da3eb639f22b87f249c9ce01a5f6 |
| hovercard-subject-tag | issue:4019803652 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/h2zero/NimBLE-Arduino/1102/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60243b987f9216d773644f5634beeaa96a801a6b1a73b9a0f0092f497f7540f6/h2zero/NimBLE-Arduino/issues/1102 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60243b987f9216d773644f5634beeaa96a801a6b1a73b9a0f0092f497f7540f6/h2zero/NimBLE-Arduino/issues/1102 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | toptensoftware |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| go-import | github.com/h2zero/NimBLE-Arduino git https://github.com/h2zero/NimBLE-Arduino.git |
| octolytics-dimension-user_id | 32826625 |
| octolytics-dimension-user_login | h2zero |
| octolytics-dimension-repository_id | 244276348 |
| octolytics-dimension-repository_nwo | h2zero/NimBLE-Arduino |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 244276348 |
| octolytics-dimension-repository_network_root_nwo | h2zero/NimBLE-Arduino |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d11deab54ce15bac57bda991cc63805976812c11 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width