Increase CoAP receive package size beyond 579 bytes on SIM7080G modem

39 Views Asked by At

Problem:

The SIM7080G modem is only able to receive a CoAP packet of maximum 579 bytes from a CoAP server (579 bytes total packet size, 566 bytes payload), even though the server sends a larger payload (800 bytes).

Example of AT command sequence:

AT+CCOAPINIT
AT+CCOAPURL="coap://coap.mydomain.com:5683"
AT+CCOAPPARA="CODE",1,uri-path,0,"myuri",token,0,"TCGHEHOSTXQAFGY"
AT+CCOAPACTION

Response: AT+CCOAPACTION
+CCOAPACTION: 0,0
OK
+CCOAPRECV: 0,579,566

Where 579 and 566 are the packet and payload sizes, respectively, in bytes.

Expected response:

+CCOAPRECV: 0,813,800

The modem should be able to receive the entire payload (800 bytes) from the server, and support packet sizes up to a maximum of 1024 bytes as according to RFC7252.

Investigated documentation:

SIM7070_SIM7080_SIM7090 Series_AT Command Manual v1.07
SIM7070_SIM7080_SIM7090 Series_CoAP(S)_Application Note v1.03

The only thing i can find is this on page 17 of the AT command manual:

The Command line buffer can accept a maximum of 559 characters (counted from the first command without "AT" or "at" prefix) or 39 AT commands. If the characters entered exceeded this number then none of the Command will executed and TA will return "ERROR".

However, this does not correspond with the numbers (579, 566) I'm seeing, although close.

Question:

How can I make the SIM7080G Modem receive larger CoAP packets? Is there a receive buffer i need to adjust to allow for larger packets?

1

There are 1 best solutions below

1
chrysn On

If the modem turns out to be unusable with larger packets, but does support sending custom CoAP options (if it does not support that, I recommend regarding it as broken and sending requests through UDP instead), you can address the issue at CoAP level by using block-wise requests and sending a Block2 request option described in RFC7959 indicating a request for only 512 bytes of payload.