khoih-prog / WiFiNINA_Generic

Enables WiFiNINA network connection (local and Internet) for SAM DUE, SAMD21, SAMD51, Teensy, AVR Mega, STM32, RP2040-based boards, etc. in addition to Arduino MKR WiFi 1010, Arduino MKR VIDOR 4000, Arduino UNO WiFi Rev.2 , Nano 33 IoT, Nano_RP2040_Connect. Now with fix of severe limitation to permit sending much larger data than total 4K
GNU General Public License v3.0
36 stars 12 forks source link

Fix server.send buffer size limited to 4k #25

Closed khoih-prog closed 1 year ago

khoih-prog commented 1 year ago

Created by @jlemieux55 as server.send buffer size limited to 4k #23

html file or message is > 4500 bytes server.send buffer truncates at > 4096 String message=""; message+=("html content is over 4500 bytes"); server.send(200, "text/html", message);

Platform: Arduino MKR1010 (wifinina)

Closed via WiFiNINA_Generic v1.8.15-0 which permits sending much larger data than total 4K.


Releases v1.8.15-0

  1. Fix severe limitation to permit sending much larger data than total 4K. Check server.send buffer size limited to 4k #23
  2. Add examples WiFiWebServer_BigData to demo how to send much larger data than total 4K
  3. Optimize code
  4. Clean up

Debug Terminal

The following is debug terminal output when running example WiFiWebServer_BigData on NANO_RP2040_CONNECT board, using this WiFiNINA_Generic Library, to demo how to send much larger data than total 4K

Start WiFiWebServer_BigData on NANO_RP2040_CONNECT
WiFiNINA_Generic v1.8.15-0
WiFiWebServer v1.10.0
Attempting to connect to SSID: HueNet
Attempting to connect to SSID: HueNet
SSID: HueNet
IP Address: 192.168.2.117
Signal strength (RSSI):-24 dBm
String Len = 27609
String Len = 27609
khoih-prog commented 1 year ago

Hi @jlemieux55

Did you try the new WiFiNINA_Generic v1.8.15-0 ?

If not working, it's possible that you have MKR1010 and that board actually uses WiFi101 library.

https://github.com/khoih-prog/WiFiNINA_Generic/blob/1ca8d8167a846f148c5062935a1afffb649d108f/src/WiFiNINA_Generic.h#L49-L54

If you're willing and have time to test, I can also modify the forked-WiFi101 library, to provide the similar feature, to send large data.

The current problem for me is that I have no MKR1010 to test and verify, and don't like to buy that outdated board.

Just let me know.

khoih-prog commented 1 year ago

Hi @jlemieux55

Just released WiFi101_Generic v1.0.0 to try fixing the 4k issue.

Please try and report any problem.


Releases v1.0.0

  1. Fix severe limitation to permit sending much larger data than total 4K
  2. Use allman astyle and add utils
  3. Add Packages' Patches

Releases v0.16.1