OpenThread COAP Client to a public server over Internet

Hello,

I am trying to make a Thread COAP Client on nRF52840 DK work with coap.me public server. I have created a Border Router with a Raspberry Pi and a nRF52 dongle and I am sure that it works as I can ping and run COAP CLI commands successfully with the OpenThread CLI sample. I can COAP GET and PUT to coap.me.

The coap.me IPv6 address was converted by me with the well known 64:ff9b::/96 prefix. The path was added to the border router as I can see with ot netdata show. 

The problem is with the COAP Client sample provided. I modified the destination IPv6 address to be the same I use with the CLI sample and the URI path to "coap://coap.me:5683/hello". I have also tried just "hello". No luck so far. 

As I said the CLI sample works fine: I get a response which is "world". Here the CLI commands I use after having joined the Thread network:

ot coap start

ot coap get 64:ff9b:0:0:0:0:8666:da12 hello 

NOTE: in my COAP client program the Thread network is joined automatically as I have added the following options:

CONFIG_OPENTHREAD_JOINER=y
CONFIG_OPENTHREAD_JOINER_AUTOSTART=y
CONFIG_OPENTHREAD_JOINER_PSKD="J01NME"

Indeed I can ping the Border router IPV6 address from my board running the modified COAP Client and vice-versa so they see each other. 

Can you please help to understand why my program directly derived from your COAP client sample does not work while CLI works fine?

Thank you.

Marco

Parents Reply Children
Related