NimBLEDevice::init to take an max number of connection optional parameter #810
davidlao2k
started this conversation in
Ideas
Replies: 1 comment
-
The problem with this approach is that when using a device such as the nRF5x that the underlying stack statically allocates memory for the max connections, so this would be problematic and potentially cost a lot of ram for these devices without a need.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use an esp32 to pull counters from 8 ble devices continuously. I often find myself having to manually updating nimconf.h with non-default CONFIG_BT_NIMBLE_MAX_CONNECTIONS, and easily forget that when working on different build environment or when a new version become available.
Since this is just a pass through value, how about changing the init signature to below to make life easier?
bool NimBLEDevice::init(const std::string& deviceName, uint8_t maxConnections = CONFIG_BT_NIMBLE_MAX_CONNECTIONS)
...
bt_cfg.ble_max_conn = maxConnections;
...
Any objection?
Beta Was this translation helpful? Give feedback.
All reactions