Motion detection using CYBT213043 mesh board

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

cross mob
SnGh_4568476
Level 1
Level 1
25 sign-ins 10 sign-ins 5 questions asked

Hello Cypress team,

I am using CYBT213043 Mesh controller and ModusToolbox v2.2 for my application. I want to use the different sensors which are present on board, But I am very new to this controller and software so please help me to better understand the following terms:

1) How to use the ModusToolbox v2.2 to program the CYBT213043 mesh board only?

2) Is there any sample codes available which will help me to configure the different sensor in One project?

3) Can I implement mesh and OTA using this controller and if yes then how?

Thank you in advance for the help.

Sneha G.

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

Hi,

You can get everything (Docs, supported Hardware, software, roadmap, etc.) related to Bluetooth mesh from https://www.cypress.com/products/bluetooth-low-energy-mesh ​.

First, I would suggest you to go through the Mesh AppNote to understand BLE Mesh architecture, code structure and how to make changes based on your application needs. https://www.cypress.com/file/473921/download

There is no specific approach to use Modustoolbox only for mesh. If you just need mesh applications, you can import the required mesh applications only to your workspace and use it as per your needs. Please check the quick start guide for a quick walkthrough for using  Modustoolbox. https://www.cypress.com/file/512721/download

The following app is a demo app for using PIR sensor. You can have a look at it. GitHub - cypresssemiconductorco/mtb-example-btsdk-mesh-demo-sensor-motion: Mesh Motion Sensor app  Similarly you can check all the mesh Demo examples to understand how to use various peripherals and create a complete mesh applications work on a specific platform. You will be also see some Mesh Snip applications in the Project Creator tool window in Modustoolbox, which are demonstration of each mesh models as separate applications.

Every mesh application support OTA. It is implemented in the mesh libraries. Please have a look mesh_application.c You have to make sure that the macro OTA_FW_UPGRADE is enabled (OTA_FW_UPGRADE?=1) in your application makefile. Please go through the "Appendix A" in Mesh App Note to understand more.

Some useful links:

https://www.cypress.com/products/modustoolbox-software-environment

https://www.cypress.com/products/ble-bluetooth

https://www.cypress.com/products/bluetooth-low-energy-mesh

Getting Started with Bluetooth Mesh

MeshClient and ClientControlMesh App User Guide

Thanks,

-Dheeraj

View solution in original post

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

Hi,

You can get everything (Docs, supported Hardware, software, roadmap, etc.) related to Bluetooth mesh from https://www.cypress.com/products/bluetooth-low-energy-mesh ​.

First, I would suggest you to go through the Mesh AppNote to understand BLE Mesh architecture, code structure and how to make changes based on your application needs. https://www.cypress.com/file/473921/download

There is no specific approach to use Modustoolbox only for mesh. If you just need mesh applications, you can import the required mesh applications only to your workspace and use it as per your needs. Please check the quick start guide for a quick walkthrough for using  Modustoolbox. https://www.cypress.com/file/512721/download

The following app is a demo app for using PIR sensor. You can have a look at it. GitHub - cypresssemiconductorco/mtb-example-btsdk-mesh-demo-sensor-motion: Mesh Motion Sensor app  Similarly you can check all the mesh Demo examples to understand how to use various peripherals and create a complete mesh applications work on a specific platform. You will be also see some Mesh Snip applications in the Project Creator tool window in Modustoolbox, which are demonstration of each mesh models as separate applications.

Every mesh application support OTA. It is implemented in the mesh libraries. Please have a look mesh_application.c You have to make sure that the macro OTA_FW_UPGRADE is enabled (OTA_FW_UPGRADE?=1) in your application makefile. Please go through the "Appendix A" in Mesh App Note to understand more.

Some useful links:

https://www.cypress.com/products/modustoolbox-software-environment

https://www.cypress.com/products/ble-bluetooth

https://www.cypress.com/products/bluetooth-low-energy-mesh

