0

I have a task right now to evaluate the RTT of a bluetooth communication on android, however since L2CAP is no longer supported on android I have to calculate the RTT using RFCOMM, which to my understanding is basically a reliable implementation much like TCP for bluetooth.

My question is does RFCOMM use the same threeway handshake as TCP (SYN/SYN-ACK/ACK)?

If it does, would the RTT from a bluetooth client to a bluetooth server be roughly the time it took for a connection to be established multiplied by 2/3 ( because RTT is just time taken for SYN/SYN-ACK and the time taken for a connection is SYN/SYN-ACK/ACK )?

Ali Elgazar
  • 777
  • 2
  • 12
  • 26

2 Answers2

4

RFCOMM connection establishment doesn't have a three way handshake. RFCOMM is based on the ETSI standard GSM 07.10 and works in HDLC Asynchronous Balanced Mode. RFCOMM specification can be found here

The communication is roughly can be categorized in to control channel connection ( which is channel 0) , port configuration and the data channel connection ( optionally including Authentication), followed by data exchange.

rfcomm_connection_establishment

The connection refusal scheme shows use of SABM frame more clearly. Note the SABM-UA in connection establishment and SABM-DM in connection refusal. rfcomm_connection_rejection

The connection itself is established by SABM(set Asynchronous Balanced Mode) frame and UA (user acknowledgement). port negotiation is done with PN frame.UIH frames are used for exchanging data on the established channels.

bare_metal
  • 1,134
  • 9
  • 20
1

My question is does RFCOMM use the same threeway handshake as TCP (SYN/SYN-ACK/ACK)?

No.

The RFCOMM on Bluetooth is over L2CAP, i.e. we can see L2CAP channel is a reliable channel(if no flush configuration) and RFCOMM just take one L2CAP channel, based on this channel, we divided one signal channel and some data channel(may be 30 more? I don't remembered clearly). To open one RFCOMM data channel, just process some request on signal channel, then the upper layer(e.g. SPP,HFP) can talk via allocated data channel. There are no ACK/SYN-ACK/ACK then establish a RFCOMM, but they have credits to used for flow control after channel established.

Guo Xingmin
  • 1,013
  • 1
  • 7
  • 7