%% Select Bluetooth BR/EDR Channel Index for Page Frequency Hopping Sequence
% Create a Bluetooth BR/EDR channel index object for frequency hopping.

fh = bluetoothFrequencyHop;

% Specify the frequency hopping sequence type as page.

fh.SequenceType = 'Page';

% Specify a clock value, offset to select frequencies in A-train, and Bluetooth BR/EDR device address.

inputClock = 44; % 28-bit
fh.KOffset = 24;
fh.DeviceAddress = '2A96EF25'

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

[channelIndex, X] = nextHop(fh, inputClock)

% Copyright 2020 The MathWorks, Inc.