Bluetooth Communication

Communication using the Bluetooth® interface

Use the Bluetooth interface to connect to devices over the Bluetooth interface and to transmit and receive ASCII and binary data. The toolbox supports the Bluetooth Serial Port Profile (SPP). You can identify any SPP Bluetooth device and establish a two-way connection with that device.

To communicate with instruments, you need to use an external adaptor, such as a USB adaptor that you plug into the computer, or a built-in adaptor, such as the ones that are included in some laptop computers. For more information, see Configuring Bluetooth Communication.


BluetoothCreate Bluetooth object
fopenConnect interface object to instrument
fcloseDisconnect interface object from instrument
fprintfWrite text to instrument
freadRead binary data from instrument
fscanfRead data from instrument, and format as text
fwriteWrite binary data to instrument
fgetlRead line of text from instrument and discard terminator
fgetsRead line of text from instrument and include terminator
flushinputRemove data from input buffer
flushoutputRemove data from output buffer
binblockreadRead binblock data from instrument
binblockwriteWrite binblock data to instrument
queryWrite text to instrument, and read data from instrument
readasyncRead data asynchronously from instrument
stopasyncStop asynchronous read and write operations
scanstrRead data from instrument, format as text, and parse
getInstrument object properties
setConfigure or display instrument object properties
dispDisplay instrument object summary information
instrhwinfoInformation about available hardware
methodsClass method names and descriptions
recordRecord data and event information to file
clearRemove instrument objects from MATLAB workspace
deleteRemove instrument objects from memory
instrcallbackDisplay event information when event occurs
instrfindRead instrument objects from memory to MATLAB workspace
instrfindallFind visible and hidden instrument objects
instrhelpHelp for instrument object type, function, or property
instridDefine and retrieve commands that identify instruments
instrnotifyDefine notification for instrument events
instrresetDisconnect and delete all instrument objects
inspectOpen Property Inspector
isvalidDetermine whether instrument objects are valid
lengthLength of instrument object array
loadLoad instrument objects and variables into MATLAB workspace
obj2mfileConvert instrument object to MATLAB code
propinfoInstrument object property information
saveSave instrument objects and variables to MAT-file
sizeSize of instrument object array


Configuring Bluetooth Communication

Instrument Control Toolbox™ can communicate with Bluetooth devices via an adaptor. You can discover your devices and view their properties.

Transmitting Data Over the Bluetooth Interface

You can read and write both text data (ASCII based) and binary data over the Bluetooth interface.

Using Events and Callbacks with Bluetooth

You can enhance the power and flexibility of your instrument communication by using events and callbacks.

Using Bluetooth Interface in Test & Measurement Tool

The Bluetooth interface is supported for use in the Test & Measurement Tool, and includes the same functionality that is available in the core toolbox.

Bluetooth Interface Overview

The Instrument Control Toolbox Bluetooth interface lets you connect to devices over the Bluetooth interface and to transmit and receive ASCII and binary data.

Bluetooth Interface Usage Guidelines

These tips and guidelines may be relevant to your use of the Bluetooth interface.

Instrument Control Toolbox Properties

These properties are available in the toolbox.


Troubleshooting Bluetooth Interface

Try these tips if you have problems using the toolbox with the Bluetooth interface. Includes information about Bluetooth supported platforms, adaptor requirements, configuration and connection, and other interface-specific tips.

Featured Examples