Android Bluetooth Serial RFCOMM Slow / Slow Transfer

I am working on an Android Bluetooth project to send and receive data from user equipment. I used the bluetooth chat sample in the SDK as the basis.

I realized that there is no way to change the transfer rate on the client phone (Android phone), and the transfer rate will depend on the hardware. I tried to set different data rates for the hardware, and no one met our expectations;

The fastest I can get is 91 Kbps (at a baud rate of 2.7 Mbps ~ 910 Kbps). Using the minimum transfer rate (115 Kbps), I get 43 Kbps. I tried using different phones, and this is the same. I need to transfer data at 170 KB per second to the equipment.


Specifications
Protocol. Synchronized or generated data is sent to the hardware using packets of no more than 520 bytes in size. The hardware sends a verification command after receiving and approving each packet, then the phone sends the next data packet.
Client: Android 2.3.3, Samsung galaxy w i8150, Bluetooth v3.0, RFCOMM
Hardware: Custom, Bluetooth v2.1 BlueGiga WT11i


I am completely confused. Maybe this is a problem caused by the Android or Bluetooth device on the phone? I wonder what is the maximum baud rate? Is there a way to speed up the transfer (for example, increasing the maximum packet size or sending all packets without waiting for hardware verification commands).


Edit
After resizing the packet to 4160 bytes, the throughput is increased to 254 Kbps. I am trying to figure out the optimal packet to reach 1.5 Mbps. I appreciate any suggestions

+4
source share
1 answer

Firstly, changing the RFCOMM / Serial Port Bluetooth baud rate should not matter, because it is not a real serial port, but simply emulation. (Specific manufacturers may be something special, but Bluetooth generally or Android does not use this option to control the data transfer speed in the air)

Factors affecting the speed of data transmission via SPP will be the size of the packets, the practical maximum data transfer rate that you can receive via Bluetooth, and how quickly the receiver reads, and how often the sender is sent. For package size, you can look at internal documents or try different sizes to achieve the optimal number for your application. I would also suggest sending several packets (or all), until the stream can send data continuously, it is also read continuously.

The main problem here for you is the practical throuput that you can reach via Bluetooth. If you use non- EDR versions, as you mentioned in your question, the theoretical speed at a very low level is 720 Kbps, as well as adding a protocol and an application above your heads, as well as an RFCOMM protocol, you can get a maximum of about 450-500 Kbps / with.

If you have access to both devices that have + EDR , i.e. Bluetooth version 2.0 or more + EDR, then you can expect a throuput application in the amount of 1.2 to 1.5 Mbit / s (theoretical data transfer rate is 2.0 or 3.0 Mbit / s)

+5
source

All Articles