Main Content

Bluetooth-Kommunikation

Lesen aus und Schreiben in Bluetooth®-Geräte

Bluetooth ist ein drahtloses Kommunikationsprotokoll zum Datenaustausch über kurze Entfernungen unter Einsatz von Funkübertragungen mit kurzer Wellenlänge. Gängige Geräte mit Bluetooth-Funktionen sind Laptops, Smartphones und drahtlose Sensoren.

Über die Bluetooth-Schnittstelle in MATLAB® können Sie ASCII- und Binärdaten übertragen und empfangen. Diese Schnittstelle nutzt das Bluetooth Serial Port Profile (SPP). Sie können jedes beliebige Bluetooth-SPP-Gerät identifizieren und eine Zwei-Wege-Verbindung mit diesem Gerät über MATLAB aufbauen.

Für die Kommunikation mit einem Bluetooth-Gerät benötigt Ihre Computer einen eingebauten oder externen Bluetooth-Adapter. Weitere Informationen finden Sie unter Configure Bluetooth Communication Settings.

Für die Simulation, Analyse und Prüfung der Bluetooth-Kommunikationssysteme siehe Bluetooth Toolbox.

Funktionen

alle erweitern

bluetoothlistScan nearby Bluetooth Classic devices (Seit R2020b)
bluetoothConnect to Bluetooth Classic device (Seit R2020b)
configureTerminatorSet terminator for ASCII string communication with Bluetooth device (Seit R2020b)
configureCallbackSet callback function and trigger condition for communication with Bluetooth device (Seit R2020b)
readRead data from Bluetooth device (Seit R2020b)
readlineRead line of ASCII string data from Bluetooth device (Seit R2020b)
writeWrite data to Bluetooth device (Seit R2020b)
writelineWrite line of ASCII data to Bluetooth device (Seit R2020b)
flushClear Bluetooth device buffers (Seit R2020b)

Themen

Fehlersuche

Troubleshooting Bluetooth Communication

Troubleshoot the Bluetooth interface.

Resolve Bluetooth Connection Errors

Troubleshoot connecting to a Bluetooth device.

Resolve Bluetooth Warning: Unable to Read Any Data

Troubleshoot when you receive no data and you get the warning message: Bluetooth unable to read any data.

Resolve Bluetooth Warning: Unable to Read All Data

Troubleshoot when you receive some data and you get the warning message: Bluetooth unable to read all requested data.