making FOTA enabled version of audio_headset example

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

cross mob
bemale
Level 3
Level 3
100 sign-ins 50 sign-ins 25 sign-ins

Dear Cy,

As I knew, you supported FOTA functionality and provided an example of "Firmware_Upgrade_via_OTA" in ModusToolBox.

So, I've tried to enable this function on top of "Audio_headset" example as following procedure.

- changed makefile :  OTA_FW_UPGRADE?=1

                                           COMPONENTS += fw_upgrade_lib

                                           CY_BT_APP_TOOLS=BTSpy ClientControl WsOtaUpgrade
After this changes, I've got some problems when I apply some functions for OTA to current "Audio_headset" example.

- GATT events are duplicated between "hci_control_le_gatt_callback()" in "hci_control_le.c" and "app_gatts_callback()" in "ota_firmware_upgrade.c"

- It's not clear the difference between "wiced_bt_cfg_settings" and "app_cfg_settings" for me.

- need to identify NVRM_Volatile_Section_Idenrifier for OTA(OTA_FW_UPGRADE_LOCAL_KEYS_VS_ID) from HEADSET ID(HEADSET_NVRAM_ID) or not?

Additionally, I would like to know if there is a general guide or application note to enable FOTA function in other examples like "Audio_headset".

Please help me here.

Thanks,

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

 

Hi,

May I know which application are you trying to modify and which chip?

hci_control_le_gatt_callback() is the gatt callback function registered for audio headset application and app_gatts_callback() is gatt callback function registered for ota_firmware_upgrade app. When you combine these two application, you should combine this gatt callback function aslo. In one application only one gatt callback function is expected.

wiced_bt_cfg_settings_t structure is used to state the bt stack configuration. In few applications, the structure variable is named as wiced_bt_cfg_settings and in other few applications the name is app_cfg_settings. But it is the same structure, usually defined in wiced_bt_cfg.c or app_bt_cfg.c. For one application, we should only keep a single file and  stack configuration.

In both the applications, nvram IDs are used. So when combining this applications, we should ensure that these are not combined. 

 

Thanks,

-Dheeraj

 

View solution in original post

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

 

Hi,

May I know which application are you trying to modify and which chip?

hci_control_le_gatt_callback() is the gatt callback function registered for audio headset application and app_gatts_callback() is gatt callback function registered for ota_firmware_upgrade app. When you combine these two application, you should combine this gatt callback function aslo. In one application only one gatt callback function is expected.

wiced_bt_cfg_settings_t structure is used to state the bt stack configuration. In few applications, the structure variable is named as wiced_bt_cfg_settings and in other few applications the name is app_cfg_settings. But it is the same structure, usually defined in wiced_bt_cfg.c or app_bt_cfg.c. For one application, we should only keep a single file and  stack configuration.

In both the applications, nvram IDs are used. So when combining this applications, we should ensure that these are not combined. 

 

Thanks,

-Dheeraj

 

0 Likes

Hi Dheeraj,

As I mentioned, I'm trying to apply FOTA on "Audio_headset" application for "CYW920706" EVB.

I understood that both applications are not combined to one application from your comment. it's right? If then, How can we use/apply OTA functionality, which is very useful function to upload firmware for BT Iot device, for general application? FOTA is just for FOTA?

I've combined  app_gatts_callback() and app_cfg_settings to hci_control_le_gatt_callback() and wiced_bt_cfg_settings to apply OTA on top of Audio_Headset, but  continuous reset happened after the adoption. So, I queried it to Cypress. I think you have some application FOTA enabled already for test purpose or for customer support, then please give me some valuable information about that.

Thanks

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

Hi,

Firmware_Upgrade_via_OTA is an independent application which demonstrate the firmware upgrade over the air to the customer. Audio_headset is another independent application which demonstrate audio profiles, Gatt, etc. And when you want to combine it to an already existing application such as Audio Headset, we have to ensure that these applications are not conflicting each other due to redundant initializations such as gatt_init, etc. 

I would suggest you to copy the relent part of the ota_firmware_upgrade.c to Audio_Headset application and compile it. 

" continuous reset happened after the adoption"

May I know when the reset is happening exactly? It would be great if you can share the application and steps to reproduce the error. We will try collecting more information from it which will be helpful for further debugging.

 

Thanks,

-Dheeraj 

 

0 Likes