5 posts / 0 new
Last post
rchoubey
Clarification on CoAP requests packet size and request receiving at endpoint

I would like to get some clarification on:
1) the maximum request packet size
2) the maximum response packet size

 

The HDLC layer to the device has a message size of 512, leaving a maximum of payload of 512 - 7 (HDLC header size).

 

However, if I attempt to send a 286 byte request to the end point I get a 4.13 response i.e. request entity too large. 158 byte requests work. So what is the actual limit for a request (presumably somewhere between 158 and 286)?

Type: 
Public
hshekhar
Clarification on CoAP requests packet size and request receiving

Allocation happens with size: 4 plus 255 data buffer

So the data buffer itself is a maximum of 255.  The 4 bytes are not transmitted.  They are part of a larger structure.

rchoubey
Clarification on CoAP requests packet size and request receiving

My client establishes an observation on /sensor, this generally works, however, my endpoint continuously receives requests for that resource even though my client does not make the requests. Once a response is received to the observe request the client does not resend the observe request (unless we force it to).

 

Th endpoint logs show the request for continuously being made, even though no client is making the request  This seems to be consistently approx. every 60 seconds

rvempati
Clarification on CoAP requests packet size and request receiving

When the last observation notification expires and becomes "stale" it may indicate a problem with the observation.  The server may have rebooted and forgotten the observation or the responses may have been lost in the network, but either way the client needs to assume that the observation needs to be repaired.  When the last update becomes stale Gateway will automatically re-issue the original observe request to attempt to get a fresh value.  The response to this re-establishment request will be distributed out to all observing proxy clients.

This can be resolved after you set Max-Age parameter on CoAP server at  about 1.5 times or more than expected time of sending msg

rchoubey
Clarification on CoAP requests packet size and request receiving

Okay after increasing the max age as suggested , things seem to working correctly now. I will continue testing to see if there are any other problems. Thanks