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

Mesh messages from phone ADK get lost

Hello

we are using the latest version of the Mesh SDK (4.0), and we are facing issues with the proxy.
in some cases, we need to send, from a phone, 3 or more level_set messages to a node, in a row.
and often, one or more messages get lost.

did someone have an idea?

thank you very much

Parents
  • Hi Benjamin, 

    Could you give some more information on:

    - The set message was sent as acknowledge message or unacknowledge message ? 

    - We need to find where the message(s) was missing. Did it happen on the write command from the phone to the proxy or it's when the proxy forwards the message ? You can use a BLE sniffer to check if 3 packets actually sent from the phone. If there are, please check on the proxy node if the message is forwarded on the proxy node or not. 

Reply
  • Hi Benjamin, 

    Could you give some more information on:

    - The set message was sent as acknowledge message or unacknowledge message ? 

    - We need to find where the message(s) was missing. Did it happen on the write command from the phone to the proxy or it's when the proxy forwards the message ? You can use a BLE sniffer to check if 3 packets actually sent from the phone. If there are, please check on the proxy node if the message is forwarded on the proxy node or not. 

Children
  • Hi Hung,

    Very pleased to read you again!

    as I see in the proxy logs, the packets seems to be received by the proxy. I can see 3 RX with a length, but often, one or more are not forwarded to the designated callbacks.

    the messages are sent as acknowlegded, and the phone receive as many acknowledgment than the stack forward the messages to the callbacks.

    and when we try to repeat the operation, the losts messages are not the same than the previous test.

  • Hi Benjamin, 
    Could you try sending it as unacknowledged message and check if it's still missing. As far as I know a model should send only one acknowledged message at a time. You should wait for the acknowledgment response before sending the next. 
    Could you elaborate a little bit more on this: "and the phone receive as many acknowledgment than the stack forward the messages to the callbacks"
    When you retry the operation what was the result ? 

  • Hi Hung,

    When we retry, we get some random results that we can't rely on.

    By this sentence, I mean that when a message leave the proxy layer, everything is fine, and the phone get the acknoledgment.

    The thing I noticed is, most of the time, the 2 firsts messages are well handled by the proxy, and the third fails very often. regarding this, I noticed that the MTU size is 69 bytes.

    the messages we try to send are 25 bytes sized. So I am maybe wrong, I maybe miss something in the SDK sources, but if I the 3 messages (75bytes) can't go in the MTU, can it be a problem?

  • Hi Benjamin, 

    I don't have the indepth understanding how the buffer works on the proxy for now. That if it can handle multiple buffers or not. I had a look at the code and you are right , the rxbuffer size for a packet is MESH_GATT_PACKET_MAX_SIZE = 65. But I don't think the 3 packet is encapsulated into one GATT packet. If it's the case, the whole 3 messages must be discarded. 

    Please be aware that Mesh packet payload is only 11 bytes. Anything longer than that will be sent by segmented packets and it has some overhead. So sending packet with large amount of bytes can take a long time. You also can't send multiple different segmented packet a the same time to same destination. 

    My suggestion is to wait for the acknowledgement before sending the next one. 

Related