1. RFCOMM基于ETSI标准TS07.10在L2CAP上仿真9针RS232串口的功能.

2. 对比一下 Nokia提供的Bluetooth Code Samples. 可见.

“  RFCOMM is used for streaming data, L2CAP is for packet data ”

L2CAP 会有更快的响应时间.因为报文是4byte一个包 , 如果需要响应时间快而且数据比较小的情况下 推荐使用.
RFCOMM 是4-5byte一个包,每127byte的数据会增加包长1byte. 

"Logical Link Control and Adaptation Protocol (L2CAP) is the lowest-level Bluetooth protocol that can be   accessed by an application. The protocol overhead for L2CAP is 4 bytes. L2CAP is recommended if you have  a small amount of data and you need fast response times."
 RFCOMM is a Bluetooth protocol based on L2CAP. The protocol overhead for RFCOMM is between 4 and 5
bytes for small packets. For every 127 bytes of data, the header increases in size by 1 byte. So the overall
protocol overhead is about 8 to 9 bytes for data less than 127 bytes (4 bytes from L2CAP and 4 to 5 bytes
from RFCOMM).

号外: 如果Server端设备支持 “ if master device supports point-to-multipoint” 这是前提. 可以通过取得设备参数获知.

int n ;
String s;
s = LocalDevice.getLocalDevice().getProperty(
"bluetooth.connected.devices.max" );
n = Integer.parseInt( s ); 




 I recommend the PDF coming with the JSR-82 specification, this book and this Nokia tutorial.

Leave a comment


  1. good

  2. I like the snsoft menu………….

  3. cnsoft menu………….

Leave a Reply

[ Ctrl + Enter ]

click to change验证码