%% Scan for Nearby Bluetooth Low Energy Peripheral Devices
% Scan for nearby Bluetooth Low Energy peripheral devices and look at the device advertisement data.
% Use blelist to list all nearby peripheral devices that are currently advertising data. If your peripheral device is already connected to another device or application, it may not appear in this list. Disconnect your peripheral device from any other devices or applications first for MATLAB® to discover it.

list = blelist

% The RSSI values indicate signal strength. The table lists devices with a stronger signal first. These devices are closer.
% View advertisement data of the first device.

list.Advertisement(1)

% If your device has a larger advertising interval than the default timeout value of three seconds, you can specify a larger timeout value.

list = blelist('Timeout',10);

% Copyright 2019 The MathWorks, Inc.
%