This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

in \connect SDK\v1.5.0\nrf\samples\bluetooth\peripheral_uart,data number is limited 20 bytes, more than 20bytes BLE will part data in two or more packs to send or receive

in \connect SDK\v1.5.0\nrf\samples\bluetooth\peripheral_uart,data number is limited 20 bytes, more than 20bytes BLE will part data in two or more packs to send or receive .how can i chang to data number to more bytes. for example , i want to send 200 bytes through COM  in one time and BLE receive 200bytes i one time , relatively HOW to send 200bytes data in one time  through BLE ,not separate 200bytes data in many pack to send

  • thank !

    I changed example as you had told to me . i build solution.use git_cmd,erase cpu net ,in main.c change #define UART_BUF_SIZE 20 into #define UART_BUF_SIZE 70 ,in uart_cb() 

    case UART_RX_RDY:

    ......
    if (buf->len == 40) {
    ......
    }

    build/debug ,go ,from ble of board ,the largest bytes is still 20  that can be send to APP. 

    do zephyr\samples\bluetooth\hci_rpmsg\prj.conf have no  effect to cpu_net core of example peripheral_uart ? 

    i program the cpu_net core of example peripheral_uart  with \nrf\samples\bluetooth\peripheral_uart\build_nrf5340dk_nrf5340_cpuappns\hci_rpmsg\zephyr\ merged_CPUNET.hex .

    program can run well  and connect with app and not reset.

  • when debug go there are informatipn below:

    [00:00:00.028,442]  bt_hci_core: ECC HCI commands not available

    [00:00:00.028,472]  bt_hci_core: No ID address. App must call settings_load()

    [00:00:00.028,472]  peripheral_uart: Bluetooth initialized

  •  when I send data from sscom's send editor  more than 20 bytes ,the debugging segger embedded studio pop information below:

    [00:01:23.371,826]  bt_att: No ATT channel for MTU 43
    [00:01:23.371,856] bt_gatt: No buffer available to send notification
    [00:01:23.371,856] peripheral_uart: Failed to send data over BLE connection
    [00:01:37.619,506]  bt_att: No ATT channel for MTU 48
    [00:01:37.619,537] bt_gatt: No buffer available to send notification
    [00:01:37.619,537]  peripheral_uart: Failed to send data over BLE connection
    [00:01:37.910,400] bt_att: No ATT channel for MTU 48
    [00:01:37.910,400]  bt_gatt: No buffer available to send notification
    [00:01:37.910,430]  peripheral_uart: Failed to send data over BLE connection
    [00:01:38.141,235]  bt_att: No ATT channel for MTU 48
    [00:01:38.141,235]  bt_gatt: No buffer available to send notification
    [00:01:38.141,265]  peripheral_uart: Failed to send data over BLE connection
    [00:01:38.332,031]  bt_att: No ATT channel for MTU 48
    [00:01:38.332,061] bt_gatt: No buffer available to send notification
    [00:01:38.332,061] peripheral_uart: Failed to send data over BLE connection
    [00:01:38.532,836]  bt_att: No ATT channel for MTU 48
    [00:01:38.532,867]  bt_gatt: No buffer available to send notification
    [00:01:38.532,867] peripheral_uart: Failed to send data over BLE connection
    [00:01:38.723,632] bt_att: No ATT channel for MTU 48
    [00:01:38.723,632]  bt_gatt: No buffer available to send notification
    [00:01:38.723,663] peripheral_uart: Failed to send data over BLE connection
    [00:01:38.994,506]  bt_att: No ATT channel for MTU 48
    [00:01:38.994,506]  bt_gatt: No buffer available to send notification
    [00:01:38.994,537]  peripheral_uart: Failed to send data over BLE connection
    [00:01:39.195,312]  bt_att: No ATT channel for MTU 48
    [00:01:39.195,343] bt_gatt: No buffer available to send notification
    [00:01:39.195,343]  peripheral_uart: Failed to send data over BLE connection
    [00:01:39.376,098]  bt_att: No ATT channel for MTU 48
    [00:01:39.376,129] bperipheral_uart: Failed to send data over BLE connection

  •    I can know some skill ,the app connected with nrf5340dk through BLE  must cooperate . ,in the imagine top -right ,there are 3 dots ranged in vertical ,touch  these 3 dots can pop an input editor dialoge , you can change MTU from 23 to 517 , input 251 (the largest size of ble can send a pack) can change MTU to maxium value,touch OK button ,then ble MTU of the connected nrf5340dk also update with this value(this situation will come into truth with the correct code in nrf5340dk)

1 2 3 4 5