Simulink problem and the “BLE Receive” block
조회 수: 4 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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:
1. For setting up ESP32 Hardware: https://www.mathworks.com/help/supportpkg/arduinoio/ug/configure-setup-for-esp32-hardware.html
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:
1. https://www.mathworks.com/help/supportpkg/android/ref/work-with-ble-blocks-on-android-devices.html
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Modeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!