%% Scan for Nearby Bluetooth Classic Devices
% Scan for nearby Bluetooth Classic devices and check its connection status.
% Use bluetoothlist to list all nearby devices that support Bluetooth Serial Port Profile (SPP). If your 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 = bluetoothlist

% The Name and Address columns identify the device. The Channel column indicates the device SPP channel. The Status column describes the current device connection status.
% You can also specify a timeout value less than the default 35 seconds on Windows and 20 seconds on macOS.

list = bluetoothlist("Timeout",10)

% Copyright 2020 The MathWorks, Inc.