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

when transfer long string using UART service (string length is over 300bytes.), BLE connection was disconnected by some error.

hello all,

i am developing with BLE_NUS.

i want to sent the string data on BLE using UART example.

string data length is over 300 bytes like belows.

55AA FFFF 0526 0111 0001 2008 2208 2108 1D08 1B08 1D08 2208 2508 2308 1B08 1508 1708 2108 2908 1F08 FB07 CB07 B007 D407 4B08 0609 D209 6F0A AD0A 800A 050A 6E09 E608 8408 4508 1D08 FE07 E407 D107 C807 C707 C907 C907 C607 C207 C007 C007 C207 C407 C307 C207 C107 C107 C307 C507 C607 C607 C507 C507 C507 C607 C607 C507 C507 C407 C307 C307 C307 C207 C007 BE07 BD07 BC07 BC07 BC07 BD07 BE07 BD07 BD07 BC07 BC07 BE07 C007 C407 C907 CF07 D507 DC07 E407 EB07 F207 F807 FD07 0108 0608 0908 0D08 1008 1208 1308 1408 1308 1308 1208 1108 1208 1208 1308 1308 1308 1308 1308 1408 1508 1608 1608 1608 1508 1408 1508 1608 1708 1808 1708 1608 1508 1508 1508 1608 1608 1608 1608 1508 2201 0001 2304 000D 0000 0031 0200 DA6B 2410 00E1 0400 001F F432 4497 0500 0099 5B30 4444 99EE EE

i used Termite 3.4 for UART with nRF52DK.

but BLE connection was disconnected with some error on the nRF Tools for iPhone.

[Callback] Central Manager did disconnect Periphral

Error Code: The connection has timed out unexpectedly.

and then, "UART Start" message is displayed on terminal monitor.

i though that is strange, so i send the more shorter message again.

55AA FFFF 0526 0111 0001 2008 2208 2108 1D08 1B08 1D08 2208 2508 2308 1B08 1508 1708 2108 2908 1F08 FB07 CB07 B007 D407 4B08 0609 D209 6F0A AD0A 800A 050A 6E09 E608 8408 4508 1D08 FE07 E407 D107 C807 C707 C907 C907 C607 C207 C007 C007

that's no problem.

how to transfer long string message over 300bytes? 

Parents
  • Hi Kim,

      Check out the Throughput example and documentation of the different parameters you can change on how to increase the Throughput,.

    The ATT_MTU Throughput Example shows how different connection parameters influence the throughput performance of BLE connections. The following parameters can be tuned:

    • ATT_MTU size: The default Maximum Transmission Unit (MTU) is 23 bytes. When increasing this value, longer ATT payloads can be achieved, increasing ATT throughput.
    • Data length: The default data length for a radio packet is 27 bytes. Data length extension allows to use larger radio packets, so that more data can be sent in one packet, increasing throughput.
    • Connection interval: The connection interval defines how often the devices must listen on the radio. When increasing this value, more packets may be sent in one interval, but if a packet is lost, the wait until the retransmission is longer. Increasing this value can increase throughput, provided that the GAP event length increases by the same amount or connection event length extension is enabled.
    • Physical layer (PHY) data rate: The over-the-air data rate used to be limited to 1 Ms/s in Bluetooth low energy. Starting with Bluetooth 5, higher data data rates are permitted to achieve faster transmission, and it is possible to use coded PHY (available on the nRF52840 SoC only) for long-range transmission.
    • Connection event length extension: This option controls if the SoftDevice should attempt to extend the radio time for connections in a connection interval. This can positively affect throughput by making it possible to send more packets in a connection interval. This effect increases with the duration of the connection interval.
    • GAP event length: This setting determines the duration of a connection event within a connection interval. Increasing this value can greatly affect the throughput.
  • i did it with Throughput example as default config. that is OK. 

    but when i use ble_app_uart, i can't transmit long string data(300byte). 

    because there was occurred error and application is restarted again. 

  • - What error ?

    Please try to debug and provide any error codes/logs of what is happening.

Reply Children
No Data
Related