I've got some code I've been writing that I now want to convert over to be able to upgrade Over The Air.
The code has the BLE component set up as a Client and Server profile. The Client profile is configured with a Current Time Service, to enable syncing of the time in my code whenever it is accessed via a central device. In the Server profile, I've got various custom services along with all the normal ones (Device Information, Generic Attribute, Generic Access, etc).
The Server profile is also set up to stuff some data into the Scan Response Packet, to make it easier to get data across to the Client without requiring a connection. Connection is reserved for firmware updates (if I can get this to work!)
The code, as a non-OTA arrangement, compiles and works fine. Until I attempt to convert it over to an OTA Fixed Stack Bootloadable version. I've done this before, just not with the CTS functionality included, and its always worked. I've followed all the steps outlined in the OTA Guide (AN97060), but I'm still not getting the Bootloadable code to compile. Its throwing up a bunch of errors associated with the CTS functionality, even though I've made sure I've included the appropriate header files, etc.
The particular things its getting errors on are:
I can see that these are all defined in the Bootloader source code (in BLE_eventHandler.h & BLE_cts.c and BLE_cts.h), but for whatever reason, my Bootloadable code isn't seeing them.
Any ideas what I'm doing wrong??
Solved! Go to Solution.
So, I've been doing a bit more digging into this. Decided in order to progress the OTA aspect of my design, I'd just strip out all the CTS related code until I can understand why this part isn't compiling when I convert to the OTA version.
So, now I just have a Custom Service with two characteristics (one to prompt going into OTA Bootloader mode and another to indicate that its currently in Bootloader mode). I'm also sending data out via the Scan Response Packet.
In order to get pairing authentication, I need to make a call to: CyBle_GapAuthReq(cyBle_connHandle.bdHandle, &cyBle_authInfo);
And in order to update my scan response packet data, I need to make a call to: CyBle_GapUpdateAdvData(&cyBle_discoveryData, &cyBle_scanRspData);
Both of these are defined in BLE_Stack_Gap.h, which I have included in the ota_mandatory.h file, and have then included this ota_mandatory file in my source code that makes the calls to these two functions. But when I try to compile, the compiler flags these two function calls as errors:
Until I get past this, our App developers can't test their App code to ensure they can trigger an OTA update and then transfer the firmware, so things have come to a grinding halt and I'm starting to get the heat applied.
Is there something obvious I am missing? Can anyone see what I might be doing wrong?
Thanks and regards,
Can you please attach the stripped versions of your Bootloader and Bootloadable projects for which you are getting errors?
Probably easiest if I just send you the complete Workspace - do you have a private email address I can send it to?