Is there a way perform a BLE OTA update from another application (perhaps using an API / DLL / CLI)?

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

cross mob
Anonymous
Not applicable

I am writing a test application to test the functionality of a device.

The test application will be capable of sending a BLE command to drop to bootloader mode.

I would like to use the same test application to initiate a BLE OTA update of the application code on the Cypress Psoc 4 BLE device. (CYBLE-212019-00)

Is there any way to call the OTA update functionality externally from another application?

Perhaps the functionality of the Bootloader host tool, or Cysmart could be called using command line interface / APIs etc?

I have searched online but can't seem to find anything appropriate.

Thanks in advance.

Kinds Regards

John Symonds

0 Likes
1 Solution

Hi John,

   The communication channel between the Bootloader Host and the target device could  be UART/I2C /SPI / Bluetooth Low Energy (BLE) or Any custom protocol  but the communication flow, packet structure  for a new image upgrade will be same as described at the page #32 onward.  You have to provide the communication channel in your app.

We do not share CySmart Desktop App ( Build in C# API) but we share CySmart Android and iOS app which can be found at below link and has OTA functionality implemented , might be helpful for understanding the concept in details.

             http://www.cypress.com/documentation/software-and-drivers/cysmart-mobile-app

-Gyan

View solution in original post

0 Likes
5 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

CySmart uses a CySmart BLE dongle to emulate a GAP central device. In addition to the easy to use GUI, it also provides C# APIs to communicate with the dongle. To use the CySmart APIs, please add reference to the CySmart DLLs in your test application project. The DLL can be located in the CySmart installation directory at this location: <Installation Directory>\Cypress\CySmart\<CySmart version>\bin. For more details, please refer to documentation provided at: <Installation Directory>\Cypress\CySmart\<CySmart version>\documentation.

To get started with CySmart C# APIs, please refer to sample project provided in response #4 here

0 Likes
Anonymous
Not applicable

Thanks for your response.

I had previously looked at the suggested API document online - however it

does not mention bootloaders, or OTA updates so therefore I suspect the API

does not have these features implemented. Is there a way for someone to

verify what I am saying is correct?

Kind Regards

John Symonds

0 Likes

Hello John,

     You need to use the Bootloader Host Core APIs which are located at the PSoC Creator installation folder- C:\Program Files (x86)\Cypress\PSoC Creator\4.2\PSoC Creator\cybootloaderutils  for adding the OTA Bootloader  functionality in your application. The protocols for implementing the Bootloader Host can be found from the below link -

    http://www.cypress.com/file/137036/download    (Page#32 and onwards)

You can also find the CySmart Bootloader DLLs from the CySmart installation location - C:\Program Files (x86)\Cypress\CySmart\1.2\bin  but we recommend to create your own DLLs for your application.

-Gyan

0 Likes
Anonymous
Not applicable

Hi Gyan,

Page 32 onwards outlines the bootloader protocol using a phycial I2C bus.

What I am looking for is the method involved when using *Bluetooth Low

Energy, Over the Air OTA* to do the update, which is a different thing is

it not?. Sorry, am I missing something?

Kind Regards

John Symonds

On Mon, Sep 3, 2018 at 4:11 PM Gyan Chand <community-manager@cypress.com>

0 Likes

Hi John,

   The communication channel between the Bootloader Host and the target device could  be UART/I2C /SPI / Bluetooth Low Energy (BLE) or Any custom protocol  but the communication flow, packet structure  for a new image upgrade will be same as described at the page #32 onward.  You have to provide the communication channel in your app.

We do not share CySmart Desktop App ( Build in C# API) but we share CySmart Android and iOS app which can be found at below link and has OTA functionality implemented , might be helpful for understanding the concept in details.

             http://www.cypress.com/documentation/software-and-drivers/cysmart-mobile-app

-Gyan

0 Likes