BC95-G: Payload not included in CoAP message sent with AT+QCOAPSEND

I like to send a simple CoAP message to a CoAP server, but the BC95-G module apparently does not transmit the payload part of the CoAP message.

To test, I set up a simple UDP server that does nothing but let the client (the BC95-G) module connect via UDP and puts out the bytes received.

Some version info

AT+CGMR
SSB,V150R100C10B200SP1
SECURITY_A,V150R100C20B300SP2
PROTOCOL_A,V150R100C20B300SP2
APPLICATION_A,V150R100C20B300SP2
SECURITY_B,V150R100C20B300SP2
RADIO,Hi2115_RF0
OK

I let the module auto-connect to the network, there is no issue with that. Everything is okay, module is connected in “roaming” mode.

AT+CEREG?
+CEREG:0,5
OK

AT+QCOAPCREATE=56830
OK

AT+QCOAPHEAD=3,0
OK

AT+QCOAPOPTION=1,11,"events"
OK

AT+QCOAPSEND=0,2,95.208.xx.yy,20001
>

After the “>” prompt, I entered 0102 followed by CTRL-Z key.
I get

OK

So for me everything seems to be alright, up to the fact that on the server side I receive the following:

40020000b66576656e7473

There is a nice page how to interpret these bytes at https://developers.wia.io/release/apis/coap-packet-structure

This shows a POST request (Code: 02) with message id 0000 being submitted to the uri-path “events” (b66576656e7473). BUT THE PAYLOAD IS MISSING

I would expect the following:

40020000b66576656e7473ff0102

with ff being the “payload marker” and 0102 being the payload.

The question is, why isn’t the payload added to the CoAP message although obviously all steps, including entering the payload after the prompt was successful.

1 Like

hi Wklenk
Owing to the firmware you used is too old, it have a little bug, and new firmware already fixed, so please upgrade it to leastest frimware to have a try.The following link is the firmware package:
https://cnquectel-my.sharepoint.com/:u:/g/personal/ae-fae_quectel_com/EXnbxG2DidhDvBzTDIWWXSMBH8Vuic_3jyeBUkhAJYIj3w?e=0TiRvD
This link is the upgrade tool, please click and download it. And the usegide already included in this package, please check it.
https://cnquectel-my.sharepoint.com/:u:/g/personal/ae-fae_quectel_com/ETEdaILOXUpPq0LbcxE59h8B4C1uQtZSuS1wm9YmZGNbVg?e=hY7NFL

Thanks, I managed to get the firmware update done, though it wasn’t straightforward.

I wrote a short blog post to help others:

Hi Wklenk
I saw that the module model on your blog is BC95B5HB, and you told me that your device is BC95GJB?
These two modules are not the same platform, firmware version can not be cross-upgraded.

QQ%E6%88%AA%E5%9B%BE20191104090514

Hi Wklenk,

You could also try constructing the raw CoAP packets in the application and send on UDP socket with AT+NSOST command

AT+NSOST=,<remote_addr> ,<remote_port>,,[,]

Receive response with AT+NSORF

AT+NSORF=,<req_length>

That’s just a picture copied and pasted from aliexpress, but you are right … it does not show a BC95-G.

The release notes of this new release A07 state that there were some enhancements in the firmware,
e.g.

COAP: Added new feature for AT+COAPSEND command to support
sending specific length data and hex string format data.

Where can I get up-to-date documentation?

Hi Wklenk
The attachment is the latest AT Commands Manual:
https://cnquectel-my.sharepoint.com/:b:/g/personal/ae-fae_quectel_com/EWcS60sQzIdEmZDm7btRK2EBR0psgFGN4bk-vuyRWXxcXA?e=aBO9ie