Hi all,
This is my first post here at mbed.org so bare with me ...
I'm currently involved in a research project that requires raw serial communication with MBED from MATLAB. I use this small piece of MATLAB code to set up communication:
mbed = serial('com1')
fopen(mbed)
fprintf(mbed, 'Hello MBED')
Everything seems to work fine, the data is correctly received by MBED but MATLAB throws an error:
??? Error using ==> serial.fprintf at 144
An error occurred during writing.
Since this is obviously a MATLAB issue my first instinct is to search the MATLAB website for some more information ...
It seems this is not a MATLAB issue but a SerialPC driver problem:
Quote:
To determine if the data has been written completely, the MATLAB serial
object tries to flush the data out after writing. Some older USB->RS232
drivers do not properly support this operation resulting in an error. Make
sure that you have the latest driver from the vendor of your USB->RS232
dongle as these drivers have improved significantly in recent years.
Found at http://http://www.mathworks.com/matlabcentral/newsreader/view_thread/299738
Can someone please shed some light on this issue and/or provide a workaround
Thanks,
KK
Hi all,
This is my first post here at mbed.org so bare with me ...
I'm currently involved in a research project that requires raw serial communication with MBED from MATLAB. I use this small piece of MATLAB code to set up communication:
Everything seems to work fine, the data is correctly received by MBED but MATLAB throws an error:
Since this is obviously a MATLAB issue my first instinct is to search the MATLAB website for some more information ... It seems this is not a MATLAB issue but a SerialPC driver problem:
Quote:
To determine if the data has been written completely, the MATLAB serial object tries to flush the data out after writing. Some older USB->RS232 drivers do not properly support this operation resulting in an error. Make sure that you have the latest driver from the vendor of your USB->RS232 dongle as these drivers have improved significantly in recent years.
Found at http://http://www.mathworks.com/matlabcentral/newsreader/view_thread/299738
Can someone please shed some light on this issue and/or provide a workaround
Thanks,
KK