automote / ESP-CoAP

This repo contains CoAP protocol for ESP-12E
http://thingtronics.com
GNU General Public License v3.0
71 stars 28 forks source link

Packet splitting if payload bigger than 250 bytes #16

Closed ebleme closed 5 years ago

ebleme commented 5 years ago

Hi. I am using this library to test CoAP performance for various situations. When I use Get method to get data bigger than 250 bytes from a server this library splits packets.

I opened an issue about BUF_MAX_SIZE here #15 . And O solved my problem for the POST, PUT and Delete methods.

ISSUE But for the get methods or more correctly when I am getting an acknowledgement(ACKN) packet it makes them split, getting them multiple time longer. This cause more, energy consumption, requires more time for a packet to deliver etc.

Expected behavior A CoAP library should receive an ACK packet with 0 to 1024 byte payload at once, as a hole packet.

I don't know what to do. I think the problem is in the bool coapClient::loop() method. I tried to change some of those codes. But I couldn't solve it.

Thanks for any help.

ebleme commented 5 years ago

I have solved the issue. #15 already solved it. printing 1024 byte received payload on callback method to screen made my little Wemos board slow.