bluetoothWaveformConfig
Description
The bluetoothWaveformConfig
object parameterizes the bluetoothWaveformGenerator
function to generate a Bluetooth® basic rate/enhanced data rate (BR/EDR) waveform.
Creation
Description
creates a default Bluetooth BR/EDR waveform generator configuration object,
cfgWaveform
= bluetoothWaveformConfigcfgWaveform
.
sets properties by
using one or more name-value pairs. Enclose each property name in quotes. For example,
cfg
= bluetoothWaveformConfig(Name,Value
)('Mode','EDR3M')
sets the physical layer (PHY) transmission mode to 3
Mbps.
Properties
Note
For more information about Bluetooth BR/EDR waveform generator properties and their respective values, see Volume 2, Part B, Sections 6 and 7 of the Bluetooth Core Specification [2].
Mode
— PHY transmission mode
'BR'
(default) | 'EDR2M'
| 'EDR3M'
PHY transmission mode, specified as 'BR'
,
'EDR2M'
, or 'EDR3M'
.
Data Types: char
| string
PacketType
— Packet type
'FHS'
(default) | 'ID'
| 'NULL'
| 'POLL'
| ...
Packet type, specified as one of these values:
'ID'
'NULL'
'POLL'
'FHS'
'DM1'
'HV1'
'HV2'
'HV3'
'DV'
'EV3'
'EV4'
'EV5'
'DH1'
'AUX1'
'DM3'
'DH3'
'DM5'
'DH5'
'2-EV3'
'3-EV3'
'2-EV5'
'3-EV5'
'2-DH1'
'3-DH1'
'2-DH3'
'3-DH3'
'2-DH5'
'3-DH5'
Data Types: char
| string
PayloadLength
— Payload length of packet
18
(default) | integer in the range [0, X]
Payload length of packet, specified as an integer in the range [0, X], where X depends on the PacketType property. This value sets the number of bytes to be processed in a packet.
Dependencies
To enable this property, set the
value of PacketType property to 'DM1'
,
'DH1'
, 'DM3'
, 'DH3'
,
'DM5'
, 'DH5'
, 'AUX1'
, or
'DV'
.
Data Types: double
DeviceAddress
— Bluetooth device address
'0123456789AB'
(default) | 12-element character vector | string scalar denoting 6-octet hexadecimal value
Bluetooth device address, specified as a 12-element character vector or string scalar denoting a 6-octet hexadecimal value.
Data Types: char
| string
LogicalTransportAddress
— Logical transport address for packet
[0; 0; 1]
(default) | 3-bit binary column vector
Logical transport address for the packet, specified as a 3-bit binary column vector. This property indicates the active destination Peripheral for a packet in the Central-to-Peripheral transmission slot.
Data Types: double
HeaderControlBits
— Header control information
[1; 1; 1]
(default) | 3-bit binary column vector
Header control information, specified as a 3-bit binary column vector. This property indicates the header control information consisting of these three fields:
Field | Size of Field | Field Information Indicates |
---|---|---|
FLOW | 1 bit | Flow control information |
ARQN | 1 bit | Acknowledgment for successful reception of a cyclic redundancy check (CRC) packet |
SEQN | 1 bit | Sequencing scheme to order the packet stream |
Data Types: double
ModulationIndex
— Modulation Index
0.32
(default) | scalar in the range [0.28, 0.35]
Modulation index, specified as a scalar in the range [0.28, 0.35]. This property is the modulation index that the object uses when performing Gaussian frequency shift keying (GFSK) modulation or demodulation.
Data Types: double
SamplesPerSymbol
— Samples per symbol
8
(default) | positive integer
Samples per symbol, specified as a positive integer. This value is used for GFSK modulation and demodulation.
Data Types: double
WhitenStatus
— Data whiten status
'On'
(default) | 'Off'
Data whiten status, specified as 'On'
or
'Off'
. Set this value to 'On'
for the object to
perform whitening on the header and payload bits.
Data Types: char
| string
WhitenInitialization
— Whiten initialization
[1; 1; 1; 1; 1; 1; 1]
(default) | 7-bit binary column vector
Whiten initialization, specified as a 7-bit binary column vector.
Dependencies
To enable this property, set the
WhitenStatus property to
'On'
.
Data Types: double
LLID
— Logical link identifier
[1; 1]
(default) | 2-bit binary column vector
Logical link identifier, specified as a 2-bit binary column vector.
Dependencies
To enable this property, set the
PacketType property to
'DM1'
, 'DH1'
, 'DM3'
,
'DH3'
, 'DM5'
, 'DH5'
,
'AUX1'
, and 'DV'
.
Data Types: double
FlowIndicator
— Logical channel flow control indicator
true
(default) | false
Logical channel flow control indicator, specified as true
or
false
.
Dependencies
To enable this property, set the
value of PacketType property to 'DM1'
,
'DH1'
, 'DM3'
, 'DH3'
,
'DM5'
, 'DH5'
, 'AUX1'
, and
'DV'
.
Data Types: logical
Object Functions
Specific to This Object
getPayloadLength | Return payload length for Bluetooth BR/EDR format configuration |
getPhyConfigProperties | Return updated properties of Bluetooth BR/EDR PHY configuration object |
Examples
Create Bluetooth BR/EDR Waveform Configuration Objects
Create three unique Bluetooth BR/EDR waveform configuration objects for synchronous connection oriented (SCO), connectionless peripheral broadcast (CPB), and asynchronous connectionless (ACL) logical transports.
Create a default Bluetooth BR/EDR waveform configuration object for an SCO logical transport. Set the packet type as HV1.
cfgWaveform = bluetoothWaveformConfig;
cfgWaveform.PacketType = 'HV1'
cfgWaveform = bluetoothWaveformConfig with properties: Mode: 'BR' PacketType: 'HV1' DeviceAddress: '0123456789AB' LogicalTransportAddress: [3x1 double] HeaderControlBits: [3x1 double] ModulationIndex: 0.3200 SamplesPerSymbol: 8 WhitenStatus: 'On' WhitenInitialization: [7x1 double]
Create a second Bluetooth BR/EDR waveform configuration object for a CSB logical transport, specifying the packet type as DH1. Disable the whiten status.
cfgWaveform = bluetoothWaveformConfig('PacketType','DH1','WhitenStatus','Off')
cfgWaveform = bluetoothWaveformConfig with properties: Mode: 'BR' PacketType: 'DH1' PayloadLength: 18 DeviceAddress: '0123456789AB' LogicalTransportAddress: [3x1 double] HeaderControlBits: [3x1 double] ModulationIndex: 0.3200 SamplesPerSymbol: 8 WhitenStatus: 'Off' LLID: [2x1 double] FlowIndicator: 1
Create a third Bluetooth BR/EDR waveform configuration object for an ACL logical transport with enhanced data rate mode. Set the value of packet type to DH3, and payload length to 184 bytes.
cfgWaveform = bluetoothWaveformConfig; cfgWaveform.Mode = 'EDR2M'; cfgWaveform.PacketType = 'DH3'; cfgWaveform.PayloadLength = 184 % In bytes
cfgWaveform = bluetoothWaveformConfig with properties: Mode: 'EDR2M' PacketType: 'DH3' PayloadLength: 184 DeviceAddress: '0123456789AB' LogicalTransportAddress: [3x1 double] HeaderControlBits: [3x1 double] ModulationIndex: 0.3200 SamplesPerSymbol: 8 WhitenStatus: 'On' WhitenInitialization: [7x1 double] LLID: [2x1 double] FlowIndicator: 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™.
Usage notes and limitations:
Properties must be specified as coder.Constant().
Version History
Introduced in R2020a
Abrir ejemplo
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de 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)