ESP8266WiFi.h Character limit

Hi
I' using a D1 wi-fi module ESP-12F wit a library ESP8266WiFi.
I receive a string from wi-fi module on port 23 telnet , i have a problem , the string is limited to 80 characters , but i have 120 Characters.
The string is cut.
There is a constat for modify the string limit?
read source code , this is only one test.

 <CODE/> while (client.available()) {
   <CODE/>   client.read(ch,120);  
    <CODE/>  Serial.println(ch);'

Thank Paolo

I'm not very experienced with the WiFi side of things. One of your problems is that you assume that you have 120 characters though there might be only one available.

So in your case client.available() returns 80 characters available and you try to read 120. You need a different approach where you collect data till you have 120 characters.

The simplest might be (as said, not experienced with WiFi)

if(client.available() >= 120)
{
  // read
  ...
  ...
}

What is the type of the variable ch? It sounds as a character and not an array so you can never store more than one character.


Note
``` starts and ends a code block; you do not need the <CODE/> on each line

Hallo
Ch is array of character char ch[200]={};
With the PC connection i shows the string and is about 120 chr , depend of numeric variation , are the parameters from automotive motor controller.
But the board read only 80.

Sorry for the delay, can you post your full code please. Or a representative example that exhibits the behaviour?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.