Main Site Documentation

Serial WriteBufferSize in .net MF


#1

I am working with a project based of serial communication. I am using FEZ cobra. I can able to read/write data through FEZ successfully.

The problem is whenever i write approx 30 bytes, at receiving side interrupt, i got the receive string in two parts. To overcome this in regular Framework, we normally set “WriteBufferSize”, but the property is not available in .net MF.

Can some one suggest how to overcome this.


#2

work with a delimiter, and on the receiving end, keep on reading the serial port until you receive the delimiter.

I use a | to separate various data and at the end I add a ; so my serial message looks like:

12.2|24.3|50|8.9|15;

#3

Thanks, have done like that but is there any way to set WriteBufferSize in .net MF?


#4

Have a look at this thread: http://www.tinyclr.com/forum/2/3090/


#5

Even in regular .NET you shouldn’t expect the received data to be complete. You always have to buffer it and detect the end of data (e.g. using a delimiter as Eric suggested).