Contenu principal

Communication Bluetooth

Lire et écrire sur des dispositifs Bluetooth®

Le Bluetooth est un protocole de télécommunications qui permet d’échanger des données sur de petites distances grâce à des émissions radio à ondes courtes. Les dispositifs courants intégrant des fonctionnalités Bluetooth sont notamment les ordinateurs portables, les téléphones et les capteurs sans fil.

L’utilisation de l’interface Bluetooth dans MATLAB® permet d’émettre et de recevoir des données ASCII et binaires. Cette interface utilise le profil Bluetooth SPP (Serial Port Profile). Il est possible d’identifier tout dispositif Bluetooth SPP et d’établir une connexion bidirectionnelle avec lui depuis MATLAB.

Pour communiquer avec un dispositif Bluetooth, votre ordinateur doit être doté d’un adaptateur Bluetooth intégré ou externe. Pour plus d’informations, consultez Configure Bluetooth Communication Settings.

Pour simuler, analyser et tester des systèmes de communications Bluetooth, consultez Bluetooth Toolbox.

Fonctions

développer tout

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

Rubriques

Résolution des problèmes

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.

Sélection d՚exemples