fwrite to serial object works only in async mode

3 vues (au cours des 30 derniers jours)
Darren DeBattista
Darren DeBattista le 19 Jan 2019
Hi all,
I am writing a script in Matlab to cummunicate through bluetooth. To do so, I have a usb to bluetooth module connected to my PC for which I create a COM port connection. The recieving end is a HC-05 bluetooth module.
I have previously managed to create the connection and send and recieve data using the fwrite/fread functions. Now I had the need to use the connection again but when I tried to use the same sceipt, a write error is displayed and the only way I managed to communicate is when I use the async mode. Strangly enough, when I dont use the async mode, and I get the write error, data is still transmitted and recieved by the recieving end.
Does anyone have any idea why this could happen?
Thanks

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by