Commit graph

15 commits

Author SHA1 Message Date
h2zero
3e9a63a514 Correct flags for advertisement type. 2020-11-06 15:44:35 -07:00
wakwak_koba
8d550a6905 Fixed incomplete payload size calculation
* Fixed incomplete payload size calculation

* Disable tx_pwr_lvl when RSP is not possible
2020-10-24 07:57:17 -06:00
h2zero
91b5916cf4
Add duration and callback parameter to NimBLEAdvertising::start
* Adds functionality to advertise for a set duration, similar to NimBLEScan::start.
The first parameter being the duration (in seconds).
The second parameter is a pointer to a callback function that is invoked when advertising stops.

* NimBLEAdvertising::isAdvertising method added, returns true if advertising is currently active.
2020-09-13 20:36:59 -06:00
h2zero
1a52245012 Update documentation.
* typo fix
2020-09-13 20:02:15 -06:00
h2zero
26b3ba3e8f Fix delayed advertising when first called. 2020-09-02 12:05:05 -06:00
h2zero
d3aa435448 NimBLEAdvertising: Remove setMin/maxPreferred methods.
* These methods were noop's and are now removed due to lack of usefulness and advertisment space consumed if used.
Applications can still manually set these values if desired using NimBLEAdvertisementData::addData.
2020-08-21 20:22:13 -06:00
h2zero
f1a13d5949 Advertising: Add overloaded method for addData.
* Implements addData(char * data, size_t length) as an alternative to passing a std::string.
2020-07-27 21:38:22 -06:00
h2zero
2a5df0c905
Add feature: remove service (#17)
* Get service handles on server start

* remove service + indicate service changed

* Reset gatt services when no connections active and services changed.

* NimBLEServer::createService can now be used any time and will send service changed
indication if server was already active.

* Add ability to remove advertised serviceUUIDS

* Adds addService() method to server to be allow user to re-add a service previously removed

* Add destructior to NimBLEServer, NimBLEService and NimBLECharacteristic to release allocated resources.
2020-07-13 21:24:07 -06:00
h2zero
aae2a8f1e3
Fix comments for doxygen (#16)
* Fix comments for doxygen

* Add documentation and update readme.
2020-07-08 19:27:26 -06:00
h2zero
e987ad58b2 Refactor server code to use vectors instead of maps.
* Use critical sections to access characteristic/descriptor value data.

* Remove unnecessary code

* Create characteristic semaphore only if needed for indications.

* Fix advertising when not broadcasting a service.
2020-06-07 18:42:28 -06:00
h2zero
fc1022a46d Add new getServer() method.
Previously we used createServer() to get a reference to the server instance.
This was problematic when using advertising only as it would create a server
when starting advertising. This prevents that and provides better semantics.
2020-05-14 12:59:35 -06:00
h2zero
03cb7b21d9 Conditionally compile code for specific roles.
This allows NimBLE options in menuconfig to reduce code size based on
the roles selected (scan/advertising/central/peripheral).

Significant code space can be saved by removing unnecessary roles for the application.
2020-05-13 22:03:56 -06:00
h2zero
f0191eb1e6 Add ==,!= operators to NimBLEAddress, pass parameters by const reference. 2020-05-10 07:21:46 -06:00
h2zero
3327a32341 Merge bugfix branch into master 2020-04-13 19:13:51 -06:00
h2zero
5d4332e945 Initial commit. 2020-03-29 17:44:20 -06:00