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

Mesh SAR time-out

Hello everyone.

My project is getting quite complex so I will try to abridge. (Mesh SDK 3.2.0)

I am trying to send wifi credentials from an android application (derived from the Android-nRF-Mesh-Library) to a mesh server node
(said node being connected to an Arduino, it will send the packet over serial for it to establish a connection)
We are currently using nRF52840 DK for both server and client nodes. I have tried using both a config message and generic message but the same problem seems to surface.

If the android device is connected directly to the server, the messages passes without any hurdle. (e.g. upon provisioning the server)
However, if I am connected to a client, the server never gets my mesh packets. (unless the packet is small enough)
Now, I don't want to force my user to connect to the server. If, let's say, the wifi password changed after provisioning happened, as they may have many server nodes, they would need to connect to every single one of them one by one and send the new wifi settings packet.

So on the server, I am getting the first segment in transport.c : trs_seg_packet_in()
but then fires NRF_MESH_EVT_SAR_FAILED with as reason : 0 (NRF_MESH_SAR_CANCEL_REASON_TIMEOUT)

----------

Now, on the client side receiving the mesh packets over proxy, I am of course receiving every segments from the android application.

Inside transport_packet_in(), nrf_mesh_rx_address_get() leads to address_nonvirtual_subscription_exists() in device_state_manager.c
What is weird is that it finds the subscription address but seems to think the subscription count is 0 (even though this very client has been sending app packets to the server subscribing to this address) and then seems to discard the packet.
[EDIT] Ok. This client node is not subscribed to this address so it will drop the packet. Nvm, it all makes sense. I would be glad if anyone could point me where is it it actually relays that packet though. [EDIT 2] Nvm, I found it comes later in network.c : network_packet_in()

I may have done something wrong... :S
Perhaps the server is just not sending confirmation upon receiving a segment?

I am welcoming any help I can get on this Slight smile

Parents
  • I found it helpful to increase this value in nrf_mesh_config_core.h :

    #define CORE_TX_QUEUE_BUFFER_SIZE_RELAY 128

    Now (up to 512), the client doesn't give me any "no memory" error anymore.
    However, with max packet data length being 97bytes (9 segments), I still hit SAR time-outs on the server,
    receiving sometimes all 9, but more often seeing only 8 segments or less.
    It is not always the same number dropping either. (ie, sometime only the 3rd one drops, sometime it's another one)

    Reducing size of message to fit in less segments works better...
    but this is not optimal as I cannot realistically know my user's wifi credentials won't be that long.

Reply
  • I found it helpful to increase this value in nrf_mesh_config_core.h :

    #define CORE_TX_QUEUE_BUFFER_SIZE_RELAY 128

    Now (up to 512), the client doesn't give me any "no memory" error anymore.
    However, with max packet data length being 97bytes (9 segments), I still hit SAR time-outs on the server,
    receiving sometimes all 9, but more often seeing only 8 segments or less.
    It is not always the same number dropping either. (ie, sometime only the 3rd one drops, sometime it's another one)

    Reducing size of message to fit in less segments works better...
    but this is not optimal as I cannot realistically know my user's wifi credentials won't be that long.

Children
No Data
Related