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

Too high throughput?!

Hi,

I'm using an nRF52832 with the S132v2 and SDK 11 and wanted to test the ble throughput. The nRF52832 should send as many as it can to an "normal" BLE-USB-Stick.

The strange thing is, that my windows application is receiving about 1000-1050 packets/s. 1000packets/s * 20Byte Data = 20kB/s

But in the datashet is the maximum 149,3kb/s -> 18,66kB/s and i think this value means 23 or 27 bytes per packet. (Who not all can be used)

Is 20kB/s possible or am i doing something wrong? Thank you.

Additional Info: The Connection Inteval is 7,5ms. On the nordic-site i'm using the NUS-Example and have modified the main like this:

if(m_conn_handle != BLE_CONN_HANDLE_INVALID)		//Connection check
	{
			static uint8_t count = 0;
			uint8_t p_string[20] = { count, 0xAA, 0x12, 0xAA, 0x32, 0xAA, 0x45, 0x34, 0xAA, 0x43, 0x22, 0x11, 0xff, 0xfb, 0xdA, 0xdb, 0x44, 0x22, 0x88, 0x87};
			printf("\r\nble!\r\n");

			if(ble_nus_string_send(&m_nus, p_string, 20) == NRF_SUCCESS)
				count++;
			 printf("\r\nble\r\n");
	}

On the Windows-Site i increment an int every time i get a package and every second i display this int * 20.

//Every received Packet
 SpeedTest++;

//Every second
    Label4->Caption = (float)SpeedTest*20;
	SpeedTest = 0;

I don't see a mistake here.

Parents
  • The throughput depends on your connection interval, the packet length, and the number of packets you can send in one connection event.So lets say you send:

    • 20 bytes of actuall data (default MTU size of 23 bytes).
    • 6 packets per connection event. = 120bytes /event
    • 7.5 ms connection interval.
      = 120*1000ms/7.5ms = 16 000 Bytes/s of actuall data excluding headers.

    Then if you use longer MTU's without DLE, e.g. 158 bytes, you will be able to send 20bytes + 5*27 bytes of actuall data in one connection event:

    • 20 + 5*27 bytes of data. (only the first packet has 7 (4+3 bytes)bytes of header)
    • 6 packets per connection event. = 155bytes /event
    • 7.5 ms connection interval
      =155*1000/7.5 = 20 666.6 Bytes/s of actuall data.

    It is also possible to enable data length extension for even higher throughput. But this is not supported in S132 v2. But you can see data throughput examples in the softdevice specification.

Reply
  • The throughput depends on your connection interval, the packet length, and the number of packets you can send in one connection event.So lets say you send:

    • 20 bytes of actuall data (default MTU size of 23 bytes).
    • 6 packets per connection event. = 120bytes /event
    • 7.5 ms connection interval.
      = 120*1000ms/7.5ms = 16 000 Bytes/s of actuall data excluding headers.

    Then if you use longer MTU's without DLE, e.g. 158 bytes, you will be able to send 20bytes + 5*27 bytes of actuall data in one connection event:

    • 20 + 5*27 bytes of data. (only the first packet has 7 (4+3 bytes)bytes of header)
    • 6 packets per connection event. = 155bytes /event
    • 7.5 ms connection interval
      =155*1000/7.5 = 20 666.6 Bytes/s of actuall data.

    It is also possible to enable data length extension for even higher throughput. But this is not supported in S132 v2. But you can see data throughput examples in the softdevice specification.

Children
Related