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

Mesh, Server model receives wrong data

Hi,

I'm developing a server model and a client model(Both example are modified in accordance with the example of light_switch). In the example of client, I use the API "simple_on_off_client_set" to send a command with 16 bytes to server. The server is able to receive the 16 bytes data. However, the data received from client is wrong occasionally.

Client model:
It sends a command with 16 bytes(03006E68732E686363092E74772F0000)

Server model:
Condition 1, It receives different contents which length is 16 bytes as below 1.03006E68732E686363092E74772F0000(Correct)
2.00000000732E686363092E74772F0000(Incorrect, occasionally)

Condition 2, In case of the parameter of BEARER_SCAN_WINDOW_DEFAULT_MS is set to less than BEARER_SCAN_INT_DEFAULT_MS, it will receive a wrong message frequently .

1.03006E68732E686363092E74772F0000(Correct)
2.00000000732E686363092E74772F0000(Incorrect, occasionally)
3.B50EEB9125A84FCFCDA0ECA68A6EB700(Incorrect, occasionally)
4.54B4B7EB732E686363092E74772F0000(Incorrect, occasionally)

I got some questions about both conditions.
In the condition 1
-a.How does incorrect data occurred?
-b.Why does incorrect data can get the same length as correct one?
-c.Except the first four bytes, the others are identical. Why?
In the condition 2
-a.In case that the BEARER_SCAN_WINDOW_DEFAULT_MS is set to less than BEARER_SCAN_INT_DEFAULT_MS, why does the server is able to receive the same length?

Parents
  • Hi Kuo,

    Scan windows smaller than scan interval shouldn't cause any problem. It's just mean that it will not scan 100% of the time but still if a packet is inside the scan window then it should be fine. Packet outside of scan window will be rejected.

    Regarding the issue with wrong data. How often do you see the issue ? Could you provide us a simplified example that can reproduce the issue ? Have you checked the incoming data at access layer (check mesh_msg_handle() inside access.c) ?

Reply
  • Hi Kuo,

    Scan windows smaller than scan interval shouldn't cause any problem. It's just mean that it will not scan 100% of the time but still if a packet is inside the scan window then it should be fine. Packet outside of scan window will be rejected.

    Regarding the issue with wrong data. How often do you see the issue ? Could you provide us a simplified example that can reproduce the issue ? Have you checked the incoming data at access layer (check mesh_msg_handle() inside access.c) ?

Children
No Data
Related