bluetoothWaveformConfig

Configuration object for Bluetooth BR/EDR waveform generator

Download Required: To use bluetoothWaveformConfig, first download Communications Toolbox™ Library for the Bluetooth® Protocol. For more information, see Get and Manage Add-Ons. Alternatively, see Communications Toolbox Library for the Bluetooth Protocol File Exchange.

Description

The bluetoothWaveformConfig object creates a configuration object for the Bluetooth BR/EDR waveform generator using default and specified values. You can configure the Bluetooth waveform generator by using the applicable properties of the bluetoothWaveformConfig object.

Creation

Description

example

cfg = bluetoothWaveformConfig creates a configuration object, cfg, for a Bluetooth BR/EDR waveform generator with default property values.

example

cfg = bluetoothWaveformConfig(Name,Value) sets Properties by using one or more name-value pairs. Enclose each property name in quotes. For example, bluetoothWaveformConfig('Mode','EDR3M') sets the physical layer transmission mode to 3 Mbps.

Properties

expand all

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].

PHY transmission mode, specified as 'BR', 'EDR2M' or 'EDR3M'. This value indicates the type of Bluetooth BR/EDR waveform.

Data Types: char | string

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

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 packet type to 'DM1', 'DH1', 'DM3', 'DH3', 'DM5', 'DH5', 'AUX1', or 'DV'.

Data Types: double

Bluetooth device address, specified as a 12-element character vector or string scalar denoting a 6-octet hexadecimal value.

Data Types: char | string

Logical transport address for the packet, specified as a 3-bit binary column vector. This property indicates the active destination slave for a packet in the master-to-slave transmission slot.

Data Types: double

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 FieldField Information Indicates
FLOW1 bitFlow control information
ARQN1 bitAcknowledgment for successful reception of a CRC packet
SEQN1 bitSequencing scheme to order the packet stream

Data Types: double

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

Samples per symbol, specified as a positive integer. This value is used for GFSK modulation and demodulation.

Data Types: double

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

Whiten initialization, specified as a 7-bit binary column vector.

Dependencies

To enable this property, set the WhitenStatus property to 'On'.

Data Types: double

Logical link identifier, specified as a 2-bit binary column vector.

Dependencies

To enable this property, set the value of PacketType to 'DM1', 'DH1', 'DM3', 'DH3', 'DM5', 'DH5', 'AUX1', and 'DV'.

Data Types: double

Logical channel flow control indicator, specified as true or false.

Dependencies

To enable this property, set the value of packet type to 'DM1', 'DH1', 'DM3', 'DH3', 'DM5', 'DH5', 'AUX1', and 'DV'.

Data Types: logical

Object Functions

expand all

getPayloadLengthPayload length in bytes for Bluetooth BR/EDR format configuration
getPhyConfigPropertiesUpdated configuration properties of Bluetooth BR/EDR PHY configuration object
bluetoothWaveformGeneratorWaveform generator for Bluetooth BR/EDR PHY
bluetoothIdealReceiverIdeal receiver for Bluetooth BR/EDR PHY waveform

Examples

collapse all

Create three unique Bluetooth BR/EDR waveform configuration objects for synchronous connection oriented (SCO), connectionless slave broadcast (CSB), and asynchronous connectionless (ACL) logical transports.

Create a Bluetooth BR/EDR waveform configuration object for an SCO logical transport by specifying packet type as HV1. For SCO logical transport, the PHY transmission mode must be basic rate (BR).

cfg = bluetoothWaveformConfig;
cfg.PacketType = 'HV1'
cfg = 
  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 by specifying the packet type as DH1 and disabling the whiten status.

cfg = bluetoothWaveformConfig('PacketType','DH1','WhitenStatus','Off')
cfg = 
  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.

cfg = bluetoothWaveformConfig;
cfg.Mode = 'EDR2M';
cfg.PacketType = 'DH3';
cfg.PayloadLength = 184  % in bytes
cfg = 
  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, 2019. https://www.bluetooth.com/.

[2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.1. https://www.bluetooth.com/.

Extended Capabilities

Introduced in R2020a