This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Openthread COAP Client Server device reconnection failure

Hello,

I am having hard time using openthread NCS examples. Recently I was handed over a project based on NCS COAP client server example to resolve a issue but I am not able solve the issue.

Issue: We have 2 FTD device one running COAP client example which is basically reading data from sensor and sending values to COAP server. The sensor update is basically automated using zephyr kwork with delay so we don't have to press button instead it will submit kwork at fixed intervals. Now COAP server is just receiving data and printing data on terminal. 

That's it. Nothing new has been done if I compare with Nordic demo examples. At the start everything works fine. Both server and client are able to communicate with eachother but after say nealry 30-35 hours my COAP client device gets disconnected and not able to reconnect to my COAP server. And if I restart my COAP client device it gets connected. So what's really the issue here ? When I ask the same question on Google Open Thread group they advised me this could be possible issue with radio drivers. So I would like to know what's really the issue here ? And how to resolve this issue ?

When we started developing at my company, we decided to select openthread as mesh communication protocols because of it's benefits over other protocols and Nordic SOC because of it's production ready examples. But it's seems both selection are letting me down.

Also I would like to ask in COAP examples I have seen this lights, provisioning on which we are COAP client is sending turn on off commands. So in this examples does this light act as topic or what ? Also suppose if I have 2 COAP Clients interfaced with different sensors, now if I have to send data to server should I use 2 different topics (something like light1, light2 or sensor 1 and sensor2) instead of sending data on the same light services ? 

Parents
No Data
Reply
  • Hi McGregor,

    Issue1:

    30-35 hours my COAP client device gets disconnected and not able to reconnect to my COAP server

     Currently, I have a setup running around 48 hours now, and there is no issue so I do not know your problem. I can share my codes with you so you can check if there is anything different or repeat the experiment.

    This coap_client_repeat example is modified from the original coap_client example, it will multicast every 1 second to send out server led toggle message. I use RTT viewer to log the experiment logging message, you can find it from the attachments. It split into two parts due to I closed the RTT viewer by mistake, but the firmware keeps running.

    8623.coap_clinet_repeat.log

    1602.coap_clinet_repeat2.log

    4745.coap_client_repeat.zip

    Issue2: 

    McGregor said:
    multiple resources on COAP servers

     I try to assembly all the information related together, but I feel lost since they are so many. Just correct me If I have a miss understanding. Please try to keep one ticket focusing on only one issue, list and describe your problem use as few words as possible.

    Here is my understanding:

    1. Client1 runs coap_client, it has Sensor1, Sensor1 control resource Led1 on Server1 to turn on and off.

    2. Client2 runs coap_client, it has Sensor2, Sensor2, control resource Led2 on Server1 to turn on and off.

    3. Server1 runs coap_server, it has Led1 and Led2 as resources. 

    but your codes above show one coap_client contains two sensors and there are no other coap_client. The adding codes on coap_client_utils.c also have logic problem. Anyway, the codes shows you have an understanding on how to use coap URI now, so the next step on this issue for you is to correct my understanding of you application, and tell me what you want me to guide?

    Best regards,

    Charlie

Children
No Data
Related