WICED_BT_MESH_LOCATION_GLOBAL/LOCAL_SET Mesh message not delivered to user callback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HyCh_4218006
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

Hi, teams.

I am testing Generic Location Server model in mesh, and have a problem communicating with 3rd party device.

The WICED_BT_MESH_LOCATION_GLOBAL/LOCAL_GET message  works fine, but WICED_BT_MESH_LOCATION_GLOBAL/LOCAL_SET not working with the following messages.

company_id:ffff opcode:8225          -> Message received in SDK

location server message:2              -> Delivered to User callback : OK

company_id:ffff opcode:8226          -> Message received in SDK

location server message:5              -> Delivered to User callback : OK

company_id:ffff opcode:41             -> Message received in SDK

                                               -> Not delivered to User callback : NG

company_id:ffff opcode:8228          -> Message received in SDK

                                               -> Not delivered to User callback : NG

I already tried to used AppKey #1/#2 (setup key) for, but still not working.

How can I make it working with 3rd party device, and where should I start debugging about this issue?

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi HyCh_4218006 ,

For GET messages you have to use Generic appKey index and for GET/SET messages you have to use Setup appKey index.

I assume your 3rd party device is acting as a client and sending GET/SET messages to the mesh_location_server app. And location_server respond back for GET messages, but not for SET messages. Please correct me if I am wrong.

In my opinion, you can start your debugging by checking the data received at server device is compliant the SIG spec. If the received data is not formatted well then the server cannot store it properly and process it.

Thanks,

-Dheeraj

View solution in original post

0 Likes
4 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi HyCh_4218006 ,

For GET messages you have to use Generic appKey index and for GET/SET messages you have to use Setup appKey index.

I assume your 3rd party device is acting as a client and sending GET/SET messages to the mesh_location_server app. And location_server respond back for GET messages, but not for SET messages. Please correct me if I am wrong.

In my opinion, you can start your debugging by checking the data received at server device is compliant the SIG spec. If the received data is not formatted well then the server cannot store it properly and process it.

Thanks,

-Dheeraj

0 Likes

I am quite sure that I used "Setup AppKey" for SET message, but still no difference.

How can I see the received data packet, or detailed handling of that packet in code? Is it inside library?

According to "company_id:ffff opcode:41" message, device actually received message, and correctly parsed OpCode.

I cannot proceed debugging, because the build option related to "DEBUG" or "TRACE" shows no additional informations.

0 Likes

I have checked get_msg_handler_callback() in mesh_application.c handles the messages, and print company_id & opcode.

Inside this function, it tries to find proper message handler for each elements and model, and I noticed different handler is called for GET and SET.

this message handler seems to be set during wiced_bt_mesh_model_location_server_init(), but I cannot go into further.

What exactly do in these handlers? And how can I check why this message was not properly handled?

0 Likes

Hi Hyun-ho Choe​,

Is it working with mesh_provision_client+MeshClientControl as the client device, instead of the 3rd party application? I have tested with Cypress device and it is working pretty well.

If it is working for you too, then first you may have to debug the 3rd party application using some sniffer device or debug prints.

Thanks,

-Dheeraj