Simulink problem and the “BLE Receive” block

조회 수: 4 (최근 30일)
Sébastien AZZOLA
Sébastien AZZOLA 2023년 12월 24일
댓글: Sébastien AZZOLA 2024년 1월 18일
Good morning,
I cannot receive data from a Bluetooth Low Energy sensor with simulink and the "BLE Receive" block.
I use an ESP WROOM 32 ESP card. It is recognized under Matlab and communication works.
I can scan and find the device and select the feature to read. But there is no feedback?
With direct commands (ble, blelist, etc.) I can recover the data.
It looks like I can't subscribe to the service?
Do you have an example to offer me?
Thanks for your help.
Best regards
Sebastian

답변 (1개)

Shubham
Shubham 2024년 1월 17일
Hey Sebastien,
It seems that you can use direct commands with your “ESP WROOM 32 ESP card” however you are unable to receive data from a Bluetooth Low Energy sensor using a BLE receive block in Simulink.
Since you can retrieve data using direct commands, I am assuming you are able to set up a connection. However please refer to the following:
2. For using ESP32 board properties, set the variant you are using: https://www.mathworks.com/help/supportpkg/arduino/ref/arduino-esp32-wroom-board-properties.html
Please note that you would require to install Support package for Arduino: https://www.mathworks.com/help/supportpkg/arduinoio/ug/intro.html#bvnykwy
Next you need to configure BLE Receive block by setting the “Mode” to “Central” to scan nearby devices in Simulink to connect with the ESP32 module. You can have a look at these examples using BLE receive block:
Lastly, if BLE Receive block does not work, you can try writing a MATLAB Function block to receive data since you are able to retrieve data from MATLAB. You can connect the output of this MATLAB function to wherever you need the data in your Simulink model.
Hope this helps.
  댓글 수: 1
Sébastien AZZOLA
Sébastien AZZOLA 2024년 1월 18일
Good morning,
Thank you for your help.I followed this procedure to connect my ESP32 board and the test is OK.
I can scan Bluetooth devices with the ESP32 card and retrieve the "services and characteristics".
I can even read the name of the hardware. But when I want to receive the "Cycling Speed and Cadence" service with CharacteristicName "CSC Measurement", the data is incorrect and does not update?
I made a request to support and there is a problem with the "BLE receive" block.
I'm waiting for the correction.
Thanks again for the response.
Best regards

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by