Wiced platform Mesh Examples for CYBT-343026-01

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

cross mob
NaB_2049561
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

What are the best suited Mesh example codes for CYBT-343026-01 module.

I tried Compiling (make) mesh_onoff_server.c for CYBT-343026-01, I got below error. It looks like I am messing with the flash size.

13:28:03 **** Build of configuration Release for project 20706-A2_Bluetooth ****

"C:\\WICED\\WICED-Studio-6.4\\20706-A2_Bluetooth\\make.exe" snip.mesh.mesh_onoff_server-CYBT_343026_EVAL download UART=COM53

Compiling platform.c

Compiling (Lib) mesh_app_provision_server.c

Compiling (Lib) mesh_application.c

Compiling (Lib) mesh_app_hci.c

Compiling (Lib) mesh_app_gatt.c

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_provision_server.c: In function 'wiced_bt_mesh_app_provision_server_configure':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_provision_server.c:107:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]

     memcpy(&provisioning_config, p_config, sizeof(wiced_bt_mesh_provision_capabilities_data_t));

     ^~~~~~

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_provision_server.c: In function 'mesh_app_provision_get_capabilities':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_provision_server.c:186:5: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]

     memset(&capabilities, 0, sizeof(capabilities));

     ^~~~~~

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_hci.c: In function 'mesh_app_hci_init':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_hci.c:121:5: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]

     memset(&app_timer, 0, sizeof(wiced_timer_t));

     ^~~~~~

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_hci.c: In function 'mesh_application_send_hci_event':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_hci.c:483:13: warning: implicit declaration of function 'memcpy'; did you mean 'remap'? [-Wimplicit-function-declaration]

             memcpy(p_hci_event, p_data, data_len);

             ^~~~~~

             remap

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_application.c: In function 'mesh_generate_random':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_application.c:353:9: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]

         memcpy(random, &r, l);

         ^~~~~~

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_application.c: In function 'wiced_bt_mesh_core_rtc_init':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_application.c:791:5: warning: implicit declaration of function 'rtc_init'; did you mean 'gpio_init'? [-Wimplicit-function-declaration]

     rtc_init();

     ^~~~~~~~

     gpio_init

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_gatt.c: In function 'mesh_app_gatt_init':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_gatt.c:418:5: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]

     memset(&mesh_gatt_cb, 0, sizeof(mesh_gatt_cb_t));

     ^~~~~~

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_gatt.c: In function 'read_handler_':

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_gatt.c:488:33: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]

         puAttribute->attr_len = strlen((char*)wiced_bt_cfg_settings.device_name);

                                 ^~~~~~

../../libraries/mesh_app_lib/../../../common/libraries/mesh_app_lib/mesh_app_gatt.c:521:9: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]

         memcpy(p_read_data->p_val, from, to_copy);

         ^~~~~~

Compiling (Lib) wiced_bt_cfg.c

Compiling (Lib) fw_upgrade.c

Compiling (Lib) ota_fw_upgrade.c

Compiling (Lib) ota_fw_upgrade_common.c

Compiling (Lib) ecc_pp.c

../../libraries/fw_upgrade_lib/../../../common/libraries/fw_upgrade_lib/ota_fw_upgrade.c: In function 'wiced_ota_fw_upgrade_init':

../../libraries/fw_upgrade_lib/../../../common/libraries/fw_upgrade_lib/ota_fw_upgrade.c:909:61: error: 'FLASH_SIZE' undeclared (first use in this function); did you mean 'OTP_SIZE'?

     uint32_t                        fw_upgrade_flash_size = FLASH_SIZE;

                                                             ^~~~~~~~~~

                                                             OTP_SIZE

../../libraries/fw_upgrade_lib/../../../common/libraries/fw_upgrade_lib/ota_fw_upgrade.c:909:61: note: each undeclared identifier is reported only once for each function it appears in

../../libraries/fw_upgrade_lib/../../../common/libraries/fw_upgrade_lib/ota_fw_upgrade.c:76:24: error: 'FLASH_SECTOR_SIZE' undeclared (first use in this function); did you mean 'DS_SECTOR_SIZE'?

#define DS_SECTOR_SIZE FLASH_SECTOR_SIZE

                        ^

../../libraries/fw_upgrade_lib/../../../common/libraries/fw_upgrade_lib/ota_fw_upgrade.c:921:85: note: in expansion of macro 'DS_SECTOR_SIZE'

     fw_upgrade_flash_size = (FLASH_SIZE - (APPLICATION_SPECIFIC_FLASH_RESERVATION * DS_SECTOR_SIZE));

                                                                                     ^~~~~~~~~~~~~~

make.exe[1]: *** [../../build/mesh_onoff_server-CYBT_343026_EVAL-rom-ram-Wiced-release/libraries/fw_upgrade_lib/../../../common/libraries/fw_upgrade_lib/ota_fw_upgrade.o] Error 1

makefile:291: recipe for target '../../build/mesh_onoff_server-CYBT_343026_EVAL-rom-ram-Wiced-release/libraries/fw_upgrade_lib/../../../common/libraries/fw_upgrade_lib/ota_fw_upgrade.o' failed

make.exe[1]: *** Waiting for unfinished jobs....

Makefile:552: recipe for target 'snip.mesh.mesh_onoff_server-CYBT_343026_EVAL' failed

