How to test mesh_location_server/client sample?

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 with CYBT-213043-MESH kit about various mesh models.

I found mesh_location_server/client samples in Github examples, and seems to be successful to build/load to my board.

But I don't know how to test it.

I have succeeded to provision with MeshClient, but this application does not have functions to get/set 'Generic Location Server' model.

And I also found ClientControlMesh.exe in libraries\bt_sdk-1.1\components\BT-SDK\common\apps\snip\mesh\ClientControl, but it seems not to work.

Here is my testing procedure. Please let me know how to test this correctly.

1. Build mesh_location_server application from ModusToolbox, and load it to my board.

2. Open ClientControlMesh.exe and select 'Models' tab.

3. Set port to WICED HCI UART port (COM10), and baudrate to 921600. (Actually I tested both with 115200 & 921600, but both not work.)

4. Select model combobox to Location, and now I can access Local & Global attributes for Location Server Model, but can't get or set values from/to my board.

How can I test this feature properly?

TIA

0 Likes
1 Solution

Hi Hyun-ho Choe,

Could you please try below steps:

Steps:

  1. Download mesh_provision_client  and mesh_location_server on two devices. (make sure you enable location_client model for mesh_provision_client by selecting 'change application settings')
  2. Open ClientControl - Light Control tab and open COM port of the mesh_provision_client device. And then, provision location_server device.
  3. Note down the address allocated to mesh_location_server device (Eg: 0002).
  4. Goto ClientControl directory (.\components\BT-SDK\common\apps\snip\mesh\ClientControl\Release) and open Network.JSON. And check the appKeys generated.
  5. Select model tab on MeshClientControl and use appropriate destination address and app_key_index. (For GET messages you have to use Generic appKey index and for SET messages you have to use Setup appKey index.)
  6. Select location from the drop down menu and then use location commands (GET/SET) to change it’s parameters.

NOTE: If use publication info check box is clicked, if the device publication address is set, the destination is set to publication address and appkey is set to same.

Thanks,

-Dheeraj

View solution in original post

8 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi firebird_4218006,

Could you please try the following steps.

Steps:

  1. Download mesh_provision_client on the third device.
  2. Open ClientControl - Light Control tab and open COM port of the mesh_provision_client device and, then, provision location_server and mesh_location_client.
  3. Select model tab on ClientControl and check 'use publication info' box.
  4. Select location from the drop down menu and then use location commands (GET/SET) to change it’s parameters.

Please use the help guide to use MeshClient or MeshClientControl helper applications: https://www.cypress.com/file/462491/download

Thanks,

-Dheeraj

0 Likes

Hi Dheeraj,

I have tried as your recommended steps.

But, in step 2, I cannot create/open my network successfully. It was created, but when I opened it, I could not see any 'done' message in log. So, I cound not execute "Scan Unprovisioned", or any further actions.

When I tried  "Mesh Client" which uses Windows Bluetooth, I can scan & provision devices.

The following is the WICED Periphral port .logs from mesh_provisioning_client. Any clues on this?

setup nvram ids: net_key_max_num:4 app_key_max_num:8 nvm_idx_seq:3fce 3fcf-3fff

Mesh Start

## mesh_application_init free_bytes:13112 ##

scan callback: start:1 active:0 loacal_addr:1 pb_gatt:0

mesh_application_init: provisioned GATT DB status:0

ds1:0x00501400, len:0x0003cc00

ds2:0x0053e000, len:0x00002000

Active DS:501400 vs1:500400 vs2:501400

***** Free mem after app_init:8544

pool size/cur/max/total 64/4/14/42 140/0/0/20 376/0/0/12 1024/0/0/3

mesh_app_proc_rx_cmd opcode:16e0

addr:1 net_key_idx:0 iv_idx:0 key_refresh:0 iv_upd:0 model_access:0

mesh_publication_callback: idx:0 company_id:ffff model_id:4 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:5 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1005 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1102 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1205 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1001 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1003 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1302 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1305 period:0000

mesh_publication_callback: idx:0 company_id:ffff model_id:1309 period:0000

mesh_publication_callback: idx:0 company_id:131 model_id:1 period:0000

mesh_state_changed_cb: authenticated:1 provisioned:0 proxy_on:0 pb_adv:0

mesh_application_init: unprovisioned GATT DB status:0

mesh_app_proc_rx_cmd opcode:1683

company_id:ffff opcode:2

pool size/cur/max/total 64/5/22/42 140/1/3/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/1/3/20 376/0/0/12 1024/0/0/3

mesh_app_proc_rx_cmd opcode:16e0

addr:1 net_key_idx:0 iv_idx:0 key_refresh:0 iv_upd:0 model_access:0

mesh_state_changed_cb: authenticated:0 provisioned:0 proxy_on:0 pb_adv:0

mesh_application_init: unprovisioned GATT DB status:0

mesh_app_proc_rx_cmd opcode:1683

company_id:ffff opcode:2

pool size/cur/max/total 64/5/22/42 140/2/4/20 376/0/0/12 1024/0/0/3

mesh_app_proc_rx_cmd opcode:16e0

addr:1 net_key_idx:0 iv_idx:0 key_refresh:0 iv_upd:0 model_access:0

mesh_state_changed_cb: authenticated:0 provisioned:0 proxy_on:0 pb_adv:0

mesh_application_init: unprovisioned GATT DB status:0

mesh_app_proc_rx_cmd opcode:1683

company_id:ffff opcode:2

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

pool size/cur/max/total 64/5/22/42 140/3/5/20 376/0/0/12 1024/0/0/3

0 Likes

Hi Hyun-ho Choe,

This is a known issue and our development team has already fixed the issue. We will update the source code on community and Github soon.

Thanks,

-Dheeraj

0 Likes

Thank you for the fast feedback.

I hope it will be not too long. And I have several modifications to customize default Windows/Android client tools.

So, please check that all samples can successfully rebuild in Visual Studio/Android Studio environment, too.

TIA and best regards.

0 Likes

With the new BT SDK 1.3, now I can provision two devices, one as location server, and the other as location client.

But, still I cannot get/set location values via the third device: provision client.

I checked "use publication info' checkbox, but still no result.

Peripheral UART says just followings:

mesh_app_proc_rx_cmd opcode:1627

bad hdr

mesh_app_proc_rx_cmd opcode:1626

bad hdr

Any advice?

0 Likes

Hi Hyun-ho Choe,

Could you please try below steps:

Steps:

  1. Download mesh_provision_client  and mesh_location_server on two devices. (make sure you enable location_client model for mesh_provision_client by selecting 'change application settings')
  2. Open ClientControl - Light Control tab and open COM port of the mesh_provision_client device. And then, provision location_server device.
  3. Note down the address allocated to mesh_location_server device (Eg: 0002).
  4. Goto ClientControl directory (.\components\BT-SDK\common\apps\snip\mesh\ClientControl\Release) and open Network.JSON. And check the appKeys generated.
  5. Select model tab on MeshClientControl and use appropriate destination address and app_key_index. (For GET messages you have to use Generic appKey index and for SET messages you have to use Setup appKey index.)
  6. Select location from the drop down menu and then use location commands (GET/SET) to change it’s parameters.

NOTE: If use publication info check box is clicked, if the device publication address is set, the destination is set to publication address and appkey is set to same.

Thanks,

-Dheeraj

Thank you, Dheeraj. It works.

0 Likes

Thanks Hyun-ho Choe, I am glad to hear that.

0 Likes