Add setMTU function to BLEClient.cpp/.h (#4999)

The current implementation has a getMTU function which returns the mtu sent in a message.

This function allows you to set the MTU value on the connected device, it first sets the MTU locally by calling esp_ble_gatt_set_local_mtu. It then calls esp_ble_gattc_send_mtu_req to have the connected device also change its MTU size.
This commit is contained in:
Eric Albers
2021-04-15 09:07:45 -04:00
committed by GitHub
parent f3dca15a6f
commit 7a4e7066f9
2 changed files with 36 additions and 1 deletions

View File

@ -57,7 +57,8 @@ public:
uint16_t getConnId();
esp_gatt_if_t getGattcIf();
uint16_t getMTU();
bool setMTU(uint16_t mtu);
uint16_t m_appId;
private:
friend class BLEDevice;