Main Content

Configure Bluetooth BR/EDR Channel with WLAN Interference and Pass the Waveform

Communications Toolbox™ Library for the Bluetooth® Protocol features enable you to model a wireless channel that is shared between Bluetooth basic rate/enhanced data rate (BR/EDR) and WLAN. The library also provides functionalities to add WLAN interference to the Bluetooth BR/EDR waveform. For information about how Bluetooth and WLAN coexists in the unlicensed 2.4 GHz Industrial, Scientific, and Medical (ISM) frequency band, see Bluetooth-WLAN Coexistence.

Configure Bluetooth BR/EDR Channel with WLAN Interference and Pass the Waveform

This example shows you how to create a Bluetooth BR/EDR channel and configure its applicable properties. Then, specify the source of WLAN interference and add the WLAN signal to the Bluetooth BR/EDR channel. Finally, generate a Bluetooth BR/EDR waveform and pass the waveform through the channel.

Create and Configure Bluetooth BR/EDR Channel with WLAN Interference

Configure a Bluetooth BR/EDR channel by using the helperBluetoothChannel object, which creates a Bluetooth BR/EDR channel model object with configurable properties.

bluetoothBREDRChannel = helperBluetoothChannel
bluetoothBREDRChannel = 
  helperBluetoothChannel with properties:

    ChannelIndex: 0
            FSPL: 1
    NodePosition: [0 0 0]
            EbNo: 10
             SIR: 0

Set the ratio of energy per bit to noise power spectral density (Eb/No) for the additive white Gaussian noise (AWGN) channel to 22 dB. Specify signal to interference ratio (SIR) as -15 dB.

bluetoothBREDRChannel.EbNo = 22;
bluetoothBREDRChannel.SIR = -15;

Specify the source of WLAN interference by using the wlanInterference property. Use one of these options to specify the source of the WLAN interference.

  • 'Generated': To add a WLAN (802.11b) signal (requires the WLAN Toolbox™ software), select this option.

  • 'BasebandFile': To add a WLAN signal from a baseband file (.bb), select this option. You can specify the file name using the wlanBBFilename input argument. If you do not specify the .bb file, the example uses the default .bb file, '', to add the WLAN signal.

  • 'None': To disable WLAN interference, select this option.

Specify the source of WLAN interference as 'BasebandFile'and specify a baseband file.

wlanInterference = 'BasebandFile';
wlanBBFilename =  '';

Generate the WLAN signal interference, by using the helperBluetoothGenerateWLANWaveform function. Add the generated WLAN signal interference to the Bluetooth BR/EDR channel.

if ~strcmpi(wlanInterference,'None')
    wlanWaveform = helperBluetoothGenerateWLANWaveform(wlanInterference,wlanBBFilename);

Generate and Pass Bluetooth BR/EDR Waveform Through the Channel

Create a Bluetooth BR/EDR signal structure, specifying different configurable properties of the waveform.

bluetoothSignal = struct(...
    'PacketType','DM1',...                      % Packet type
    'Waveform',[],...                           % Waveform
    'NumSamples',[],...                         % Number of samples
    'SampleRate',1e6,...                        % Sample rate
    'SamplesPerSymbol',8,...                    % Samples per symbol
    'Payload',zeros(1,3200), ...                % Payload
    'PayloadLength',0, ...                      % Payload length
    'SourceID',0,...                            % Source identifier
    'Bandwidth',1,...                           % Bandwidth
    'NodePosition',[0 0 0],...                  % Node position
    'CenterFrequency',2402,...                  % Center frequency
    'StartTime',0,...                           % Waveform start time
    'EndTime',0,...                             % Waveform end time
    'Duration',0);...                           % Waveform duration

Create a Bluetooth BR/EDR waveform configuration object. Specify the packet type as HV1.

cfg = bluetoothWaveformConfig;
cfg.PacketType = 'HV1';

Create a bit vector containing concatenated payloads.

numBits = getPayloadLength(cfg)*8;              % Byte to bit conversion
message = randi([0 1],numBits,1);

Generate a Bluetooth BR/EDR waveform.

txWaveform = bluetoothWaveformGenerator(message,cfg);

Pass the generated waveform through the Bluetooth BR/EDR channel.

bluetoothSignal.Waveform = txWaveform;
bluetoothSignal.NumSamples = numel(txWaveform);
bluetoothSignal = run(bluetoothBREDRChannel,bluetoothSignal,cfg.Mode);
wirelessWaveform = bluetoothSignal.Waveform;


[1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed September 17, 2020.

[2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.2.

[3] P802.15.2/D09 - IEEE Draft Recommended Practice for Information Technology Telecommunications and Information Exchange Between Systems Local and Metropolitan Area Networks Specific Requirements - Part 15.2: Coexistence of Wireless Personal Area Networks With Other Wireless Devices Operating in Unlicensed Frequency Bands. LAN/MAN Standards Committee, IEEE Computer Society, 2003,

See Also



Related Topics