Main Content

nextHop

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

    Download Required: To use nextHop, 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

    example

    [channelIndex,X] = nextHop(FH,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 FH. The function also returns X, which is required for implementing whitening process in the physical layer (PHY).

    Examples

    collapse all

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

    fh = bluetoothFrequencyHop
    fh = 
      bluetoothFrequencyHop with properties:
    
          DeviceAddress: '9E8B33'
           SequenceType: 'Inquiry'
        InterlaceOffset: 16
                 KNudge: 0
                KOffset: 24
                Counter: 0
           UsedChannels: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ... ]
    
    

    Specify a clock value.

    inputClock = '12C'; % 28-bit

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

    [channelIndex, X] = nextHop(fh,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 the Clock 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 Master

    'Page' or 'Inquiry'

    Indicates native clock of the Slave

    'Page scan' or 'Inquiry scan'

    Indicates the estimated value of the clock for the Slave

    'Slave page response'

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

    'Master page response'

    Indicates the value that triggered a response from the paged device

    Data Types: char | string | double

    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

    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

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

    Introduced in R2020b