diff --git a/components/ble_gatt_server/include/ble_gatt_server.hpp b/components/ble_gatt_server/include/ble_gatt_server.hpp index e096de87f..8698bcd7a 100644 --- a/components/ble_gatt_server/include/ble_gatt_server.hpp +++ b/components/ble_gatt_server/include/ble_gatt_server.hpp @@ -520,7 +520,7 @@ class BleGattServer : public BaseComponent { /// Get the connected device name /// @param conn_info The connection information for the device. /// @return The connected device name. - std::string get_connected_device_name(NimBLEConnInfo &conn_info) { + std::string get_connected_device_name(const NimBLEConnInfo &conn_info) { if (!server_) { logger_.error("Server not created"); return {}; @@ -581,7 +581,7 @@ class BleGattServer : public BaseComponent { /// Get the RSSI of the connected device /// @param conn_info The connection information for the device. /// @return The RSSI of the connected device. - int get_connected_device_rssi(NimBLEConnInfo &conn_info) { + int get_connected_device_rssi(const NimBLEConnInfo &conn_info) { if (!server_) { logger_.error("Server not created"); return {};