OTA Firmware Update From Custom Android Code

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

cross mob
NiHo_1308246
Level 3
Level 3
5 likes given First like received First like given

Is this possible? We are developing a wearable technology and want the user to upgrade the firmware OTA but using our app not the CYSmart phone app.

   

 

   

Best,

   

 

   

Nick

0 Likes
1 Solution
Anonymous
Not applicable

The CySmart Phone APP is just an android APP at its core; You should be able to modify your own custom app to implement/mimic the same steps/features that the cysmart app does for uploading the firmware image through the OTA process.

   

According to this page: http://www.cypress.com/documentation/software-and-drivers/cysmart-mobile-app

   

The cysmart source code is available?

View solution in original post

0 Likes
8 Replies
Anonymous
Not applicable

The CySmart Phone APP is just an android APP at its core; You should be able to modify your own custom app to implement/mimic the same steps/features that the cysmart app does for uploading the firmware image through the OTA process.

   

According to this page: http://www.cypress.com/documentation/software-and-drivers/cysmart-mobile-app

   

The cysmart source code is available?

0 Likes
Anonymous
Not applicable

I would like more information on this as well. I'm trying to do the same thing.

   

I would prefer some documentation over code examples. It looks like there's a fairly simple packet format. A flowchart and some command byte definitions would be nice. I'm building my app in Qt and don't have much experience with java, so reverse engineering the CySmart source code is not going to be fun for me.

0 Likes
Anonymous
Not applicable

@kgregory  Unfortunately, I don't work with java either 😞 Perhaps a cypress employee would like to explain the code for you?

   

Otherwise, I imagine I would be doing the same thing as you: Reading source code and trying to understand it.

0 Likes
Anonymous
Not applicable

do cypress employees respond in here or do I need to put in a ticket somewhere else?

   

This seems like a big selling point of this device. It seems like it would be in their interest to have an app note on the subject. I've seen multiple threads discussing how to update firmware from a mobile device over BLE.

0 Likes
Anonymous
Not applicable

You can open tickets to get specific help with items/issues you are having; Sometimes they will reply to questions on the forum (Generally they try not to, as it easier to have community answers 🙂

0 Likes
Anonymous
Not applicable

Oh it looks like the information I'm after (command codes, flow charts, packet formats and such) is in the bootloader datasheet. 

0 Likes
Anonymous
Not applicable

I'm trying the API that is provided (cybtldr_api) for the firmware update and it has this struct provided to fill in callback functions. What's not clear to me in particular is what does it expect to get as a return value for ReadData and WriteData (below)?  Is it success/error codes? or a number of bytes that were read?

   

/*
* This struct defines all of the items necessary for the bootloader
* host to communicate over an arbitrary communication protocol. The
* caller must provide implementations of these items to use their
* desired communication protocol.
*/
typedef struct
{
/* Function used to open the communications connection */
int (*OpenConnection)(void);
/* Function used to close the communications connection */
int (*CloseConnection)(void);
/* Function used to read data over the communications connection */
int (*ReadData)(uint8_t*, int);
/* Function used to write data over the communications connection */
int (*WriteData)(uint8_t*, int);
/* Value used to specify the maximum number of bytes that can be transfered at a time */
unsigned int MaxTransferSize;
} CyBtldr_CommunicationsData;
 

Anonymous
Not applicable

I believe the ReadData and WriteData are pointers to buffers; The buffers will then hold data read in, or hold data to write out, with the associated length variables attached to each array-structure.

0 Likes