diff --git a/components/ble_gatt_server/include/ble_gatt_server_menu.hpp b/components/ble_gatt_server/include/ble_gatt_server_menu.hpp index 9336ec5f7..89d943e56 100644 --- a/components/ble_gatt_server/include/ble_gatt_server_menu.hpp +++ b/components/ble_gatt_server/include/ble_gatt_server_menu.hpp @@ -336,11 +336,13 @@ class BleGattServerMenu { /// @param out The output stream to write to. /// @param duration_ms The duration to advertise for. /// @param directed_address The address to advertise to. + /// @param addr_type The address type to advertise to. void start_advertising(std::ostream &out, uint32_t duration_ms, - const std::string &directed_address = "") { + const std::string &directed_address = "", + uint8_t addr_type = BLE_ADDR_PUBLIC) { NimBLEAddress *addr = nullptr; if (directed_address.size() > 0) { - addr = new NimBLEAddress(directed_address); + addr = new NimBLEAddress(directed_address, addr_type); } server_.get().start_advertising(duration_ms, addr); out << "Started advertising\n"; @@ -374,8 +376,10 @@ class BleGattServerMenu { /// @brief Add an address to the whitelist. /// @param out The output stream to write to. /// @param address The address to add to the whitelist. - void whitelist(std::ostream &out, const std::string &address) { - NimBLEAddress addr(address); + /// @param addr_type The address type to add to the whitelist. + void whitelist(std::ostream &out, const std::string &address, + uint8_t addr_type = BLE_ADDR_PUBLIC) { + NimBLEAddress addr(address, addr_type); NimBLEDevice::whiteListAdd(addr); out << "Added " << address << " to the whitelist\n"; } diff --git a/components/esp-nimble-cpp b/components/esp-nimble-cpp index e4d2e991f..cfca3e750 160000 --- a/components/esp-nimble-cpp +++ b/components/esp-nimble-cpp @@ -1 +1 @@ -Subproject commit e4d2e991f1c5db2cedb56f53d8081cfafa7c8f9e +Subproject commit cfca3e75009a256d5ddfaf4670b201b16a5dd046