bluetoothFrequencyHop
Description
The bluetoothFrequencyHop
object generates a Bluetooth® basic rate/enhanced data rate (BR/EDR) channel index for frequency hopping. Use
this object to generate the hopping sequence for inquiry, paging, and connection
procedures.
Creation
Description
creates a
default Bluetooth BR/EDR channel index object for frequency hopping.freqHop
= bluetoothFrequencyHop
sets Properties by using one or
more name-value pairs. Enclose each property name in quotes. For example,
freqHop
= bluetoothFrequencyHop(Name,Value
)('SequenceType','Page')
sets the frequency hopping sequence type to
Page
.
Properties
DeviceAddress
— Bluetooth BR/EDR device address
'9E8B33'
(default) | 12-element character vector or string scalar denoting a 6-octet hexadecimal
value
Bluetooth BR/EDR device address, specified as a 12-element character vector or a string scalar denoting a 6-octet hexadecimal value. This value specifies the Bluetooth BR/EDR device address given as an input to the hop selection kernel. This property ignores all the consecutive 0s starting from the most significant bit (MSB). This table maps the value of this property to different physical channels.
Type of Physical Channel | Value of DeviceAddress Property |
---|---|
Basic | Address of Central |
Page scan | Address of the scanning device |
Inquiry | General inquiry access code (GIAC) |
The default value of this property denotes the lower address part (LAP) of GIAC.
Data Types: char
| string
SequenceType
— Frequency hopping sequence type
'Inquiry'
(default) | 'Page scan'
| 'Inquiry scan'
| 'Page'
| ...
Frequency hopping sequence type, specified as one of these values:
'Page scan'
'Inquiry scan'
'Page'
'Inquiry'
'Central page response'
'Peripheral page response'
'Inquiry response'
'Connection basic'
'Connection adaptive'
'Interlaced page scan'
'Interlaced inquiry scan'
Data Types: char
| string
InterlaceOffset
— Offset for available frequencies in inquiry and paging procedures
16
(default) | integer in range [0, 31]
Offset for available frequencies in inquiry and paging procedures, specified as an integer in the range [0, 31].
Dependencies
To enable this property, set the
SequenceType property to
'Interlaced page scan'
or 'Interlaced inquiry
scan'
.
Data Types: double
KNudge
— Offset to compute control signal (X)
0
(default) | even integer
Offset to compute control signal (X), specified as an even integer. This property specifies the additional offset that the object adds to the clock bits.
Dependencies
To enable this property, set the
SequenceType property to
'Page'
or 'Inquiry'
.
Data Types: double
KOffset
— Offset to switch between A-train and B-train
24
(default) | 8
Offset to switch between A-train and B-train, specified as 24
(for A-train) or 8
(for B-train). To switch between the trains, this
property specifies the offset added to the clock bits.
Dependencies
To enable this property, set the
SequenceType property to
'Page'
or 'Inquiry'
.
Data Types: double
Counter
— Counter for Central or Peripheral page response sequence
0
(default) | nonnegative integer
Counter for Central or Peripheral page response sequence, specified as a nonnegative integer. This property is incremented at every Central transmission slot.
Dependencies
To enable this property, set the
SequenceType property to
'Peripheral page response'
, 'Central page
response'
, or 'Inquiry response'
.
Data Types: double
UsedChannels
— List of used channels
row vector containing all 79 channel indices (default) | vector of integers in the range [0, 78]
List of used channels, specified as a vector of integers in the range [0, 78]. The vector must contain at least 20 elements.
Dependencies
To enable this property, set the
SequenceType property to
'Connection adaptive'
.
Data Types: double
Object Functions
Specific to This Object
nextHop | Select Bluetooth BR/EDR channel index to hop for next frequency |
Examples
Select Bluetooth BR/EDR Channel Index for Connection Basic Frequency Hopping Sequence
Create a Bluetooth BR/EDR channel index object for frequency hopping.
freqHop = bluetoothFrequencyHop;
Specify the frequency hopping sequence type as connection basic.
freqHop.SequenceType = 'Connection basic';
Specify a clock value and Bluetooth BR/EDR device address.
inputClock = '2C'; % 28-bit freqHop.DeviceAddress = '2A96EF25'
freqHop = bluetoothFrequencyHop with properties: DeviceAddress: '2A96EF25' SequenceType: 'Connection basic'
Select a Bluetooth BR/EDR channel index to hop for next frequency.
[channelIndex, X] = nextHop(freqHop,inputClock)
channelIndex = 27
X = 11
Select Bluetooth BR/EDR Channel Index for Connection Adaptive Frequency Hopping Sequence
Create a Bluetooth BR/EDR channel index object for frequency hopping, specifying frequency hopping sequence type, Bluetooth BR/EDR device address, and used channels.
freqHop = bluetoothFrequencyHop('SequenceType','Connection adaptive', ... 'DeviceAddress','2A96EF25','UsedChannels',22:78)
freqHop = bluetoothFrequencyHop with properties: DeviceAddress: '2A96EF25' SequenceType: 'Connection adaptive' UsedChannels: [22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78]
Specify a clock value.
inputClock = '12C'; % 28-bit
Select a Bluetooth BR/EDR channel index to hop for next frequency.
[channelIndex,X] = nextHop(freqHop,inputClock)
channelIndex = 65
X = 11
Select Bluetooth BR/EDR Channel Index for Page Frequency Hopping Sequence
Create a Bluetooth BR/EDR channel index object for frequency hopping.
freqHop = bluetoothFrequencyHop;
Specify the frequency hopping sequence type as page.
freqHop.SequenceType = 'Page';
Specify a clock value, offset to select frequencies in A-train, and Bluetooth BR/EDR device address.
inputClock = 44; % 28-bit freqHop.KOffset = 24; freqHop.DeviceAddress = '2A96EF25'
freqHop = bluetoothFrequencyHop with properties: DeviceAddress: '2A96EF25' SequenceType: 'Page' KNudge: 0 KOffset: 24
Select a Bluetooth BR/EDR channel index to hop for next frequency.
[channelIndex,X] = nextHop(freqHop,inputClock)
channelIndex = 15
X = 30
Select Bluetooth BR/EDR Channel Index for Peripheral Page Response Frequency Hopping Sequence
Create a default Bluetooth BR/EDR channel index object for frequency hopping.
freqHop = bluetoothFrequencyHop;
Specify the frequency hopping sequence type as 'Peripheral page response'
.
freqHop.SequenceType = 'Peripheral page response';
Specify a clock value, counter for Peripheral page response, and Bluetooth BR/EDR device address.
frozenClock = '2A'; % 28-bit freqHop.Counter = 1; freqHop.DeviceAddress = '2A96EF25'
freqHop = bluetoothFrequencyHop with properties: DeviceAddress: '2A96EF25' SequenceType: 'Peripheral page response' Counter: 1
Select a Bluetooth BR/EDR channel index to hop for the next frequency.
[channelIndex,X] = nextHop(freqHop,frozenClock)
channelIndex = 28
X = 1
References
[1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 22, 2021. https://www.bluetooth.com/.
[2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.3. https://www.bluetooth.com/.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2020b
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)