FOTA with iOS and Android – MTU size?

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

cross mob
JuVo_286221
Level 2
Level 2

Hello dear community!

   

We are developing Firmware Over The Air update functionality with our iOS and Android apps. We got everything working and are able to update the firmware from the Bootloader Host Tool, as well as from our iOS app (and the CySmart app on iOS). The remaining platform is Android, and it is causing a lot of headache. 

   

When starting the firmware update on Android, at first, everything seems alright. The bootloader is entered, and all commands are executed perfectly until the data is written. It seems like Android is trying to send 138 bytes of data to write a row to the memory on the chip. The write doesn't get any positive response notification, supposedly because the "Attribute MTU size (bytes)" in the BLE CSD's GAP Settings is set to 23. If you set the MTU size to 138 or bigger, the FOTA process succeeds on Android. Unfortunately, that breaks the FOTA functionality on iOS… As we've already shipped the iPhone apps, we prefer fixing the Android side. 

   

Apparently Android fails to chunk the data under the hood so that the chunks are reassembled at the link layer on the peripheral's side. This happens with both our own Android app and the Android CySmart app. 

   

The underlying code of our embedded application is "BLE OTA Bootloader and Bootloadable Example Project 1.0".

   

Questions:
What should the MTU size be? 
How should the Android size chunk the data into 20 bytes packets?
Why is the CySmart Android app not able to update the firmware either?

   

 

   

All the best,

   

Julian

0 Likes
2 Replies
Anonymous
Not applicable

Julian,

   

I would suggest that you raise a Cypress Technical Support case at http://www.cypress.com/support.

0 Likes
Anonymous
Not applicable

I've got the same problem. What was the solution here?

0 Likes