How to read data from a nRF51 DK to Matlab using a nRF51 Dongle - BLE over UART(serial port)?

10 views (last 30 days)
Hello,
I try to read data from nRF51 DK to Matlab using an nRF51 dongle as a central device interfacing between the PC and the nRF51 DK. In my case, data are stored in the nRF51 DK PCA10028 and I would like to access in real time. For now, I can open the serial port corresponding to the nRF51 dongle in Matlab but whatever command I write (fwrite) on the serial object, I always obtain the same answer when reading (fread)
Do I need special functions for reading and writing data in Matlab? Now, I am coding : obj = serial('COM12'); fopen(obj); a=get(obj); record(obj,'on'); UUID = ['2A','00']; dec=hex2dec(UUID); fwrite(obj,char(dec)'); [R,count] = fread(obj);
Thank you in advance,
BCI

Answers (0)

Community Treasure Hunt

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

Start Hunting!