devlist = bluetoothlist("Timeout",time) scans
for up to time seconds. The default timeout period is 35 seconds for
Windows® and 20 seconds for macOS. The value of time must be 5 or greater.
Scan nearby Bluetooth Classic devices and check their connection
status.
Use bluetoothlist to list all nearby devices. If your device is
already connected to another device or application, it might not appear in this list.
Disconnect your device from any other devices or applications first for MATLAB® to
discover it.
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.
devlist = bluetoothlist("Timeout",10)
devlist=3×4 table
Name Address Channel Status
_____________ ______________ _______ __________________
"Pixel 3" "3C286DD533CA" 8 "Ready to connect"
"mjin-maci" "A886DDA44062" 3 "Requires pairing"
List of nearby Bluetooth devices, returned as a table. The table has the following columns.
Device name, returned as a string scalar. Multiple devices can share the same
name.
Data Types: string
Device identifier, returned as a string scalar.
Data Types: string
Device SPP channel, returned as a categorical scalar. If the channel is
unknown, the value in this column is Unknown.
Data Types: categorical
Device connection status, returned as a string. You can connect to a
Bluetooth device using bluetooth only if
its status is "Ready to connect". Possible values
follow.
Value
Description
"Ready to connect"
Device supports SPP, is paired, and not connected anywhere.
"Requires pairing"
Device supports SPP and is not paired.
"Connected"
Device supports SPP and is connected.
"Unsupported"
Device does not support SPP.
"Unknown"
Unknown if device supports SPP. Device is turned off or fails to
respond to scanning request.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.