Main Content

Comunicación Bluetooth

Lea y escriba en dispositivos Bluetooth®

Bluetooth es un protocolo de comunicación inalámbrica para el intercambio de datos en distancias cortas con transmisiones de radio de longitud de onda corta. Los dispositivos comunes con prestaciones Bluetooth incluyen ordenadores portátiles, teléfonos y sensores inalámbricos.

Utilice la interfaz Bluetooth en MATLAB® para transmitir y recibir datos binarios y ASCII. Esta interfaz utiliza el perfil de puerto de serie (SSP) Bluetooth. Puede identificar cualquier dispositivo SPP Bluetooth y establecer una conexión bilateral con ese dispositivo desde MATLAB.

Para comunicarse con un dispositivo Bluetooth, su ordenador debe tener un adaptador Bluetooth integrado o externo. Para obtener más información, consulte Configure Bluetooth Communication Settings.

Para simular, analizar y probar sistemas de comunicación por Bluetooth, consulte Bluetooth Toolbox.

Funciones

expandir todo

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

Temas

Solución de problemas

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.