Inconsistent behavior BG95 + COAP

Hello,

I’m using CoAP with BG95-M3. I’ve already been able to successfully send messages to my server with this module, but when I started deploying the code to more devices with BG95-M3, some of them were not able to communicate with the server.

The main problem is that, at the server side, I receive only a few characters of the CoAP messages of those BG95’s that were not able to communicate successfully. Below there is an example:

//Logs from BG95 that doesn't work properly

>>>>--------------------send---------------------->>>>>
17773:AT+QCOAPHEADER=0,19583,1
17781:OK
17782:AT+QCOAPOPTION=0,0,0,11,"xx/test/xxxxxx"
17794:OK
17796:AT+QCOAPSEND=0,0,2,1,376
17803:> {test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test}
17888:OK
+QCOAPACK: 0,0,19583,0
18191:+QCOAPRECV: 0,19583,2.05,3,7F4C11,0,11
serverACK
18199:AT+QCOAPOPTION=0,1,0
18206:ERROR
>>>>>>>>>>>>>>>>>>>>error_send<<<<<<<<<<<<<<<<<<<<<

//Message received at the server

2024-06-26T18:30:42.975103602Z --------------new msg-----------------
2024-06-26T18:30:42.975181830Z msgId: 19583
2024-06-26T18:30:42.975189567Z ip: xx.xxx.xxx.xxx
2024-06-26T18:30:42.975193415Z url: /xx/test/xxxxxx
2024-06-26T18:30:42.975197122Z method: POST
2024-06-26T18:30:42.975200997Z headers: {}
2024-06-26T18:30:42.975204663Z payload: {test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test
`

When I checked the AT responses from the BG95 that doesn’t work, I noticed that +QCOAPACK response differs a bit. While the ones that works gives me the response +QCOAPACK: 0,2,19583,0, indicating that it is an ACK message from the server, the modules that doesn’t work answers with +QCOAPACK: 0,0,19583,0.

Another thing that I noticed is that the modules that work, the AT+QCOAPOPTION=0,1,0 command, after sending the message, returns OK, while the modules that doesn’t send the message, returns ERROR.

All BG95’s that I tested returned the following to the ATI command:

13364:ATI

13371:Quectel

BG95-M3

Revision: BG95M3LAR02A03
`

Why I have this inconsistent behavior using the same set of AT commands to send a CoAP message with multiple BG95’s?