Physical channels are the standard of piconet differentiation. They are the lowest layer in the Bluetooth system structure layer.
Q1: what types of physical channels are available?
1. basicpiconet channel
2. adaptedpiconet channel
The channel is used for communication between two connected devices. That is to say, they are associated with a specific micronetwork.
3. inquiry scanchannel: used for discovering Bluetooth devices
4. page scanchannel: used to connect to a bluetooth device.
Basic Piconet Channel
Q2: How does the Basicpiconet channel work?
In Basic piconetchannel, it divides the channel into a length of time (slot) in units of 625 μs, and uses TDD policies for transmission, it can be understood that TX and RX are time-division duplex. Note that the start of packet must be aligned with the start of slot. From the current packet type, it can take up to five time slots. For details about the slot transmission of multiple packages, see section 4.
Q3: why are there odd slots? Are there even slots?
Only three types of slots are occupied by packet types, which occupy 1, 3, and 5 slots respectively. Currently, no even number of slots are available for packet. In addition, it should be noted that the tx of the master must start with an odd number of slots, and the rx must start with an even number of slots.
The average packet drift cannot exceed 625 compared with 20ppm μs. The instantaneous time and average time deviation cannot exceed 1 μs.
Q4: since there is a time deviation, is there a corresponding mechanism for rx?
In rx, we use a windows listener instead of listening at 625 μs. The size of the current listening window is 20 μs, that is, the allowable error is +-10 μs, which is highly tolerant. Figure 5 illustrates the TX/RX in normal cases with a single packet as an example.
Master TX/RX
Windows also occurs in the slave rx process, which is not described in detail.
The master instance uses its native clock, while the slave instance adds the corresponding offset to its native clock to get the clock synchronized with the master instance. This offset is obtained through interaction in the inquiry process. To prevent clock offset, slave needs to refresh the offset every time it receives the packet of the master. For details about how to obtain the clock, refer to section 6. Among them, the sixth-a is the generation of the clock in the master, and the sixth-B is the generation of the slave clock.
Master and slave Clock generation
Adapted piconet channel
Q6: What are the special features of adapted piconetchannel?
Adapted piconetchannel is used to connect devices that support AFH (Adapter Frequency Hopping. Compared with Basic, it may not use all 79 frequency points, but its minimum number of frequency points is 20. That is to say, if the environment is poor and less than 20 frequency points are clean and available for 79 frequency points, the AFH mechanism will not be able to run, so there will be no so-called adaptive frequency modulation, in terms of the final user experience, you can see choppy music or disconnected calls.
Page scan physical channel
Q7: the roles of the master and slave are determined during the connection process, and there are also master and slvae points in the page scan process.
Before the master and slave are confirmed, we call the device that executes the page as the master, and the device that runs the page scan (that is, waiting for the page) as the slave. Note that this master and slave do not correspond to the master and slave after the final connection is established. A series of operations such as role switch may occur between them. The inqiry scan is similar.
Q8: Is the clock used in page a native clk?
When the page is sent to the other party, the native clk is not used in the real page, but a predicted clk is used, hoping to be as close as possible to the slave clk. There is an offset between them. This offset generally uses the offset in the inquiry information. In Android, only the inquiry information within 10 minutes will be used, after all, this clk will also change. For a long time, the clk offset from inquiry has no practical significance. Figure 7 shows the clk used in the page process.
Clk at page
Q9: What is the difference between Page scan and basicpiconet channe?
The packet of page is very small (also fixed), so in order to make better use of the time, it is not sent once every 625 μs, but twice in 625 μs, that is, 312.5 μs is sent once, which is the minimum time interval of the Bluetooth clk. From the master's point of view, we can see the content as shown in figure 8.
Tx rx sequence diagram of the master node during page scan
Two packages are sent in the slot. At the same time, we listened before and after two time points during rx. In this way, you can respond to the response sent by slave at two time points.
There are two possibilities for slave. One is that slave receives the first packet sent by the master, which is the same as sending the packet once at 625 μs, I will not talk about it any more. In another case, slave receives the packet only when the master sends the second packet. Then, slave will respond 625 μs after receiving the packet, after receiving this response, the master no longer waits for 625 μs, but starts to respond to the next slot. See Figure 9.
The sequence diagram of the Server Load balancer received after the second sending by the master node
Packet is the packet actually received.
Inquiry scan physicalchannel
Q10: What is the difference between inquiry scan and basic?
Inquiryscan is similar to page scan. It is also sent once in 312.5 μs. The big difference is that his slave response is longer than 312.5 μs, in this case, if its response is the second time, slave will occupy the master to slave slot, as shown in red circles, this is allowed. See 10.
Inquiryscan sequence chart after the second inquiry packet