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

Parents
  • example peripheral_uart in nrf connect SDK v1.5.0 , i use nrf5340_DK test this example with a bluetooth APP in a phone ,the largest bytes of nrf5340_dk kit can send to app is 20 a time, how can i increase data number ?

    in prj.conf, i  add below:

    CONFIG_BT_USER_DATA_LEN_UPDATE=y
    CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
    CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

    in att_internal.h , change # define  BT_ATT_DEFAULT_LE_MTU  23   into  # define  BT_ATT_DEFAULT_LE_MTU  43 

    in gap.h , change # define  BT_GAP_DATA_LEN_DEFAULT  0x1b   into # define  BT_GAP_DATA_LEN_DEFAULT  0x2e

    in main.c , chang function uart_cb( ) {.......

    case UART_RX_RDY:
    ......;
    if (buf->len == 30) {...... }

    }

    i only change above ,anther have the same as original example .

     build/debug go ,have no result ,the largest number of ble of nrf5340-dk can send to app of phone is still 20 bytes  ,not 30 bytes  。is there any other code  to be modified in this example? someone said that  nrf connect SDK v1.5.0 need to be updated  to ble5.0 version ,  ble4.0 version can not send more than 20 bytes through ble a time

Reply
  • example peripheral_uart in nrf connect SDK v1.5.0 , i use nrf5340_DK test this example with a bluetooth APP in a phone ,the largest bytes of nrf5340_dk kit can send to app is 20 a time, how can i increase data number ?

    in prj.conf, i  add below:

    CONFIG_BT_USER_DATA_LEN_UPDATE=y
    CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
    CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

    in att_internal.h , change # define  BT_ATT_DEFAULT_LE_MTU  23   into  # define  BT_ATT_DEFAULT_LE_MTU  43 

    in gap.h , change # define  BT_GAP_DATA_LEN_DEFAULT  0x1b   into # define  BT_GAP_DATA_LEN_DEFAULT  0x2e

    in main.c , chang function uart_cb( ) {.......

    case UART_RX_RDY:
    ......;
    if (buf->len == 30) {...... }

    }

    i only change above ,anther have the same as original example .

     build/debug go ,have no result ,the largest number of ble of nrf5340-dk can send to app of phone is still 20 bytes  ,not 30 bytes  。is there any other code  to be modified in this example? someone said that  nrf connect SDK v1.5.0 need to be updated  to ble5.0 version ,  ble4.0 version can not send more than 20 bytes through ble a time

Children
Related