Main Content


Select Bluetooth BR/EDR channel index to hop for next frequency



    [channelIndex,X] = nextHop(cfgFH,Clock) selects a Bluetooth® basic rate/enhanced data rate (BR/EDR) channel index, channelIndex to hop for next frequency. This selection is based on the Bluetooth BR/EDR frequency hopping object, FH, the clock, Clock, and the SequenceType property of the cfgFH. The object function also returns X, which is required for implementing whitening process in the physical layer (PHY).


    collapse all

    Create a default Bluetooth BR/EDR channel index object for frequency hopping.

    cfgFH = bluetoothFrequencyHop
    cfgFH = 
      bluetoothFrequencyHop with properties:
        DeviceAddress: '9E8B33'
         SequenceType: 'Inquiry'
               KNudge: 0
              KOffset: 24

    Specify a clock value.

    inputClock = '12C';        % 28-bit

    Select a Bluetooth BR/EDR channel index to hop for the next frequency.

    [channelIndex,X] = nextHop(cfgFH,inputClock)
    channelIndex = 41
    X = 30

    Input Arguments

    collapse all

    Bluetooth BR/EDR channel index for frequency hopping, specified as a bluetoothFrequencyHop object.

    Clock, specified as one of these values:

    • Character vector — This vector represents the Clock in hexadecimal format

    • String scalar — This scalar represents the Clock in hexadecimal format

    • Numeric scalar — This scalar represent the Clock in the range [0, 228–1]

    This argument is a 28-bit value that computes the inputs to the hop selection kernel. This table shows the dependency of this argument on the value of the SequenceType property of the FH input.

    Value of SequenceType PropertyClock Input
    'Connection basic' or 'Connection adaptive'

    Indicates native clock of the Central

    'Page' or 'Inquiry'

    Indicates native clock of the Peripheral

    'Page scan' or 'Inquiry scan'

    Indicates the estimated value of the clock for the Peripheral

    'Peripheral page response'

    Indicates the value when the access code of the recipient is detected

    'Central page response'

    Indicates the value that triggered a response from the paged device

    Data Types: char | string | double


    From R2022a, this object function uses 'Central' and 'Peripheral' terminologies to represent 'Master' and 'Slave' nodes, respectively.

    Output Arguments

    collapse all

    Channel index, returned as an integer in the range [0, 78].

    Data Types: double

    Control signal to be used in whitening process, returned as a nonnegative integer.

    Data Types: double


    [1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 22, 2021.

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

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2020b