BLE: Increase mtu (#837)

* Incease mtu & buffer size
* bt: process mtu size in RPC callbacks

Co-authored-by: Tony Freeman <tonyfreeman@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
tonyfreeman
2021-12-08 16:59:40 +03:00
committed by GitHub
parent f0aed7e583
commit c6cb6ae810
7 changed files with 52 additions and 23 deletions

View File

@@ -132,9 +132,9 @@ static void bt_rpc_send_bytes_callback(void* context, uint8_t* bytes, size_t byt
size_t bytes_sent = 0;
while(bytes_sent < bytes_len) {
size_t bytes_remain = bytes_len - bytes_sent;
if(bytes_remain > FURI_HAL_BT_SERIAL_PACKET_SIZE_MAX) {
furi_hal_bt_serial_tx(&bytes[bytes_sent], FURI_HAL_BT_SERIAL_PACKET_SIZE_MAX);
bytes_sent += FURI_HAL_BT_SERIAL_PACKET_SIZE_MAX;
if(bytes_remain > bt->max_packet_size) {
furi_hal_bt_serial_tx(&bytes[bytes_sent], bt->max_packet_size);
bytes_sent += bt->max_packet_size;
} else {
furi_hal_bt_serial_tx(&bytes[bytes_sent], bytes_remain);
bytes_sent += bytes_remain;