New "bluetooth" function doesn't pair with device; old "Bluetooth" function does work.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Aldo Vladimir Roman Diaz
el 3 de Mayo de 2021
Respondida: Aldo Vladimir Roman Diaz
el 21 de Abr. de 2022
¡Hello comunity!
I'm trying to connect an ESP32 via Bluetooth serial.
I've tried both the old Bluetooth function from the "instrument control toolbox" and the new bluetooth function.
The old function works fine, but I recieve a warning that it will be removed in a further Matlab version; meanwhile, the new function throws an error.
Here is the code I'm using to pair with the ESP32:
list=bluetoothlist
%%Result:
%%"ESP32test" "7C9EBDF5434A" 1 "Ready to connect"
device1=Bluetooth("ESP32test",1)
%%Result:
%%Connects with no problem.
device2=bluetooth("ESP32test",1)
%%Result:
%%Unable to find paired device with specified name or address "ESP32test".
%%Run bluetoothlist to check device status and channel number.
I would like to know if I'm using the new function incorrectly, wouldn't like my code to stop working when Mathworks removes the old function in further versions..
¡Thank you!
2 comentarios
Rafael Masot
el 14 de Abr. de 2022
I have the same problem. My bluetooth is built-in PC and recognize my device bluetooth without problems (ESP32). In Matlab I can see the device.
>> bluetoothlist
Run blelist to search for nearby Bluetooth Low Energy peripheral devices.
ans =
1×4 table
Name Address Channel Status
_________ ______________ _______ __________________
"ESP32BT" "2462ABF2FBDA" 1 "Ready to connect"
But when I try to connect, the message is the next:
>> bt=bluetooth("ESP32BT")
Unable to connect to device. Run bluetoothlist to check device status
and channel number.
See related documentation for troubleshooting steps.
Please, anybody can help us?
Respuestas (1)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!