Serial Comms loosing Data Issue

I have a ATmel1284p that I program using arduino.

This micro is connected to a ESP13 on RX1/TX1 (Serial1) and normal Debug Comms on RX/TX(Serial).

When I connect my ftdi directly to the ESP (i.e no arduino) I get the following output when sending the lisp accesspoints commnad:


+CWLAP:(3,"Gtfo_myWifi",-91,"f0:7d:68:14:8f:ce",1) +CWLAP:(4,"TP-LINK_E8E966",-82,"10:fe:ed:e8:e9:66",2) +CWLAP:(4,"MozartWiFi",-61,"74:44:01:4d:25:58",11) +CWLAP:(4,"MAT Cell",-90,"b0:48:7a:d1:ec:1c",5) +CWLAP:(3,"AndroidAP",-49,"40:f3:08:47:e9:2f",6)

However when I connect the ESP to the Arduino as mentioned above I don't get the full list in my Serial log. I sent AT+CWLAP 4 times:


+CWLAP:(4,"MozartWiFi",-60,"74:44:01:4d:25:58",11) AT+CWLAP


+CWLAP:(4,"MozartWiFi",-61,"74:44:01:4d:25:58",11) AT+CWLAP



For some quick background I have Serial forwarding received data to Serial1 and Serial1 printing data to Serial.

void loop() { //esp13 read while (Serial1.available() > 0) { int inByte =; Serial.write(inByte); } //send data from serial monitor to esp. while (Serial.available() > 0) { int inByte =; Serial1.write(inByte); }

delay(3000); }

Turns out I needed to increase the SERIAL_RX_BUFFER_SIZE and optionally SERIAL_TX_BUFFER_SIZE from 64 to 256 in the HardwareSerial.h file.