Unfortunately, this doesn't work - I get some of the characters, and other i don't.
I get the same results, when changing from open mode from IO_SERIAL_XON_XOFF to IO_SERIAL_NON_BLOCKING.
Also, adding delays between tx and rx change the results a bit:
*** Receiving First batch of strings: ***
Terminal:
AT+iRP1
ID809b16 11.6.2012
I/OK
Everything was received correctly from UART.
*** Receiving Second batch of strings: ***
Terminal:
+++I/ERROR (056)
And here is what i get from UART:
+++ <=== Missing chars: "I/ERROR (056)"
Missing characters when reading from UART.
*** Receiving Third of strings: ***
Terminal:
AT+iRP1
ID809b16 11.6.2012
I/OK
And here is what i get from UART:
IAT+iRP1 <=== A spare char: "I"
ID809b16 11.6.2012
I/OK
Spare character when reading from UART - probably one of the missing chars from the previous batch.
It seems that something with the buffer or reception timings is wrong.
Do you have any suggestions?
Thanks,
Lior.