Main Content

Comunicazione Bluetooth

Leggere da dispositivi Bluetooth® e scrivere sugli stessi

Il Bluetooth è un protocollo di comunicazione wireless per lo scambio di dati su brevi distanze utilizzando trasmissioni radio a lunghezza d’onda corta. I dispositivi più comuni con funzionalità Bluetooth includono i computer portatili, i telefoni e i sensori wireless.

Utilizzare l’interfaccia Bluetooth in MATLAB® per trasmettere e ricevere dati ASCII e binari. Questa interfaccia utilizza il profilo della porta seriale (SPP) Bluetooth. È possibile identificare qualsiasi dispositivo SPP Bluetooth e stabilire una connessione bidirezionale con tale dispositivo da MATLAB.

Per comunicare con un dispositivo Bluetooth il computer deve essere dotato di un adattatore Bluetooth incorporato o esterno. Per maggiori informazioni, vedere Configure Bluetooth Communication Settings.

Per simulare, analizzare e testare i sistemi di comunicazione Bluetooth, vedere Bluetooth Toolbox.

Funzioni

espandi tutto

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

Argomenti

Risoluzione dei problemi

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.