蓝牙SPP协议学习记录

SPP的链路依赖关系

从RF到用户层

基带 -> HCI -> L2CAP -> SDP -> RFCOMM -> SPP

SPP链路建立

 

14.5.1 Establish link and set up virtual serial connection. This procedure refers to performing the steps necessary to establish a connection to an emulated serial port (or equivalent) in a remote device. The steps in this procedure are:
1) Submit a query using SDP to find out the RFCOMM Server channel number of the desired application in the remote device. This might include a browsing capability to let the user select among available ports (or services) in the peer device.【选择SPP对应的通道以及SPP的UUID】Alternatively, if it is known exactly which service to contact, it is sufficient look up the necessary parameters using the Service Class ID associated with the desired service.
2) Optionally, require authentication of the remote device to be performed. Also optionally, require encryption to be turned on.
3) Request a new L2CAP channel to the remote RFCOMM entity.【SPP的链路依赖于L2CAP链路】
4) Initiate an RFCOMM session on the L2CAP channel.
5) Start a new data link connection on the RFCOMM session, using the aforementioned server channel number.
After step 5, the virtual serial cable connection is ready to be used for communication between applications on both sides.

SPP链路鉴权

14.5.2 Accept link and establish virtual serial connection.
This procedure refers to taking part in the following steps:
1) If requested by the remote device, take part in authentication procedure and, upon further request, turn on encryption.【当远端设备发起连接请求,将执行鉴权动作】
2) Accept a new channel establishment indication from L2CAP.
3) Accept an RFCOMM session establishment on that channel.
4) Accept a new data link connection on the RFCOMM session. This may trigger a local request to authenticate the remote device and turn on encryption, if the user has required that for the emulated serial port being connected to (and authentication/encryption procedures have not already been carried out).
14.5.3 Register Service record for application in local SDP database.
This procedure refers to registration of a service record for an emulated serial port (or equivalent) in the SDP database. This implies the existence of a Service Database, and the ability to respond to SDP queries.
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值