Hello,
I'm trying to achieve at least 300 kbp/s via BLE nrf5340 with Android phones (Bluetooth ver.4.2 and ver.5.x).
I use the "nRF Connect" and "Serial Bluetooth" apps. On board I use custom GATT service.
Unfortunately, the maximum effective throupoint is still only 6 kbp/s or less.
Example throupoint.c between two boards works perfectly around 2Mbit/s.
I also tryed modified (patched) example (@ SDK ver.:1.8.0) mentioned in this thread:
https://devzone.nordicsemi.com/f/nordic-q-a/84487/ble-uart-nus-altering-mtu-and-faster-interval
These questions and answers are very informative, but changing the MTU or connection time has no effect:
devzone.nordicsemi.com/.../nrf5340---communicating-with-android-app-at-2-mbps
https://devzone.nordicsemi.com/f/nordic-q-a/54013/nordic-uart-service-nus-speed-improvement
https://devzone.nordicsemi.com/f/nordic-q-a/43061/how-to-achieve-max-throughput-with-nus-service
https://devzone.nordicsemi.com/f/nordic-q-a/84151/maximum-nus-data-length/350180#350180
https://github.com/nrfconnect/sdk-nrf/tree/v1.9.0-rc1/samples/bluetooth/throughput
Is it posible to make reliable firmware where 300kbp/s will be achivable with any phones that have Bluetooth 3.x and above?
This is my prf.conf file:
# # Copyright (c) 2019 Nordic Semiconductor # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # CONFIG_SHELL=y CONFIG_BT_DEVICE_NAME="Nordic_Throughput" CONFIG_BT=y CONFIG_BT_DEBUG_LOG=y CONFIG_BT_SMP=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_CENTRAL=y CONFIG_BT_MAX_CONN=2 CONFIG_BT_SCAN=y CONFIG_BT_SCAN_FILTER_ENABLE=y CONFIG_BT_SCAN_UUID_CNT=1 CONFIG_BT_THROUGHPUT=y CONFIG_BT_GATT_DM=y CONFIG_HEAP_MEM_POOL_SIZE=2048 CONFIG_BT_USER_DATA_LEN_UPDATE=y CONFIG_BT_USER_PHY_UPDATE=y CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n CONFIG_BT_BUF_ACL_RX_SIZE=251 CONFIG_BT_GATT_CLIENT=y CONFIG_BT_ATT_PREPARE_COUNT=2 CONFIG_BT_CONN_TX_MAX=10 CONFIG_BT_L2CAP_TX_BUF_COUNT=10 CONFIG_BT_L2CAP_TX_MTU=247 CONFIG_BT_BUF_ACL_RX_SIZE=251 CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_DK_LIBRARY=y CONFIG_DK_LIBRARY_DYNAMIC_BUTTON_HANDLERS=y CONFIG_SPI=y CONFIG_SPI_SLAVE=y CONFIG_NRFX_SPIS1=y CONFIG_DEBUG_THREAD_INFO=y CONFIG_DEBUG_OPTIMIZATIONS=y CONFIG_BT_BUF_ACL_TX_COUNT=10 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_CTLR=y
connectd callback (It prints out: MTU = 23)
static void connected(struct bt_conn *conn, uint8_t err) { if (err) { LOG_ERR("Connection failed (err %u)", err); return; } LOG_INF("Connected %d", 0); static struct bt_gatt_exchange_params exchange_params; exchange_params.func = exchange_func; err = bt_gatt_exchange_mtu(conn, &exchange_params); if (err) { LOG_ERR("bt_gatt_exchange_mtu failed: %d", err); return; } LOG_INF("bt_gatt_exchange_mtu OK %d", err); err = bt_conn_le_param_update(conn, conn_param); if (err) { LOG_ERR("bt_conn_le_param_update failed: %d", err); return; } LOG_INF("bt_conn_le_param_update OK %d", err); LOG_INF("MTU = %d", bt_gatt_get_mtu(conn)); current_conn = bt_conn_ref(conn); }