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

Multiple nodes acknowledgement problem

Getting acknowledgement only from single node which is 1st connected

Parents
  • Hi Anaya, 

    Please be more specific when asking question. You will get the support faster. 

    Please provide us information how you setup the nodes, if they subscribe to anything, how you send the message. What kind of message it is. 

  • Good evening Sir,

    Ok Sir. I will explain the case :

    1. I have created a mesh network where  I have configured 2 nodes say A and B.

    2. on A node I have 2 on-off servers and set publication address 0x0001 and 0x0002. The lamp operates ok on hardware.

    3. on B node I have 2 on-off servers and set publication address 0x0003 and 0x0004. The lamp operates ok on hardware.

    4. I disconnect the network and again reconnect. Then Node A occurred 1st. I got connected to network.

    5.  I redirect to a new activity where I have given Lamp1, Lamp2, Lamp3, Lamp4 with on-off buttons.

    6. While click on on/off of Lamp1 and Lamp2 then lamp1 operates at hardware and also get onMeshMessageReceived acknowledgment on which I want to show on/off status.

       But when I operate Lamp3 or Lamp4, I didn't get onMeshMessageReceived acknowledgment.

    7. But if I connected to node B, then it works exact opposite of point 5.

       That is I got acknowledgment of Lamp4 and Lamp5 but not of Lamp1 and Lamp2 which are configured on node A.

    8. My requirement is need to receive every lamp acknowledgment when connected to any node in the network.

    Kindly give the solution.

  • Okey, then you need to check what's the modification you have made. 
    Could send the project so that we can test here ? Please make sure that we can compile on a DK and can run it here. We prefer minimal code that can reproduce the issue. 

  • Okay.

    I am sending our project with modifications. Please find the attached zip file.

    Note: Its name is OnOff Controller with 5 elements. Please configure Generic On Off Server model in 3rd

    or 4th element.

    We have used nRF52 development kit.

    LED1 and LED2 are shows element3 and 4 status respectively

    LED4 is for indication purpose only and blinks continuously

    examples_20200319_113400.zip

  • Please check at your side and suggest the possible solution.

  • Hi Anaya, 

    I did a test here and it seems that when connecting to one of the node as proxy node and then control another node, it worked most of the time, but some times it didn't send the set/get command to the remote node. It seems that the proxy node didn't managed to forward the data to the other node. Could you confirm that what you saw on your side ? It worked most of the time, and only occasionally you can't control the other node and got  a timeout ? 

    I added another node running the stock light switch server example. And it worked just fine to control the other 2 nodes running your firmware. 

    There must be a modification or something that caused the issue. Do you have any activity on the node rather than just adding 3 server and 1 client ? Is there any background activity ? I saw that you have a timer with 500us interval, what is that for ? How long the processing for that last ? Wouldn't having a interrupt every 0.5ms quite short ? 

  • Hi Hung,

    Greetings!

    I am colleague of Mrs. Anaya and I am working on it's nRF52832 development.

    Please note below points.

    1. We also have observed timeout

    2. There is no activity apart from 3 servers and 1 client

    3. However at every 3.3 seconds or 10 seconds client requests status from it's respective server and also while requesting it finds that client is busy with previous transmission then it cancels it and sends new request on next timeout.

    Please confirm whether it will affect other models (OnOff Server) behavior?

    4. Regarding 500uSec timer

          4a. It is used for handling background activities like LED, Buzzer and flash persistence storage (status of device)

          4b. Please note that in flash persistence storage activity, every time when there is change in device status, we tried to save it into flash.

          4c. If needed we can increase it's time to couple milliseconds.

    5. Can you please help us to understand how we can debug proxy functionalities? I mean how can we find out that proxy node has missed to forward data to other nodes?

    Also please mention if there is anything we can do additional to resolve this issue.

    Waiting for your positive reply.

    Thanks to you and Nordic team for your quick, timely and great support.

    Regards,

    Dinesh

Reply
  • Hi Hung,

    Greetings!

    I am colleague of Mrs. Anaya and I am working on it's nRF52832 development.

    Please note below points.

    1. We also have observed timeout

    2. There is no activity apart from 3 servers and 1 client

    3. However at every 3.3 seconds or 10 seconds client requests status from it's respective server and also while requesting it finds that client is busy with previous transmission then it cancels it and sends new request on next timeout.

    Please confirm whether it will affect other models (OnOff Server) behavior?

    4. Regarding 500uSec timer

          4a. It is used for handling background activities like LED, Buzzer and flash persistence storage (status of device)

          4b. Please note that in flash persistence storage activity, every time when there is change in device status, we tried to save it into flash.

          4c. If needed we can increase it's time to couple milliseconds.

    5. Can you please help us to understand how we can debug proxy functionalities? I mean how can we find out that proxy node has missed to forward data to other nodes?

    Also please mention if there is anything we can do additional to resolve this issue.

    Waiting for your positive reply.

    Thanks to you and Nordic team for your quick, timely and great support.

    Regards,

    Dinesh

Children
  • I would suggest to print out log on the proxy handling (mesh_gatt.c and proxy.c) to check when you receive the command from the phone. 
    Also try to increase the latency of the timer to longer, just to check if it's was the cause. 
    You can remove some functionality until you can see that the issue disappear. I would suspect the flash activity could cause a problem if you use it too often. 

  • Hi Hung,

    Thanks for your suggestions.

    We will try our best on your suggestions and try to find our the cause.

    Thanks you.

    Regards,

    Dinesh

  • Hi Hung

    Greetings!

    As per your suggestion we tried to debug issue and we are having below observations.

    1. We have disabled flash activity and checked. In this case we are experiencing timeout issue

    2. Then we have increased 500uSec timer interval, here also we are experiencing timeout issue

    3. Then we disabled that 500 uSec timer then also bad luck

    Also as per your suggestion we enabled mesh_gatt.c and proxy.c logs and below are observation

    1. The node to which android app is connected (proxy_node) shows log for number of request made

    Sample logs

    a. Request successful

    proxy.c 640: RX

    proxy.c 571: RX GATT PDU type 0x0, len 20

    proxy.c 648: TX Complete

    b. Request NOT successful

    proxy.c 640: RX

    proxy.c 571: RX GATT PDU type 0x0, len 20

    Here "proxy.c 648: TX Complete" log is not appearing

    So we have decided go further and debug. So we have added log statement to node (end_node) of which status is requested. That node shows that status has been sent successfully.

    Request you to please guide further

    Note: attaching screenshot of log for your reference

    Regards,

    Dinesh

    proxy_nodeend_node

  • Hi Dinesh, 

    Thanks for the information. We actually reproduced the issue here even with the light switch server. So most likely it's not what you implemented caused the issue. 
    But how often do you see the issue when you get the time out ? Is it what similar to my video ? Like once out of 7-10 times ? 

  • Hi Hung,

    Greetings !

    I am colleague of Dinesh and Anaya. Thanks for your reply and sorry for delayed response.

    Please note our observations as below.

    We are seeing this issue once in a 10 times in Android application.

    Also we have taken trials with iOS application where in we have operated for approximately 200 times and still there was no single occurrence of timeout error.

    Also we have another observation that while connecting to mesh network from Android and iOS application we are seeing below message two times in Android and once in iOS.

    Message:- "ble_softdevice_support.c, 104, successfully updated connection parameter"

    Please guide us further to resolve this issue.

    Madhav,

Related