A library for talking to Multi-Tech's Cellular SocketModem Devices.

Dependents:   M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more

Revision:
96:27bdf4aa3a31
Parent:
86:186bbf974c7c
Child:
101:27bb34e23304
--- a/io/MTSSerialFlowControl.cpp	Fri Dec 27 23:55:18 2013 +0000
+++ b/io/MTSSerialFlowControl.cpp	Mon Dec 30 18:55:48 2013 +0000
@@ -35,7 +35,11 @@
 void MTSSerialFlowControl::handleRead()
 {
     while (serial.readable()) {
-        rxBuffer.write(serial.getc());
+        char byte = serial.getc();
+        if(rxBuffer.write(byte) != 1) {
+            printf("[ERROR] Serial Rx Byte Dropped [%c][%02X]\r\n", byte, byte);
+            notifyStopSending();
+        }
         if (rxBuffer.size() > highThreshold) {
             notifyStopSending();
         }