蓝牙学习

ACL(Asynchronous Connectionless)异步无连接链路;对时间要求不敏感的数据通信,如文件数据、控制信令等。

SCO(Synochronous Connection Oriented)同步面向连接链路;对时间比较敏感的通信,如:语音;最多只支持3条SCO链路,不支持重传。

在功耗上,传统蓝牙有3个级别的功耗,class1、class2、class3分别支持100m、10m、1m的传输距离;低
功耗蓝牙没有功耗级别,一般发送功率在7dbm。

蓝牙中的几个概念

Inquiry、inquiry scan、page、page scan

1、inquiry

作用:开始发起搜索周围的蓝牙设备

对应的HCI命令:HCI_inquiry

HCI_inquiry命令内容如下:属于连接控制命令,搜索一次时长为12.8S。

2、inquiry scan

作用:蓝牙设备开启inquiry scan模式,才能够被别的蓝牙设备搜索到。

安卓设备(以华为手机荣耀6+为例),打开了“开放检测”按键后,才会进入inquiry scan模式,其他的设备才能够搜到这个荣耀手机的蓝牙信号。

苹果手机中没有对应的按键,设计为进入蓝牙设置界面后,自动进入inquiry scan模式;用户推出蓝牙界面后,自动关闭inquiry scan模式,此时其他手机就搜不到它了。

3、Page

作用:发起连接的蓝牙设备向被连接的蓝牙设备发起连接请求或者认证请求即是一次page动作。即,手机点击请求连接目标蓝牙耳机的过程中发送的很多命令都会进行page的动作。

Page不像inquiry那样有一条对应的HCI命令(hci_inquiry),page没有直接对应的HCI命令。但是许多条HCI命令都是要进行page这个动作的。

例如发起连接的HCI命令Create_Connection.。如果对方没有而执行失败,就会出现一条HCI命令回复–page timeout。

4、page scan

作用:蓝牙设备开启page scan模式,才能够相应其他蓝牙设备的连接请求。例如蓝牙耳机只有处于page scan才允许其他设备来连接。

Page scan是一个状态,只有蓝牙耳机处于page scan状态,手机才有可能连接成功(还需要进入inquiry scan后续章节解释不在此展开),否则不能够连接的。

小结:

Inquiry scan和page scan可以暂且理解为一个状态,而inquiry 和page是一个动作,分别会向对方蓝牙设备发起搜索和连接请求的。

  1. 跳频定义
    The maximum hop rate is 1600
    hops per second in the CONNECTION state, the synchronization train
    substate, and the synchronization scan substate and the maximum is 3200
    hops per second in the inquiry and page substates.

  2. 时隙
    A TDD scheme is used where master and slave alternately transmit, see
    Figure 2.1. The packet start shall be aligned with the slot start. Packets may
    extend over up to five time slots.
    Figure 2.1: Multi-slot packets

发送时隙
3、Length ACCESS CODE
Every packet starts with an access code. If a packet header follows, the access
code is 72 bits long, otherwise the access code is 68 bits long and is known as
a shortened access code. The shortened access code does not contain a
trailer. This access code is used for synchronization, DC offset compensation
and identification. The access code identifies all packets exchanged on a
physical channel: all packets sent in the same physical channel are preceded
by the same access code. In the receiver of the device, a sliding correlator
correlates against the access code and triggers when a threshold is exceeded.
This trigger signal is used to determine the receive timing.

4、ACCESS CODES
In the Bluetooth system all transmissions over the physical channel begin with
an access code. Three different access codes are defined, see also Section
6.3.1:
• device access code (DAC)
• channel access code (CAC)
• inquiry access code (IAC)

5、蓝牙网络里面为什么最多连接7个设备
Each slave active in a piconet is assigned a primary 3-bit logical transport
address (LT_ADDR). The all-zero LT_ADDR is reserved for ASB broadcast
messages.

6、PAGE SCAN MODE
在这里插入图片描述

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值