cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox Bluetooth SDK

New Contributor

Re: Motion detection using CYBT213043 mesh board

Hello,

I am using CYBT 213043-mesh board and ModusToolbox software for my application.

   1) I want to use OTA in my application but while implementing I am facing some issues.

       Code is as follows where I am getting errors:

wiced_bt_mesh_core_config_model_t   mesh_element1_models[] =

{

    WICED_BT_MESH_DEVICE,

    WICED_BT_MESH_MODEL_FW_DISTRIBUTION_SERVER,

    WICED_BT_MESH_MODEL_FW_UPDATE_SERVER,

};

### 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,

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

***** I did the some changes in makefile like the macro OTA_FW_UPGRADE is enabled (OTA_FW_UPGRADE?=1 ) but still the errors are same.  *****

2) When I am trying to build the code without the OTA part. It is not showing any errors in console window and program downloaded properly.

But the device is not Advertising and get the following longs:

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

setup nvram ids: net_key_max_num:4 app_key_max_num:8 nvm_idx_seq:3fcd 3fd2-3fff cfg_data_len:1389                                                                                                

node_data:3fe1 net_key_begin:3fdb app_key_begin:3fd3                                                                                                                                                   

Mesh Start: 2.8.0.10492                                                                                                                                                                           

## mesh_application_init free_bytes:13072 ##

UUID:64 30 f2 74 79 b4 49 2a a0 34 c6 f9 cc 16 9b 95                            

mesh_application_init: wiced_bt_mesh_core_init failed. result=1fad

Please help me with this.

Thanks,

Sneha G.

0 Likes
Reply
1 Solution
Moderator
Moderator

Hi,

I have checked the code. I saw in some places, the structure initialization is wrongly done. For example, models_num is initialized two times in wiced_bt_mesh_core_config_element_t mesh_elements[]. This could be an the reason you got the mesh core init fail.

But, first of all, may I ask you what is your exact requirement when you say "I want to use OTA"?

There is a GATT based OTA service available for all mesh application. You will be able to see its initialization in mesh_application.c under "#if OTA_FW_UPGRADE" macro  (ie. wiced_ota_fw_upgrade_init()).

The BT mesh Firmware Upgrade (Firmware update DFU) feature is supposed to be included in the upcoming mesh spec version 1.1.

Thanks,

-Dheeraj

View solution in original post

0 Likes
Reply
5 Replies
Moderator
Moderator

Hi,

Could you please share your edited code?

Let me try to go through it and reproduce the issue at my side.

"mesh_application_init: wiced_bt_mesh_core_init failed. result=1fad" -> Mesh core inti failure is not a good sign. Something is extremely wrong somewhere.

Thanks,

-Dheeraj

0 Likes
Reply
New Contributor

Hello,

Thank you so much for your reply.

I am sending you the edited code file. Please check the file and help me to understand the issues.

I look forward to hearing from you soon.

0 Likes
Reply
Moderator
Moderator

Hi,

I have checked the code. I saw in some places, the structure initialization is wrongly done. For example, models_num is initialized two times in wiced_bt_mesh_core_config_element_t mesh_elements[]. This could be an the reason you got the mesh core init fail.

But, first of all, may I ask you what is your exact requirement when you say "I want to use OTA"?

There is a GATT based OTA service available for all mesh application. You will be able to see its initialization in mesh_application.c under "#if OTA_FW_UPGRADE" macro  (ie. wiced_ota_fw_upgrade_init()).

The BT mesh Firmware Upgrade (Firmware update DFU) feature is supposed to be included in the upcoming mesh spec version 1.1.

Thanks,

-Dheeraj

View solution in original post

0 Likes
Reply
New Contributor

Hi DheerajP_41

Thank yo so much for the reply..

I have some doubts sir..

1) I just want to know how to implement GATT base OTA with CYBT 213043-MESH kit and ModusToolbox v2.2.

2) In future if I want use OTA in cyw20819 or CYBT213043-MESH kit(only after releasing of mesh v1.1), Is any memory issues occurred? Because cyw20719 have memory in MB and cyw20819 have memory in KB only..

3) Till the release of mesh 1.1, If I want to developed custom vendor model for DFU. How can I can implement that?

4) As like cyw20819 board we can't implement DFU for mesh OTA in cyw20719 also..is it so?

0 Likes
Reply
Moderator
Moderator

Hi,

1. As I mentioned earlier, GATT based OTA is already implemented in mesh. Please have a look at mesh_application.c under "#if OTA_FW_UPGRADE" macro  (ie. wiced_ota_fw_upgrade_init()). Please have a look at mesh_app_gatt.c for GATT definitions.

2. Please select the chip based on the memory requirement of your product. OTA or DFU alone will not consume a lot memory.

3. Please refer mesh_vendor_specific_app for a reference app to make the vendor model. You can use it to define vendor commands and logic to implement a custom/vendor mesh model.

GitHub - cypresssemiconductorco/mtb-example-btsdk-mesh-snip-vendor-specific: Mesh snip app

4. Both 20819 and 20719 support mesh and all features described in the mesh specifications. Our SDK will support DFU after the mesh spec_1.1 release. So both will support DFU feature as well.

Thanks,

-Dheeraj

0 Likes
Reply