Getting Started with Bluetooth Mesh

MeshClient and ClientControlMesh App User Guide

Thanks,

-Dheeraj

Hello,

Thank you very much for your reply sir..

1) I am using CYBT213043-Mesh board and ModusToolbox v2.2 software. Firstly I am working with the sample codes to check how the device work and all that.

Code build and downloaded properly. Device advertise properly too but the device is not adding into the network. any reason for it?

### The below logs I am getting on serial monitor  ####

mesh_gatts_callback:GATT_CONNECTION_STATUS_EVT: connected:1 node_authenticated:0 conn_id:1 reason:0 role:1

           

Advertisement State Changed:0

                                                                                                                              

adv stopped

                                                                                                                                                 

mesh_gatts_req_cb:GATTS_REQ_TYPE_MTU mtu:9e

                                                                                                                                                                                            

mesh_app_provision_started: conn_id:1

                                                                                                                                                                                                                                

mesh_app_provision_get_capabilities: conn_id:1

                                  

mesh_app_provision_gatt_send_cb: conn_id:1

                                                                            

setup nvram ids: net_key_max_num:4 app_key_max_num:8 nvm_idx_seq:3fcc 3fd1-3fff cfg_data_len:1060

                                                                                                                                                                             

node_data:3fe0 net_key_begin:3fda app_key_begin:3fd2

                                                                                                                                                                                                                                 

Mesh Start: 2.8.0.10492

            

## mesh_application_init free_bytes:13472 ##

                                                       

UUID:7e 9c 23 13 65 3d 42 65 ad cb b8 ca eb f4 27 68

                                                                                                             

observe start active:0

                                                                                                                                   

mesh_application_init: unprovisioned GATT DB status:0

                                                                                                                                                                                       

ds1:0x00501400, len:0x0003dc00

                                                                                                                                                                                                                   

ds2:0x0053f000, len:0x00001000

      

Active DS:501400 vs1:500400 vs2:501400

                                             

***** Free mem after app_init:10352

2) As I mentioned in previous discussion that I want to implement the OTA and I follow the same steps as you mentioned but still I am facing the some problems. Please help with it.

### The below Errors I am getting in console window  ####

mesh_level_server.c:112:5: error: 'WICED_BT_MESH_MODEL_FW_DISTRIBUTION_SERVER' undeclared here (not in a function); did you mean 'WICED_BT_MESH_MODEL_LOCATION_SERVER'?

  112 |     WICED_BT_MESH_MODEL_FW_DISTRIBUTION_SERVER,

      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      |     WICED_BT_MESH_MODEL_LOCATION_SERVER

mesh_level_server.c:113:5: error: 'WICED_BT_MESH_MODEL_FW_UPDATE_SERVER' undeclared here (not in a function); did you mean 'WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER'?

  113 |     WICED_BT_MESH_MODEL_FW_UPDATE_SERVER,

      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      |     WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER

mesh_level_server.c:143:6: error: 'wiced_bt_mesh_core_config_t' {aka 'struct <anonymous>'} has no member named 'firmware_id'

  143 |     .firmware_id        = MESH_FWID,                                // Vendor-assigned firmware version identifier

      |      ^~~~~~~~~~~

mesh_level_server.c:62:33: warning: unsigned conversion from 'long long int' to 'short unsigned int' changes value from '3460453367992614913' to '1' [-Woverflow]

   62 | #define MESH_FWID               0x3006000101010001

      |                                 ^~~~~~~~~~~~~~~~~~

mesh_level_server.c:143:27: note: in expansion of macro 'MESH_FWID'

  143 |     .firmware_id        = MESH_FWID,                                // Vendor-assigned firmware version identifier

Thanks,

Sneha G.

      |                         

0 Likes

Hi,

Could you please share your code so that I can go through it to debug the issue.

Please point out what all changes you have made in it.

Thanks,

-Dheeraj

0 Likes