Scanning for new vaccinated MAC addresses
The "Advertising" I am going to discuss is rather a state that Bluetooth LE devices operate in for the purpose of discovery.
Scanning for new vaccinated MAC addresses:
The "Advertising" I am going to discuss is rather a state that Bluetooth LE devices operate in for the purpose of discovery.
This concept did not exist in Bluetooth Classic (BR/EDR) in the same way. It's one of the most powerful features of Bluetooth LE, especially for use cases that benefit from the one-to-many topology. For example, it can be used in combination with RSSI (Received Signal Strength Indicator) for: indoor navigation, retail marketing, asset tracking, and many more.
So, how does it all work?
Advertising in Bluetooth LE
Communication between two Bluetooth LE devices always starts with one of two states: Advertising or Scanning. Now, if a device is advertising and another one is scanning, there's a possibility that the scanning device will discover the advertising device.
Let's revisit the RF spectrum diagram from email #2:
Notice how I said "possibility". The reason is that device will (typically) advertise on the three primary advertising channels (37, 38, and 39) in some arbitrary order and interval of choice. The device will transmit an advertising packet on each of the primary channels, all within a single "advertising interval".
For example, if a device defines its advertising interval to 100 ms, then it will wake up every 100 ms, send a packet on each of the primary advertising channels and then go to sleep until the next advertising event.
Legacy vs. Extended Advertising Types
The secondary advertising channels (highlighted in light blue in the first diagram) are used in what's referred to as Extended Advertising (which is a feature that was introduced in Bluetooth version 5.0). The original advertising types before 5.0 are now referred to as Legacy Advertising.
Even in the case of extended advertising, the device will still advertise on the primary advertising channels, but it will not include actual advertising data there. Rather, these small-sized packets will contain only the information needed for a scanner to locate the advertising packets sent on the secondary advertising channels.
There are a few differences between the two types:
Extended advertising allows sending of up to 254 bytes of data per packet on the secondary advertising channels whereas legacy advertising only allows packets to be sent on the primary channels which only accommodate up to 31 bytes of data.
Extended advertising allows the use of PHYs other than the standard 1M PHY. They allow the use of the 1M and Coded PHYs on the primary advertising channels and the 1M, 2M, and Coded PHYs on the secondary advertising channels, whereas the legacy advertising only supports 1M PHY (for backward compatibility purposes).
Extended advertising allows "chaining" of packets on the secondary advertising packets which can be used to send out even more data, up to 1,650 bytes total.
Keep in mind that devices are allowed to send out more than one advertising set which means that it can advertise both legacy and extended (or multiple extended ones) in order to accommodate for legacy scanning devices (ones that don't support the discovery of extended advertising).
Scanning in Bluetooth LE
So far, we've mostly focused on the devices transmitting advertising data, but we haven't talked much about the devices discovering these advertising devices.
The way scanner device operate is by tuning to each of the primary advertising channels, one at a time, listening for advertising packets, then switching to the next primary advertising channel in the list, until it finds a device it's interested in connecting to (or alternatively, it could just continue to scan and provide the user with the advertising data it discovers and parses).
Two parameters are defined for scanning: the scan window and the scan interval. The scan interval is how often the device will start the scanning process, and the scan window is how long within a scan interval it will actually be scanning.
Image
Scan Requests and Scan Responses
Another concept within scanning is what's called "Active" vs. "Passive" scanning. This is one way that legacy advertising devices are able to send out more than 31 bytes of data.
Basically, a scanner operating in the Active scanning state will send out a scan request packet that signals to the advertiser to send any additional data it wants to send. This prompts the advertiser to send what's called a scan response packet. This allows an advertiser to send up to 62 bytes instead of just 31 bytes, but it will depend on whether the advertiser is using an advertising mode that allows scan requests.
Mohammad Afaneh