Commit graph

13 commits

Author SHA1 Message Date
h2zero
492bcf6f78 Add undefined getServiceUUIDCount() 2020-08-15 07:40:01 -06:00
h2zero
f3e0d66853 Remove advertisment type from advertised device string. 2020-08-03 20:25:48 -06:00
h2zero
1a5beaa7c0
Store address type in NimBLEAddress. (#25) 2020-07-30 14:57:47 -06:00
h2zero
b2df8384b3
Add support for getting multiple services data from advertisments. (#20)
* Add support for getting multiple services data from advertisments.

* Adds new methods for getting advertised service data and UUIDS.
- getServiceData(index), gets the service data by index value.
- getServiceData(NimBLEUUID), gets the service data by UUID.
- getServiceDataCount(), gets the number of services with data advertised.

* Templates added for getServiceData(index) and getServiceData(NimBLEUUID)
  to be able to specify the data type returned by these methods
  Example:
      getServiceData<uint32_t>(NimBLEUUID("ABCD");

* Also added:
- getServiceUUID(index), gets the advertised service UUID by index value.
- getServiceUUIDCount(), gets the number of advertised services.
2020-07-28 20:09:54 -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
745f9c00ed Implement scan wantDuplicates parameter in callback registration.
Also adds:
* NimBLEScan::setDuplicateFilter() to tell the controller to filter duplicates
before sending the result to the host.

* NimBLEScan::setLimitedOnly() to tell the controller only report scan results
from devices advertising in limited discovery mode, i.e. directed advertising.

* NimBLEScan::setFilterPolicy() to set the filter policy i.e whitelist only devices.
2020-07-01 17:26:44 -06:00
h2zero
10f544f80a Update remote characteristic value from a notification
* Add NimBLERemoteCharacteristic::getValue(time_t *timestamp = nullptr) to get the latest remote characteristic and (optionally) it's timestamp.

* Added a timestamp to NimBLEAdvertisedDevice for the moment a device was scanned
2020-05-29 18:26:41 -06:00
h2zero
5667c97efe Add access to the adv type of remote device
Adds new method `uint8_t NimBLEAdvertisedDevice::getAdvType()`
to get the advertisement type of the found device.
2020-05-25 18:52:46 -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
fba7e0fd68 NimBLEAdvertisedDevice: Prevent adding dupicate service uuid's. 2020-05-07 22:30:58 -06:00
h2zero
74ba03e3a8 Add CMakeLists.txt.
Fix compilation in strict enviroments.
Fix compliation in IDF v4.0.
2020-03-31 20:16:27 -06:00
h2zero
5d4332e945 Initial commit. 2020-03-29 17:44:20 -06:00