NUS example UART RX can't receive all data

NCS v2.7.0

peripheral_uart (nRF52832-DK)

central_uart (nRF52840-DK)

PC console -> JLink VCOM -> BLE peripheral(nRF52832-DK) -> BLE central (nRF52840-DK) -> JLink VCOM -> PC console 

1) send 240 bytes (repeat "0123456789" to form one 240 bytes packet) from PC UART in 100ms interval to peripheral_uart side, UART RX central_uart side sometimes can't receive all data in PC UART, like 

...01234567890127890123456789...

lost 4 bytes.

2) modify peripheral_uart and central_uart according to thread 

 nRF Connect SDK NUS throughput modifications and issues for peripheral_uart/central_uart example applications 

3) add 

CONFIG_UART_0_NRF_HW_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC_TIMER=1
according to thread
4) attached my projects for reference.

Parents
  • Tested peripheral on nrf52832 and central on nrf52840 dk. Not sure how you are sending the bytes from central to peripheral but I tried to do it manually from terminal and the reception looked ok

    Did not see any missing bytes

    I did not use adruino in the overlap file but instead had this in app.overlay

    &uart0 {
    	status = "okay";
    	current-speed = <1000000>;
    	hw-flow-control;
    };

  • Hi, thanks for your test.

    1) To send just once mostly ok, but I need to send the bitmap file from peripheral to central about 2MB, so the usage is like the stress test.
    To send the 2MB from BLE peripheral to central in the maximum throughput, I use 100ms interval for test, although it is still too slow to transfer the 2MB bitmap file. I also use wireshark to sniffer the BLE packets and they are send without loss, the loss is in UART RX.

    2) For example, I send 21600 bytes, but RX receive 21580 bytes only from UART terminal.

    3) I attached uart assist tool, if you want to use it for test.

    uartassist5.0.3.7z

Reply
  • Hi, thanks for your test.

    1) To send just once mostly ok, but I need to send the bitmap file from peripheral to central about 2MB, so the usage is like the stress test.
    To send the 2MB from BLE peripheral to central in the maximum throughput, I use 100ms interval for test, although it is still too slow to transfer the 2MB bitmap file. I also use wireshark to sniffer the BLE packets and they are send without loss, the loss is in UART RX.

    2) For example, I send 21600 bytes, but RX receive 21580 bytes only from UART terminal.

    3) I attached uart assist tool, if you want to use it for test.

    uartassist5.0.3.7z

Children
Related