You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a WiFiClient sketch to communicate with a TCP/IP sever running on a PC.
When the WifiClient sends more than 92 bytes using
print()
println()
write()
functions, the return value that indicates how many bytes were written is zero for print() and write(). It is 2 bytes for println().
For example the following code
count = client.println("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
Serial.print("Wrote bytes = ");
Serial.println(count);
The Serial.println() indicates only 2 bytes were written. I confirmed that Server only received 2 bytes by checking with wireshark.
It appears there may be some SPI timing issue between the Arduino processor (I Used Arduino Mega 2560) and the WiFi shield.
The text was updated successfully, but these errors were encountered:
I don't know enough about SPI bus but I do share this problem. I didn't pinpoint the limit but in my case the client.print() will only work properly if the message is less than (90-100) bytes. Splitting the long message into multiple shorter messages and sending them with a for loop and client.print works though. It's just a pain. Any reason to this behavior? I've been looking up and down in different source files but I didn't see a buffer that could limit the message size.
I wrote a WiFiClient sketch to communicate with a TCP/IP sever running on a PC.
When the WifiClient sends more than 92 bytes using
functions, the return value that indicates how many bytes were written is zero for print() and write(). It is 2 bytes for println().
For example the following code
count = client.println("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
Serial.print("Wrote bytes = ");
Serial.println(count);
The Serial.println() indicates only 2 bytes were written. I confirmed that Server only received 2 bytes by checking with wireshark.
It appears there may be some SPI timing issue between the Arduino processor (I Used Arduino Mega 2560) and the WiFi shield.
The text was updated successfully, but these errors were encountered: