Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

server.send buffer size limited to 4k #23

Closed
jlemieux55 opened this issue Nov 13, 2022 · 4 comments
Closed

server.send buffer size limited to 4k #23

jlemieux55 opened this issue Nov 13, 2022 · 4 comments

Comments

@jlemieux55
Copy link

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);

@jlemieux55
Copy link
Author

forgot to say:
Platform: Arduino MKR1010 (wifinina)

@khoih-prog
Copy link
Owner

HI @jlemieux55

Actually, the limitation is not the bug of this library, but the limitation of WiFiNINA library and certainly modified WiFiNINA_Generic, prevent this library to send in chunks to deal with large html.

The issue affects all WiFiNINA-based boards, such as Nano_33_IoT, Nano_RP2040_Connect, MKR1010, etc. usng this library or not.

You can test and verify by using other boards, such as ESP32/ESP8266, Portenta_H7, RP2040W and see sending html contents much larger than 4K is OK

You can post an issue on WiFiNINA to help fix thus issue / enhance.

I don't know if I have time to check and fix the WiFiNINA_Generic.

Try to switch to better, even cheaper boards, such as RP2040W, ESP32/ESP8266, etc.

@khoih-prog
Copy link
Owner

khoih-prog commented Nov 14, 2022

Hi @jlemieux55

Good news. I just fix the limitation of WiFiNINA_Generic and you now can send very large HTML size.

Will post the new WiFiNINA_Generic and let you know to try after some more abusive tests.

Be patient.

khoih-prog added a commit to khoih-prog/WiFiNINA_Generic that referenced this issue Nov 14, 2022
### 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](khoih-prog/WiFiWebServer#23)
2. Add examples [WiFiWebServer_BigData](https://github.com/khoih-prog/WiFiNINA_Generic/tree/main/examples/WiFiWebServer_BigData) to demo how to send much larger data than total 4K
3. Optimize code
4. Clean up
khoih-prog added a commit to khoih-prog/WiFiNINA_Generic that referenced this issue Nov 14, 2022
### 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](khoih-prog/WiFiWebServer#23)
2. Add examples [WiFiWebServer_BigData](https://github.com/khoih-prog/WiFiNINA_Generic/tree/main/examples/WiFiWebServer_BigData) to demo how to send much larger data than total 4K
3. Optimize code
4. Clean up
khoih-prog added a commit to khoih-prog/WiFiNINA_Generic that referenced this issue Nov 14, 2022
### 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](khoih-prog/WiFiWebServer#23)
2. Add examples [WiFiWebServer_BigData](https://github.com/khoih-prog/WiFiNINA_Generic/tree/master/examples/WiFiWebServer_BigData) to demo how to send much larger data than total 4K
3. Optimize code
4. Clean up
khoih-prog added a commit to khoih-prog/WiFiNINA_Generic that referenced this issue Nov 14, 2022
### 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](khoih-prog/WiFiWebServer#23)
2. Add examples [WiFiWebServer_BigData](https://github.com/khoih-prog/WiFiNINA_Generic/tree/master/examples/WiFiWebServer_BigData) to demo how to send much larger data than total 4K
3. Optimize code
4. Clean up
@khoih-prog
Copy link
Owner

khoih-prog commented Nov 14, 2022

Hi @jlemieux55

Please check the new release WiFiNINA_Generic v1.8.15-0 which permits sending much larger data than total 4K.

Your contribution is noted in Contributions and Thanks


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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants