https://github.com/espressif/arduino-esp32/blob/078671d273cc203df6b87c5aa1a11e3f1235f25e/libraries/BLE/src/BLECharacteristic.h#L65 This should return a size_t not a uint8_t. Returning a uint8_t limits the MTU that can be used.