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.
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:
Thanks, have done like that but is there any way to set WriteBufferSize in .net MF?
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).