make: *** [snip.mesh.mesh_onoff_server-CYBT_343026_EVAL] Error 2

13:28:18 Build Finished (took 15s.369ms)

Any Suggestions?

Thanks,

Naveen

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

HI Naveen Kumar

Please do clean (in make target) and compile.

Could you please use the attached platform file and try again?

Decompress the folder Goto platform and then replace the folder.

Thanks,

-Dheeraj

View solution in original post

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

Hi Naveen Kumar B​,


It works fine for me. All mesh applications (snip, demo) should work with CYBT-343026-01 since it is 20706 based board.

May I know which WICED version are you using? (Please copy version.txt from C:\Users\Users\Documents\WICED-Studio-6.4).

Here, in the log, I can see few warning in and build error. Build error are in  ota_fw_upgrade.c

(error: 'FLASH_SIZE' undeclared

error: 'FLASH_SECTOR_SIZE' undeclared ).

Could you please send me this file (ota_fw_upgrade.c)?

Also please attach the application  (mesh_onoff_server) folder as well in this thread, so that I can take a look at it.

I afraid that you have modified ota_fw_upgrade.c or related file, accidentally. Please check it once.

Thanks,

-Dheeraj

lock attach
Attachments are accessible only for community members.

Hello DheerajP_41

Please find the version of Wiced SDK below

WICED-SDK Version: Wiced_006.004.000.0061

b38d42ee8368ff374b13514286120afd9e788a07

I did not touch the ota_fw_upgrade.c. If I compile or run the make for other targets, works very well.

Dheeraj, I need one help.

I am trying to connect different sensors in very larger area and thought of using BLE mesh. As I searched for docuemtnation and example codes in cypress website and IOT expert website, I found only for CYBT-213043-02 modules only. I have prior experience connecting different sensors on BLE with customised GATT characeteristics.

I have chosen the CYBT343026 modules because of their availability with distributors and the cost.

I have compiled and tested ADC, GPIO and Interrupts c !ode for CYBT343026. It would be great If I get few mesh code examples with detail documentation.

Thanks,

Naveen

0 Likes
NaB_2049561
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

DheerajP_41, MichaelF_56

Its surprising for me.

For Mesh applications inside 20706-A2-Bluetooth. I am not able to compile any mesh code for the CYBT-343026.

I am getting same ota_fw_upgrade.c. It looks like project compilation fails due to OTA upgrade.

What I have done

1. paste APP_PATCHES_AND_LIBS += FM25Q04_sflash.a inside makefile.mk

2. Create a make target snip.mesh.mesh_sensor_server-CYBT_343026_EVAL download UART=COM53

same ota_fw_upgrade.c error.

0 Likes

Hi Naveen Kumar,

snip.mesh.mesh_sensor_server-CYBT_343026_EVAL download UART=COM53 make target will try to compile mesh_sensor_server application instead of mesh_onoff_server. i think your intention is to compile mesh_onoff_server. Please change the make target string appropriately.

In your log, I cannot find a compilation happening to the mesh_onoff_server.c file. (something like Compiling mesh_onoff_server.c should get in the wiced console logs).

It is compiling good with and without APP_PATCHES_AND_LIBS += FM25Q04_sflash.a for me. I just copied your mesh_onoff_server application and compiled it (make target demo.mesh_onoff_server-CYBT_343026_EVAL download). And it is compiling well for me.

Thanks,

-Dheeraj

0 Likes
NaB_2049561
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Hi DheerajP_41​,

Actually, I compiled it for mesh_sensor_server example. I got same error.

If I compile any of Mesh examples for any targets other than CYBT_343026 hex file get generated. What might be the problem. What is your SDK version. How can I change SDK.

Normal BLE code works well for me.

Can I get your project files. If you want I can message here privately.

Thanks,

Naveen

0 Likes
lock attach
Attachments are accessible only for community members.

HI Naveen Kumar

Please do clean (in make target) and compile.

Could you please use the attached platform file and try again?

Decompress the folder Goto platform and then replace the folder.

Thanks,

-Dheeraj

NaB_2049561
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Thanks DheerajP_41​.

Its working now. I have downloaded the code in 3 modules.

I can able to detect them in MeshLighting App also.

Any suggestions on the particular examples to realize and learn Mesh?

Thanks a lot.

Regards,

Naveen

0 Likes

Great!!!

CYBT-343026 is CYW20706 based module and CYBT-213043-02 is CYW20819 based module. Both are compliant to BLE mesh specification and all the basic MeshModel code examples are there in the SDK itself.

But please note, our latest SDK ModusToolbox currently supports CYW20819 only. Please see https://www.cypress.com/products/ble-mesh.

Few snip/mesh and demo/mesh applications can be seen in the SDK. Please go through it to learn code examples.

To get more information regarding the mesh core and model please go through the mesh SIG specification.

I would suggest you to start with  Getting Started with Bluetooth Mesh guide.

Please watch How To Design With Bluetooth Mesh (Hands-On) if you prefer video lecture.

Other Links:

Helper application guide: MeshClient and ClientControlMesh App User Guide

Other supported documents: https://www.cypress.com/products/ble-mesh

Please refer to BT SIG Mesh Specification also - https://www.bluetooth.com/specifications/mesh-specifications

NaB_2049561
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Thanks DheerajP_41​.

I will try examples and post if I come across any problems.

Regards,

Naveen

0 Likes