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

measuring throughput on S130 V2

Hello, I'm using the SDK 11.0.0 and S130 on both sides, and the projects ble_app_uart_c and ble_app_uart to connect a central and a peripheral through BLE. I was doing some measures to see how much data I could send defining different minimum and maximum intervals.

I got a throughput of 160kbps when using 7.5ms in the maximum and minimum connection intervals. But I don't think this number should be correct (not complaining because the more data I could send better). Just wanted to know if this is a normal number or maybe I'm measuring the throughput wrongly. I count the number of packets sent during one second and during 2 seconds and then calculated the throughput.

this is my code:

uint32_t timer2_number = 2000;		//timer in ms			
			while(timer2_number != 0)
{
			ble_nus_string_send(&m_nus, sender, 11); 		
            timer2_number--;
			counter_t++;
            nrf_delay_us(999);
}
			ble_nus_string_send(&m_nus, end_packet, 16); 		
			printf("%f\n",counter_t);
			nrf_delay_ms(10000);

the max should be 7packets20B8*(1/7.5ms)=149.33kbps. And I'm getting 160kbps. can I use delays to measure this, or should I use timers to be more precise?

Parents
  • You are calling ble_nus_string_send() 1000 times in a second. And you assume that you send 20 bytes each time. 20 * 8 *1000 = 160 kbps. Calling ble_nus_string_send() doesn't mean that the packet is actually sent. You need to check the returned error code. I believe most of your calls return NRF_SUCCESS (0x00000000), but some return BLE_ERROR_NO_TX_PACKETS (0x00003004). I would remove the delay and count the number of calls of ble_nus_string_send() that actually returns NRF_SUCCESS.

  • Hi Jorge,

    did u have a conclusion on the throughput thing, which I am very interested to know? recently I did some experiment, in which I could achieve 150kbps: 150 bytes of packets, sending rate is 1pkt/8ms. If I increase sending rate to 1pkt/4ms, I have a lot of lost packets, which I haven't really counted. 150kbps is quite similar to what you achieved. So I want to know you got any further work or results.

Reply
  • Hi Jorge,

    did u have a conclusion on the throughput thing, which I am very interested to know? recently I did some experiment, in which I could achieve 150kbps: 150 bytes of packets, sending rate is 1pkt/8ms. If I increase sending rate to 1pkt/4ms, I have a lot of lost packets, which I haven't really counted. 150kbps is quite similar to what you achieved. So I want to know you got any further work or results.

Children
No Data
Related