Can't read data via BLE

Hello!
I'm working on a project where I use a sensor with arduino to acquire data that I will send to PC via BLE. The connection to the device and chosing the characteristic are working, but when I want to read the data I get this error message: "Failed to read characteristic. If device is disconnected, then clear existing ble object and recreate it." I'm sending an array of int32_t that contains 128 elements (in bytes that 512 in total). What could be the problem here?
The matlab code:
blelist
Scanning and connecting to Bluetooth Low Energy peripheral devices are not supported on Linux.
b = ble("ArduinoBLE_MAX86140")
c = characteristic(b, "72AAE05E-61D4-11EE-8C99-0242AC120002", "72aae39c-61d4-11ee-8c99-0242ac120002")
BLEdata = read(c);
I am looking forward to your answers!
Your sincerelly,
Tóth András

3 comentarios

Vineeth Nair
Vineeth Nair el 26 de Oct. de 2023
Is your BLE device sending characteristic data?Have you verified it?
Tóth András Mihály
Tóth András Mihály el 26 de Oct. de 2023
Yes I verified it. It connects to the device and can acquire the characteristic, but when I try to read with read(c), I get the above error message.
Vineeth Nair
Vineeth Nair el 27 de Oct. de 2023
To debug this issue further, Please reach out to us at MathWorks Technical Support: https://www.mathworks.com/support/contact_us.html

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Preguntada:

el 25 de Oct. de 2023

Comentada:

el 27 de Oct. de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by