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
  • 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
    CONFIG_BT_L2CAP_TX_MTU=247
    CONFIG_BT_L2CAP_RX_MTU=247
    CONFIG_BT_MAX_CONN=2

    in main.c , bt_callback function  connect ,I add below:

    static void connected(struct bt_conn *conn, uint8_t err)
    {
    ......

    current_conn = bt_conn_ref(conn);
    err2 = bt_conn_le_data_len_update(current_conn, 80);
    if (err2)
    printk( "LE data length update failed: %d", err2);

    ......
    }

    all other not changed,but build\debug\go ,the board always reset,can not run, ,ble app cannot connect board ,is there other place need to be modified in program,

Reply
  • 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
    CONFIG_BT_L2CAP_TX_MTU=247
    CONFIG_BT_L2CAP_RX_MTU=247
    CONFIG_BT_MAX_CONN=2

    in main.c , bt_callback function  connect ,I add below:

    static void connected(struct bt_conn *conn, uint8_t err)
    {
    ......

    current_conn = bt_conn_ref(conn);
    err2 = bt_conn_le_data_len_update(current_conn, 80);
    if (err2)
    printk( "LE data length update failed: %d", err2);

    ......
    }

    all other not changed,but build\debug\go ,the board always reset,can not run, ,ble app cannot connect board ,is there other place need to be modified in program,

Children
No Data
Related