jpatrick62
Well-known member
Hello, I am submitting this hoping someone else has run up against this and can help. I am using the ESP8266 with Teensy3.1, making use of AT communication over serial1. Everything seems to be going well
except for large packet transfers. When I issue an AT+CWLAP command from the teensy, I might expect a list of access points back from the ESP8266, and that list may be up to 640 bytes (if there are 10+ access points).
Here's my issue: I get the first 64 bytes only, and after that nothing. Now I should mention that I employ 2 encoder switches, to which I use 4 interrupts for processing gray scale, 1 interrupt for the MSB and 1 for the LSB. However,
neither of these interrupts is firing at this time (they would fire during the CheckLeftSelectPin -> checkRightRotation funtions if they did) as I have used the encodeers to display the "View Access Points" menu on my LCD.
The LCD is a I2C 2x20 display that will hopefully allow you to roll through the available Access Points (as deleivered by the ESP8266 over the UART to the teensy). Here is the pertinent section of code that I have debugged through -
I have remmed out all but the serial 1 UART commands and Serial writes, but still only 64 bytes.
I have seen other posts where an increase in the buffer size on the teensy3.1 may be needed, is this the only way to go? Thanks in advance for any input!
except for large packet transfers. When I issue an AT+CWLAP command from the teensy, I might expect a list of access points back from the ESP8266, and that list may be up to 640 bytes (if there are 10+ access points).
Here's my issue: I get the first 64 bytes only, and after that nothing. Now I should mention that I employ 2 encoder switches, to which I use 4 interrupts for processing gray scale, 1 interrupt for the MSB and 1 for the LSB. However,
neither of these interrupts is firing at this time (they would fire during the CheckLeftSelectPin -> checkRightRotation funtions if they did) as I have used the encodeers to display the "View Access Points" menu on my LCD.
The LCD is a I2C 2x20 display that will hopefully allow you to roll through the available Access Points (as deleivered by the ESP8266 over the UART to the teensy). Here is the pertinent section of code that I have debugged through -
I have remmed out all but the serial 1 UART commands and Serial writes, but still only 64 bytes.
Code:
#define UART1 Serial1
char szUartBuffer[MAX_CHANNEL_VALUE] = { 0 };
/////////////////////////////////////////////////////////
void loop()
{
CheckLeftSelectPin();
CheckRightSelectPin();
checkLeftRotation();
checkRightRotation();
updateMenu();
displayMenu();
while(UART1.available())
{
//get stuff from Teensy UART (sent from 8266) DEBUG
Serial.write(UART1.read());
/*
iChars = readUART(UART1.read(), szUartBuffer, MAX_CHANNEL_VALUE);
if (iChars > 0)
{
processWifiReply(szUartBuffer);
memset(szUartBuffer, 0, MAX_CHANNEL_VALUE);
Serial.println("Outstanding requests is set false");
UART1.flush();
bOutstandingUartWifiRequest = false;
//Debug
if( iNumAPEntries > 0)
{
Serial.println("List of AP Entries:");
for(int i = 0; i < iNumAPEntries; i++)
{
Serial.println(szAPs[i]);
}
}
}
*/
}
if(Serial.available())
{
UART1.write(Serial.read());
}
delay(150);
}
I have seen other posts where an increase in the buffer size on the teensy3.1 may be needed, is this the only way to go? Thanks in advance for any input!