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.
So for me everything seems to be alright, up to the fact that on the server side I receive the following:
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:
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.