BLE DFU App

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

cross mob
PSOC6_dev
Level 4
Level 4
10 questions asked 25 sign-ins 25 replies posted

Hi,

I want to develop a tool on windows to allow the loading of firmware through BLE.

I use exlusively Cypress DFU BLE Libs and to do firmware loading I use Cysmart with ble dongle for now.

I want to develop custom app to do it.

Can you please provide documentation on how we can send .cyacd2 files using BLE ?

Do you have example app with source code for this ?

 

Thank you for your support,

Kind regards

0 Likes
1 Solution
PSOC6_dev
Level 4
Level 4
10 questions asked 25 sign-ins 25 replies posted

With the following informations i was able to develop my own fw loader app for all plaforms

https://documentation.infineon.com/html/psoc6/hzt1667483412402.html#gfv1650449954297

https://github.com/Infineon/airoc-connect-android

Problem solved!

 

View solution in original post

0 Likes
12 Replies
riccardo-monty
Level 3
Level 3
50 sign-ins 10 replies posted First like received

Hi, have you allready see this:

https://github.com/Infineon/cysmart-android 

0 Likes

Hi @riccardo-monty 

Thank you for your answer.

Yes I found this and start working on it to understand the protocol but it is better to have a clean doc I think....

I have many things i don't understand such as why Cysmart windows version send only 20 bytes of data on characteristic and why not more ?

I hope Infineon team will help on this 🙂

Regards

0 Likes
PSOC6_dev
Level 4
Level 4
10 questions asked 25 sign-ins 25 replies posted

Hello, is there someone here ? 😪

0 Likes
Shreya_S
Moderator
Moderator
Moderator
First comment on blog 100 replies posted 25 solutions authored

Hello,
Sorry for keeping you on wait. We're currently working on creating an example to help you.

We'll get back to you as soon as we get the code ready.

Thanks & Regards,
Shreya

0 Likes

Hi @Shreya_S 

Thank you for your feedback but the only things I need is the protocol documentation specially on bluetooth part. What's the bootloader caracteristic len ? what's the maximum size of data i can send each time ?

 

Thank you for your support,

Regards

0 Likes
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello @PSOC6_dev ,

When the peripheral device connects with the central device, MTU Exchange will takes place. The negotiated GATT MTU will be Min of (MTU of client device, MTU of server device). Please check the negotiated MTU value during MTU Exchange procedure and update the Length accordingly.

We have code examples on the PSoC6BLE DFU in PSoC Creator, please check. 

Also, please refer to the below links on Cysmart windows app.

https://www.infineon.com/dgdl/Infineon-CySmart_1.3_API_Reference_Guide-Software-v01_00-EN.pdf?fileId...

https://www.infineon.com/cms/en/design-support/tools/utilities/wireless-connectivity/cysmart-bluetoo...

https://community.infineon.com/t5/PSoC-4/How-long-does-Cypress-BLE-DLL-Pair-function-take/td-p/26785...

Thanks,
P Yugandhar.

0 Likes

Hi @Yugandhar 

Thank you for your feedback but it doesn't answer to my question.

What is the len of bootloader ota characteristic ?

 

Thank you for your support,

Regards

0 Likes
lock attach
Attachments are accessible only for community members.
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello @PSOC6_dev , 

For PSoC6BLE DFU, Bootloader command data length is 265bytes as shown in attached image. 

Thanks,

P Yugandhar. 

0 Likes

Hi @Yugandhar 

Thank you for your feedback.

I have an issue implementing it. The first send data commands seems to work well buth the third returns  CY_ DFU _ ERROR_LENGTH and after it returns CY_ DFU _ ERROR_CMD.

Please find below the tracelog. Could you please help me on this ? I don't unterstand why. I miss something ...

 

Wrote : 01380600040302010000B7FF17 -> enter bootloader mode
NTF IN => 010008000000000000140401DEFF17

Wrote : 014C09000100200510FCD90A0095FD17 -> Set app metadata
NTF IN => 01000000FFFF17

Send Data commands ->
Wrote : 01370001007C0408D12205100D0000004523051045230510452305104523051000000000000000000000000000000000513B06104123051000000000F13B0610F93A0610412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510E0E117
NTF IN => 01000000FFFF17


Wrote : 013700014123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051087E117
NTF IN => 01000000FFFF17


Wrote : 01370001412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051041230510412305104123051010B5054C237833B9044B13B10448AFF300800123237010BD606A000800000000806E071008B5034B1BB103490348AFF3008008BD00000000646A0008806E071070477047FFF7FCFF72B6144C144DAC4209DA21686268A368043BA2BFC858D050FAE70C34F3E70F490F4A00209142BCBF41F8040BDAC617
NTF IN => 01030000FCFF17

 

Wrote : 01370001FAE70D480D490860BFF34F8F00F0D0F900F0B2F9FFF7DBFF1BF062FE0CF0D2FD1BF038FEFEE70000F0AA091008AB0910606A000888A901080024000808ED00E0FEE7FEE700B504207146084202D0EFF3098002E0EFF3088004301AF039F8FEE708B500F06DF800F005F800F019F800F02DF808BD08B50121084618F0ADFE40F2B9220121084618F01BFD0121084618F061FE024814F00CF908BD00BF38FB061008B5074814F004F901221146104618F015FE044814F0FCF8034814F0F9F808BD40FB061084FB06103CFB061010B5114A0121114816F0DAFD104814F0E9F8104C104A0421204616F0D1FD0F4814F0E0F80E4A0621204616F0C9FD0D4814F0D8F81D8F17
NTF IN => 01050000FAFF17

0 Likes
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello @PSOC6_dev ,

CY_ DFU _ ERROR_LENGTH will occurs when the amount of data sent is greater than expected. CY_ DFU _ ERROR_CMD occurs when the command is not recognized.
Which code example you are testing? Did you check with Cysmart Dongle on cysmart windows tool?

Thanks,
P Yugandhar.

0 Likes

Hi @Yugandhar ,

I test with my own program on windows to load firmware.

My mistake is the ProgramData command. I need to send it every 512 bytes.

Concerning the ProgramData command can we send it with no data (all my data are sent throught SendData Command ?

Regards

0 Likes
PSOC6_dev
Level 4
Level 4
10 questions asked 25 sign-ins 25 replies posted

With the following informations i was able to develop my own fw loader app for all plaforms

https://documentation.infineon.com/html/psoc6/hzt1667483412402.html#gfv1650449954297

https://github.com/Infineon/airoc-connect-android

Problem solved!

 

0 Likes