MeshWhat is the TCP/IP protocol corresponding to the mesh network model, and what is the general function of each layer?

0Layer 1: Physical Layer, can be considered as the antenna.
2Layer 2: Network Layer, here it determines whether the data is Bluetooth data, encryption, and decryption.
3Layer 3: Transport Layer, it handles Bluetooth data, packaging, unpackaging, and reassembly.
5Layer 4: Application Layer, for specific applications.
What is the range of Bluetooth channels? Why are there three channels responsible for broadcasting? How does frequency hopping work?

2402-2480 MHz
Channels 37, 38, and 39 are responsible for broadcasting, spaced apart. When there is interference in each frequency band, there are still several frequency signals that can be sent out, providing strong anti-interference capability. In addition to the broadcast channels, there is also a data channel.
Frequency Hopping: Frequency hopping is an anti-interference technology that disperses interference effects by rapidly switching channel frequencies:
Principle: The sender and receiver synchronize frequency hopping according to a pseudo-random sequence, so interference only affects part of the frequency points. In the 2.4 GHz band, frequency hopping can combine n channels and dynamically switch to other data channels for transmission.
2.4 GHz not only has Bluetooth devices but also Wi-Fi, how do we distinguish between them?
The preamble is responsible for distinguishing whether it is Bluetooth, and the access address is a fixed broadcast address.
What is the data format of Bluetooth?

The role of the preamble is as mentioned in the previous question; if the access address is a broadcast, it is a fixed address.
The header is divided into broadcast header and data header
1. Broadcast Header

The header contains the broadcast message type, and the sending and receiving address types are divided into two types: one is a fixed value, and the other is a random value (to protect privacy).
Address Acquisition
In the network layer, it is necessary to obtain address information. One of the main functions of the network layer is to select the transmission path for data packets, and the address (such as IP address) is the key information to determine the destination and source of the data packet. When processing data packets in the network layer, it will extract or assign the corresponding address from the data packet according to specific rules and protocols to ensure that the data packet can be accurately transmitted from the source node to the target node.
2. Data Header

Data Fragmentation
There is a concept of fragmentation in data. During data transmission, in order to facilitate processing and transmission, larger data is split into multiple smaller data packets, i.e., fragmentation. Each fragment’s header will contain a sequence number (Sequence Number) and the next message sequence number (Next Sequence Number). The sequence number is used to identify the position of the current data packet in the entire data sequence, making it easier for the receiver to reassemble the data in the correct order; the next message sequence number allows the receiver to know the expected sequence number of the subsequent data packets in advance, which helps to detect data packet loss or disorder.
The length indicates the total length of the data.
The data includes PDU and transmission data
PDU type (PDU TYPE) is used to identify the type of data packet, for example, it can identify whether the data packet is a network entry packet, data transmission packet, control packet, etc. In network communication, different PDU types have different functions and processing methods. The receiver can accurately determine the purpose of the data packet by looking at the PDU TYPE field and take appropriate processing measures.
Data verification is used to check whether this data segment is complete. During data transmission, for various reasons (such as signal interference, network congestion, etc.), data may be erroneous or lost. By adding verification information (such as checksums, cyclic redundancy check codes CRC etc.) to the data packet, the receiver can perform verification calculations on the received data and compare the results with the verification information carried in the data packet. If the two do not match, it indicates that an error occurred during data transmission, and the receiver can take appropriate measures, such as requesting retransmission of the data packet, to ensure the integrity and accuracy of the data..