How can I communicate with a BLE device in Simulink?

Technical Source
1 min readSep 3, 2021

--

I would like to communicate with a BLE (Bluetooth low energy) device in Simulink. However, I found no BLE blocks in the Simulink library. Is this supported?

ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

There is currently no Simulink block that can directly read from a BLE device using the host PC interface. An enhancement request to add BLE Read/Write blocks to Simulink has been submitted to our development team.

As a workaround, you can add a MATLAB Function Block in your model that leverages the ble() function from MATLAB, which has been available since R2019b:

The code inside the MATLAB Function Block would be along the lines of:

function y = fcn()    
persistent b; %automatically initialized to []
persistent hr; %automatically initialized to []
%%extrinsic declarations
coder.extrinsic('ble');
coder.extrinsic('characteristic');

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet