Simulink problem and the “BLE Receive” block
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Shubham
il 17 Gen 2024
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.
Vedere anche
Categorie
Scopri di più su Modeling in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!