- Home >> Technical Service >> Bluetooth
Bluetooth iBeacon and Mesh
Bluetooth iBeacon and Mesh networking technology
The main content of this article is to analyze the iBeacon broadcast technology of BLE from the principle and protocol, and introduce the Mesh ad hoc network technology of Bluetooth low energy, so as to break the bottleneck that traditional Bluetooth cannot ad hoc network or weak networking function.
1. Bluetooth iBeacon
There are two forms of signals sent by BLE, namely broadcast and connection. iBeacon technology is a BLE-based intermittent broadcast technology proposed by Apple, namely Internal beacon.
1.1 Analysis of iBeacon data structure
The data volume of a BLE broadcast frame can reach up to 47 bytes, which includes a 1-byte header, 4-byte address, 39-byte broadcast channel PDU data packet, and 3-byte CRC check code:
The iBeacon broadcast technology adopts the simplest broadcast data format, which deletes the data header and MAC address in the PDU data packet, and only sends 31 bytes of data; when this topic is studying iBeacon broadcast, set its data format to 6 bytes preset data, 1-byte manufacturer data, 2-byte company service code, 16-byte 128-bit UUID, 2-byte major device number, 2-byte minor device number, 1-byte signal emission strength, In addition to the preset position data, the data in other fields can be modified by yourself. The mobile terminal can receive the iBeacon broadcast signal sent by the BLE base station, and capture iBeacon data through software.
1.2 Analysis of RSSI characteristics of iBeacon
iBeacon technology uses intermittent radiation broadcast data into the space, so the spatial RSSI network distribution is changing according to certain rules. In this project, the broadcast interval is set to ±=1095 msmsT, that is, under the condition of constant environmental factors, the RSSI network Take T as the time interval to make periodic changes. There are two ways to measure signal strength in real-time communication: RX and RSSI, both of which are measures of the received power of the signal by the antenna, but the former measures the power of the signal in milliwatts; while RSSI indicates the received signal strength The percentage of is a relatively comparative measurement method, and the comparison standard is defined by the chip manufacturer.
2. Bluetooth Mesh Ad Hoc Network
Compared with ZigBee, traditional Bluetooth devices have poor ad hoc network capability, which is one of the reasons why it is difficult to implement large-scale Internet of Things; with the rapid development and popularization of BLE technology, this project proposes that the ad hoc network based on Bluetooth Mesh will Break through the defects of traditional Bluetooth and complete the cross-island connection of Bluetooth Mesh.
2.1 Traditional Bluetooth device network
A piconet is a traditional Bluetooth network topology. There can only be one master device in a piconet, and less than or equal to seven slave devices in wake state. The master-slave device communicates with the slave device according to polling rules, and the communication between the slave devices requires the master device to be bridged; a single piconet adopts a star topology, and multiple piconets are linked together to adopt a tree topology , its principle conforms to the allocation model of 1 master and 7 slaves, that is, the piconets are interconnected in the form of crossover; the slave node 4 of network A is the master node of network B, so many piconets constitute a scatternet (scatternet) as shown in Figure 5.5 shown. The disadvantage of the scatternet is that the structure is complex and redundant. Two adjacent slave nodes that are not in the same network need to exchange information in the form of multiple hops, and the transmission speed is slow, resulting in waste of resources.
2.2 Bluetooth Mesh Ad Hoc Network
Each node in the wireless Bluetooth Mesh network uses multi-hop technology to access the ad hoc network. There are one or more routes between two device nodes, and data communication is carried out in a cooperative manner. The Bluetooth iBeacon signal removes the size of the packet header, and the real information carried by each frame is 31 bytes. The wireless Mesh network itself is a high-capacity, high-speed network. Wireless communication is very efficient. In theory, a Bluetooth wireless Mesh network can connect 65,535 device nodes. In actual experiments, limited by factors such as the CPU and memory capacity of the device, the number is more than 200, and the transmission distance of each device node is greater than 50 meters. For large networks, it can Connect through multiple ad hoc networks.
In the application of BLE, the Mesh ad hoc network realizes the mutual communication between each device node, abandons the concept of one master device pairing seven slave devices in the piconet, and the cooperative communication broadens the channel of data interaction in the system.
The links between each device node are connected to each other to form a dense network. Among them, the dotted line indicates that two device nodes complete indirect data communication by bridging through intermediate nodes. The form of signal transmission is like the recursion of waves. . In a Mesh network, there are two reasons for indirect data communication: for example, the dotted line m is because the distance between device nodes is greater than the maximum distance of Bluetooth signal propagation; the dotted line n is non-line-of-sight communication, and there are Bluetooth signals between device nodes Obstacles that cannot be passed through.
2.3 Related Protocols of Bluetooth Mesh Ad Hoc Network
(1) Coordinated allocation of channels: When the Bluetooth multi-channel is connected to the Mesh ad hoc network, each iBeacon device node can only monitor one available channel at a time, and the device node can ensure the signal sent by each node through a specific negotiation mechanism. On the same channel, that is, device nodes can switch from different channels to available channels in real time; the research uses the ATIM window multi-channel synchronization mechanism, and its principle is: at the beginning of the window, all device node signals are forcibly switched to the same channel.
The channel division of the Mesh network is to allocate the network's use of channels from the division of frequencies to ensure the high efficiency of the Mesh network; among them, the mainstream channel allocation scheme is the division of groups, and the allocation rule is to select the one with the least conflict between adjacent nodes. channel.
(2) Network search and routing and forwarding: Network search technology is used to discover iBeacon nodes in the Mesh network and establish a node information database. The main methods used are: scanning of network information and maintenance of node information database; For new devices in the network, the node information of the device will be propagated in the Mesh network in the form of routing and forwarding. The routing and forwarding technology directly affects the utilization rate of the network. The Mesh network adopts a multi-hop technology, that is, the signal can be received by the target node through multiple node hops; there are three points to consider when selecting the route: 1. Comprehensive consideration of the routing Selection, the minimum number of hops is not the only criterion for judging the best route. 2. Improve the fault tolerance of Mesh network routing to avoid signal transmission failure caused by link interruption. 3. Improve resource utilization and choose multiple routes; the mainstream Mesh network The network routing protocol is a dynamic source routing protocol, which is a symmetric reactive ad hoc routing protocol.
(3) Network security: Mesh network's unique multi-hop technology and self-organizing network technology ensure the security of Mesh network; at the same time, in order to solve the confidentiality of node traffic in Mesh network, the control and supervision of iBeacon node network access, Mesh security Association proposes a security architecture with Mesh keys as the core; in which only authenticated keys can organize communication, the authentication process has 3 steps: 1. Link management protocol interaction phase, 2. EAP authentication, 3. Mesh 4-way handshake for security associations. Therefore, when establishing a Mesh network in this project, the network key is pre-set.
The way to realize the Mesh ad hoc network is: the application software of the mobile terminal searches and finds the iBeacon broadcasting device, and establishes a link, selects the security configuration menu, sets the security key of the Mesh network, switches to the device search menu, and selects the corresponding device in the information list Access to the network and establish a Mesh ad hoc network with mobile terminals as MP nodes. Here is a network security issue. A BLE device can be used as an intermediate bridge for information transmission in a Mesh network, but it can only have one network key at the same time, that is, it can only be controlled by one MP node.
Summarize
This paper mainly introduces the iBeacon technology of low-power Bluetooth, analyzes the iBeacon signal data structure, and supplements the RSSI characteristics of the signal, and uses the logarithmic path loss model to express the relationship between the signal strength value received by different chips and the signal propagation distance; then This paper compares and analyzes the traditional Bluetooth networking technology (piconet) and Bluetooth Mesh ad hoc networking technology, and describes the Bluetooth Mesh protocol and its implementation from three aspects: channel coordination and allocation, network search and routing forwarding, and network security.
The above are the details of the Bluetooth iBeacon and Mesh networking technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
- TOP