diff options
author | Bruno Randolf <br1@einfach.org> | 2019-01-05 18:34:13 +0000 |
---|---|---|
committer | Bruno Randolf <br1@einfach.org> | 2019-01-05 18:36:39 +0000 |
commit | 30436c84b2c35982c41c33a7adfb0307884f5ee9 (patch) | |
tree | 540f790b12ca77bac7099d0885148e11fcb54ab4 /src/Mgmt.h | |
parent | Improved handling of connection counts dealing with latent disconnects on sta... (diff) | |
download | gobbledegook-30436c84b2c35982c41c33a7adfb0307884f5ee9.tar.gz gobbledegook-30436c84b2c35982c41c33a7adfb0307884f5ee9.tar.bz2 gobbledegook-30436c84b2c35982c41c33a7adfb0307884f5ee9.zip |
Add setting of discoverable mode
This is necessary for the advertisements to be in "LE General
Discoverable Mode" which makes them visible (especially to other Linux
boxes).
Signed-off-by: Bruno Randolf <br1@einfach.org>
Diffstat (limited to 'src/Mgmt.h')
-rw-r--r-- | src/Mgmt.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -190,6 +190,13 @@ struct Mgmt // Returns true on success, otherwise false bool setName(std::string name, std::string shortName); + // Sets discoverable mode + // 0x00 disables discoverable + // 0x01 enables general discoverable + // 0x02 enables limited discoverable + // Timeout is the time in seconds. For 0x02, the timeout value is required. + bool setDiscoverable(uint8_t disc, uint16_t timeout); + // Set a setting state to 'newState' // // Many settings are set the same way, this is just a convenience routine to handle them all @@ -258,4 +265,4 @@ private: static const uint16_t kDefaultControllerIndex = 0; }; -}; // namespace ggk
\ No newline at end of file +}; // namespace ggk |