3

To check the throughput i have modified the bluetooth chat example.

  1. I have provided a Send button in the UI which send some predefined no. of bytes to the server socket and waits for Acknowledgement

  2. The ServerSocket waits for some string and once it gets the data it replies by sending Acknowledgement.

Here Throughput for this connection I have calculated as follows.

  1. I record the start time when the data is sent.

  2. ON receiving of the Acknowledgement i record the end time.

  3. So throughput will be (data sent size + ack received size) / time taken.

The results are:

dataSent(KB)-------------------Throughput(Kilo bits per second)

1KB                         ~200Kbps

5KB                         ~560Kbps 

10KB                        ~688Kbps

50KB                        ~512Kbps

According some of the data got from the application The behavior is that for low data like 1 KB or 5 KB throughput is less. It increases till around 40KB or but again after 50 KB or so it starts decreasing. I can see some garbage collection happening in the receiving side, this adds to the delay.

I want to know if this is the right behavior. why for less data like 1KB or 5 KB throughput less and then it increases. What are the facts that i can consider which can add to the delay. Now the throughput is calculated when the sender receives the Acknowledgement from the receiver(Its full round trip calculation). Can I make it single trip like sending of data and after receiving everything I calculate throughput in the receiver. I tried this but there was milliseconds difference in the two phone which gave me wrong results some time negative value. Please help me in understanding the correct behavior.

Shrikanth Kalluraya
  • 1,099
  • 1
  • 16
  • 34

1 Answers1

0

One possible factor is that Bluetooth performs some dynamic adaptation that can allow the connection to improve over time and increase the effective throughput.

1) Adaptive frequency hopping (AFH): Since BT uses the same 2.4GHz spectrum as wifi, you can have wifi traffic that clobbers some BT channels and causes retransmissions. BT devices detect the interference over time and constantly re-negotiate the frequencies they use to avoid interference.

2) Channel quality driven dynamic data rate - BT devices dynamically change the physical data rate in order to find the best throughput by adjusting the use of high rate/low reliability vs lower rate/higher reliability packets.

These types of algorithms can cause the throughput to get better over time.

TJD
  • 11,800
  • 1
  • 26
  • 34
  • Thanks @TJD for the information. But according to AFH, if I send 1 KB data again and again the throughput should Increase right? or in case of Channel quality driven dynamic data rate.. But the throughput is almost consistent for 1 KB no matter how many times you send and receive. I think there are some other factors which add up to the delay... – Shrikanth Kalluraya Oct 18 '11 at 17:57
  • Can I make it like sending of data and after receiving everything I calculate throughput in the receiver. I tried this but there was milliseconds difference in the two phone which gave me wrong results some time negative value. Please help me in understanding the correct behavior. – Shrikanth Kalluraya Oct 20 '11 at 03:45