BLE UART (NUS), altering MTU and faster interval

Hi,

On the nRF5340-DK, i'm succesfuly using the example code:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_uart/README.html

I would like to speed up the transfer rate of the TX-characteristic.  (im at the moment not using the uart, im just sending with  bt_nus_send() )

I would like to alter the MTU-size (seems to be set to 65 now), i would like to have this set to maximal  247 (i believe.)

And via nRFconnect-app i see:  the Peripheral Prefered Connection Parameter: connection interval 30 .. 50msec,  this i would like to set faster  e.g. 5 or 10msec

Do i need to put some-things in Kconfig ? or in prj.conf  (i tried  CONFIG_BT_L2CAP_TX_MTU=247    in prj,conf).

But my central on PC-Windows (im using bleak for now)  reveals a MTU = 65.

And in the peripheral  main.c i did  set inside      static void connected(struct bt_conn *conn, uint8_t err)    the code    

LOG_INF("MTU= %d", bt_nus_get_mtu( conn ) )    ;      This prints a MTU = 20.
1) What should i do to set MTU = 247 ?
2) What should i do to get a  faster Interval time ?
Kind Regards,
Theo     
Parents Reply
  • Ok Simon, thanks, that worked i have an MTU=247 now.

    Now the  second question of my post :

    2) What should i do to get a  faster Interval time ?

    ==> so how can i  (request)/change the interval time ??

    --------

    by the way.., im using an nRF5340 on the peripheral.  Now i would like to use a Dongle on the PC-side, what device can you recommend?    

    nRF52840 Dongle ?   Or is there an other dongle that matches with the nRF5340-peripheral ?

    And is there a dongle with a housing?

    Thanks, 

    Best Regards,

    Theo

Children
Related