cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

ErPi_4599236
New Contributor II

I have a large project which I am trying to add a new characteristic to an existing service. I am using the CY8C4248LQI-BL583 chip and I can't seem to get the BLE APIs to properly generate. I keep getting an error when referencing the characteristic's handle. Note that this project is configured for OTA updates so I have a bootloader and a bootloadable projects. 

Steps taken so far:

1. Go to the bootloader project, open the BLE 4.2 component, navigate to profiles, and add my new "custom glows" characteristic under the LED service. I set the read / write properties and the UUID of the characteristic. 

2. I delete the automatically generated custom descriptor and add a CCCD, as instructed by the documentation. 

3. Click OK, then clean / build the bootloader project. 

4. I clean / build the bootloadable project. 

5. I navigate to my bleCallback.c file in the bootloadable project and try to reference the newly added characteristic handle (as such: CYBLE_LEDS_GLOWS_CONTROL_CHAR_HANDLE) and it throws an error that I'm using an undeclared identifier. 

The strange thing is if I navigate to the CyBle_custom.h file in the bootloader project, I see my CYBLE_LEDS_CUSTOM_GLOWS_CHAR_HANDLE value defined. I just can't reference it in my bootloadable project. 

Also, my newly defined characteristic handle does not show up in the cyapicallbacks.h file of my bootloadable project. But, this file does contain all of the handles for my previously defined custom characteristics. 

Does anyone have any thoughts as to what I'm doing wrong here? 

I should note that I have recently migrated from a CY8C4148LQI-BL453 to the CY8C4248LQI-BL583 I'm using currently. This is my first time manipulating the BLE stack on this new MCU. 

0 Likes
1 Solution
ErPi_4599236
New Contributor II

Hi Genesh,

I am using the Fixed Stack Upgradable OTA. Can you recommend any references to help in migrating over to the Upgradable OTA? 

I ended up fixing this problem by updating the cypaicallbacks.h file (in the bootloadable) to match the CyBle_custom.h file (in the bootloader). It seems the header declarations were not carrying over to the bootloadable project. 

View solution in original post

0 Likes
3 Replies
VenkataD_41
Moderator
Moderator

Hi,

Are you using Fixed Stack Upgradable OTA project? If yes, we recommend you to go with Upgradable OTA concept which is more popular. In this Upgradable OTA model, the stack can be upgradable along with the project.

Coming to your question, can you please do a Clean and build of your Bootloader and application once? Can you please replace the CyBle folder in the bootloadable project once?

Are you getting any errors while using the CYBLE_LEDS_CUSTOM_GLOWS_CHAR_HANDLE in your application if you declare it in your Bootloadable project manually and use it?

Thanks

Ganesh

0 Likes
ErPi_4599236
New Contributor II

Hi Genesh,

I am using the Fixed Stack Upgradable OTA. Can you recommend any references to help in migrating over to the Upgradable OTA? 

I ended up fixing this problem by updating the cypaicallbacks.h file (in the bootloadable) to match the CyBle_custom.h file (in the bootloader). It seems the header declarations were not carrying over to the bootloadable project. 

View solution in original post

0 Likes
VenkataD_41
Moderator
Moderator

Hi,

You can go through the following application note for deveeloping your application with Upgradable Stack OTA.

https://www.cypress.com/documentation/application-notes/an97060-psoc-4-ble-and-proc-ble-over-air-ota...

Please find the attached project for reference (for the application note).

Thanks and regards

Ganesh

0 Likes