SARA-N211 CoAP connection error

0 votes

Hi,

I have problem when trying to use CoAP feature with SARA-N211. 

My problem is that, after I have set correct settings using AT+UCOAP -command I still get ERROR message when trying to use AT+UCOAPC for POST or to GET messages. 

My connection to the network should be OK since I have successfully sent UDP datagrams using NSOST command to my server.

Below is the current configuration I have been using (the IP-address is used by 'coap.me')

 

at+ucoap?

+UCOAP: "DST IP ADDRESS","134.102.218.18"

+UCOAP: "PORT",5683

+UCOAP: "URI STR","/test"

+UCOAP: "OPT MASK",4

+UCOAP: "PROFILE NUM",0

+UCOAP: "STATUS FLAG",0

OK

 

I have been using https://forum.u-blox.com/index.php/17168/sara-n2-at-ucoap-uri-not-stored as an example and the only difference is that "STATUS FLAG" is 0 instead of 1 but I can not find information what this means. I expected that it states if the connection with the CoAP server is fine and in this case it isn't.

I also have latest firmware version on my module (06.57,A07.03), so I don't think that is the problem. Any kind of help is appreciated, thank you.

by jmarkku asked Jul 10
by jmarkku edited Jul 12
76 views
0 votes
Per AT commands manual the response you are getting should be from +UCOAP=x command and not +UCOAP? command.  Are you sure about your entry?

Status flag 0 would mean invalid profile so that would not work - think the manual refers to it as <valid_flag>
by grumpy answered Jul 16
Yes the "AT+UCOAP?" command returns response stated above. I noticed too that in the manual "AT+UCOAP=7" should return the information stated above instead of "AT+UCOAP?".

AT+UCOAP=7 command returns following


at+ucoap=7

+UCOAP: INVALID PROFILE NUMBER 0  

+UCOAP: INVALID PROFILE NUMBER 1  

+UCOAP: INVALID PROFILE NUMBER 2  

+UCOAP: INVALID PROFILE NUMBER 3

OK


So if my profile is invalid, how it can be that the link I wrote above which has same settings works but not on my module? Maybe I'm missing some configuration settings that CoAP protocol needs in order to work but I cant find anything else in the AT manual except "AT+USELCP" which I have configured to value 1.
website banner