WIP: Added possibility to send messages larger than 1400 bytes...
I've done developing the functionality. I've tested that you can successfully send over 15kB but directly from Serial(i.e. not saving the message in variable). I've restricted the MAX_MESSAGE_BUNDLE_SIZE
in painlessMesh.h
to prevent the free memory to fall under the 16000 bytes limit. If anyone wants he/she could change it and the ESP should be successfully sending larger messages(i think 4kB is large enough
The way I've tested it:
- declare variable in the ram with random text with size 4kB
- send that variable every 10s
- print the length of everything received from the mesh
Other minor fixes:
- removed the
JSON_BUFSIZE
as it is no longer needed by the ArduinoJson library (as long the buffer is dynamic it will expand over time if needed) changed_nodeId
to be theESP.getChipId()
as I find it more practical. Every ESP comes with its random ID assigned from the factory...- indented the
switch
statements better(I think it's easier to read) - fixed
NUMBER_OF_TIMESTAMS
to beNUMBER_OF_TIMESTAMPS
@BlackEdder If you want to merge this, please first test it on your hardware as I may have missed something to debug and write comment so I can fix it... After that I'll remove the WIP:
thing up there