#冲刺创作新星# [十一] WiFi & 蓝牙子系统 原创 精华
作者:王石
概述
名词解释
WiFi:Wi-Fi or WiFi(/ˈwaɪfaɪ/)[1][a], is a family of wireless network protocols, based on the IEEE 802.11 family of standards, which are commonly used for local area networking of devices and Internet access, allowing nearby digital devices to exchange data by radio waves.
Wi‑Fi is a trademark of the non-profit Wi-Fi Alliance, which restricts the use of the term Wi-Fi Certified to products that successfully complete interoperability certification testing.
蓝牙:Bluetooth is a short-range wireless technology standard that is used for exchanging data between fixed and mobile devices over short distances using UHF radio waves in the ISM bands, from 2.402 GHz to 2.48 GHz, and building personal area networks (PANs).
Bluetooth is managed by the Bluetooth Special Interest Group (SIG), which has more than 35,000 member companies in the areas of telecommunication, computing, networking, and consumer electronics. The IEEE standardized Bluetooth as IEEE 802.15.1, but no longer maintains the standard. The Bluetooth SIG oversees development of the specification, manages the qualification program, and protects the trademarks.[4] A manufacturer must meet Bluetooth SIG standards to market it as a Bluetooth device.
问题:
- Wi-Fi是什么?
- 蓝牙是什么?
- Wi-Fi和蓝牙的最大区别是什么?
本章主要参考资料:
标准
Wi-Fi标准:IEEE 802.11(b/a/n/ac/ax/be,第一代至第七代)
Wi-Fi与IEEE 802.11常常被混淆,两者的区别可以概述为IEEE 802.11是一种无线局域网标准,而Wi-Fi是IEEE 802.11标准的一种实现。
蓝牙标准:IEEE 802.15.1
运行机制
OSI:
Wi-Fi:
- Infrastructure:所有数据通过一个base station。典型应用就是电脑,路由,外设(电脑,NAS,打印机等);
- Ad hoc and Wi-Fi direct:两个设备直连。Ad hoc存在不同网络类型,简单网络即两个设备直连,负载类型可转发数据包(带路由能力),典型应用就是手机热点;Wi-Fi direct则只应用在文件传输和多媒体文件分享;还有一种直连方式为TDLS(Tunneled Direct-Link Setup),指在相同Wi-Fi网络内互相通信(不通过AP);
- Multiple access points:通过配置SSID和安全设定使得其他设备可接入Wi-Fi网络;
参考文档:
https://wireless.wiki.kernel.org/en/users/documentation/modes
Bluetooth:
架构
OpenHarmony架构
Linux架构
Android架构
WIFI
结构
-
OpenHarmony
-
Linux
-
Android
-
目录架构
- 整体目录
- Wi-Fi目录
机制
注意:
- WiFi结构
- 服务、功能、状态
注意
- WifiConfigCenter里的状态:CLOSED/CLOSING/OPENING/RUNNING/UNKNOWN
- StaMachine里的状态:
实现
蓝牙
结构
OpenHarmony架构
Linux架构
Android架构
- 目录架构
- 整体目录
- Bluetooth目录
机制
- Observer
实现
- 协议栈
模块 | 全称 | 功能 | 对应模块 |
---|---|---|---|
HCI | Host Controller Interface | The HCI protocol provides a com- mand interface to the Bluetooth chipset。 | |
L2CAP | Logical Link Control and Adaptation Protocal | The L2CAP protocol supports higher level protocol multiplexing and packet frag- mentation. It provides the base for the RFCOMM and BNEP protocols. | |
L2CAP LE | LE Connection-Oriented Channels with LE Credit-Based Flow-Control Mode | LE Data Channels are similar to Classic L2CAP Channels but also provide a credit-based flow control similar to RFCOMM Channels. Unless the LE Data Packet Extension of Bluetooth Core 4.2 specification is used, the maximum packet size for LE ACL packets is 27 bytes. | |
RFCOMM | Radio Frequency Communication Protocol | RFCOMM provides emulation of serial ports over the L2CAP protocol and reassembly. It is the base for the Serial Port Profile and other profiles used for telecommunication like Head-Set Profile, Hands-Free Profile, Object Exchange (OBEX) etc. | |
SDP | Service Discovery Protocol | The SDP protocol allows to an- nounce services and discover services provided by a remote Bluetooth device. | |
BNEP | Bluetooth Network Encapsulation Protocol | The BNEP protocol is used to transport control and data packets over standard network protocols such as TCP, IPv4 or IPv6. It is built on top of L2CAP, and it specifies a minimum L2CAP MTU of 1691 bytes。 | |
ATT | Attribute Protocol | ||
SMP | Security Manager Protocol | ||
AVDTP | Audio/Video Distribution Transport Protocol | ||
AVCTP | Audio/Video Control Transport Protocol |
- Profile
模块 | 全称 | 功能 | 对应 |
---|---|---|---|
GATT | Generic Attribute Profile | For every LE device defines how one device can interact with GATT Services on a remote device. | |
GAP | Generic Access Profile | For every Bluetooth device defines how devices find each other and how they establish a connection. | |
SPP | Serial Port Profile | SPP basically specifies that a compatible device should provide a Service Discovery Protocol (SDP) record containing an RFCOMM channel number, which will be used for the actual communication. | |
HSP | Headset Profile | The HSP profile defines how a Bluetooth- enabled headset should communicate with another Bluetooth enabled device. | |
HFP | Hands-Free Profile | The HFP profile defines how a Bluetooth- enabled device, e.g. a car kit or a headset, can be used to place and receive calls via a audio gateway device, typically a mobile phone. | |
HID | Human-Interface Device | The HID profile allows an HID Host to connect to one or more HID Devices and communicate with them. | |
MFi/iAP2 | |||
PBAP | Phone Book Access Profile | PBAP defines the protocols and procedures that shall be used by devices for the retrieval of phone book objects. It is based on a Client-Server interaction model where the Client device pulls phone book objects from the Server device. | |
SDAP | Service Discovery Application Profile | SDAP describes how an application should use SDP to discover services on a remote device. SDAP requires that any application be able to find out what services are available on any Bluetooth enabled device it connects to. | |
PAN | Personal Area Networking Profile | The PAN profile uses BNEP to provide on-demand networking capabilities between Bluetooth devices. | |
A2DP | Advanced Audio Distribution | The A2DP profile defines how to stream audio over a Bluetooth connection from one device, such as a mobile phone, to another device such as a headset. | |
MESH | Mesh networking |
感谢整理对比
希望能讲解一下
整理的很齐全,方便对比
鸿蒙的参考地址能分享下吗
https://gitee.com/openharmony?_from=gitee_search