Transfer firmware image failure

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

cross mob
lock attach
Attachments are accessible only for community members.
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

I am trying to create a custom app0/app1 pair that are compatible with BLE over-the-air (OTA) device firmware updates (DFUs),

uses a dual core configuration for the BLE module in app1 and runs on a CYBLE-416045-02 module. I am basing my work on the

CDE216767 and have borrowed heavily from it.

I now ALMOST have it working. When I run the Update Firmware process in CySmart 1.3, I get the following

pastedImage_0.png

Clicking on Next gives:

pastedImage_1.png

I've spent a couple of days trying to find the source of the disagreement in the packet format between CySmart and my app0. I THINK that the app0 code

checks the packet format in cy_dfu.c/VeriftyPacket(), but so far I have been unable to hit a break point at any of the error points in that function.

I don't know if its significant, but my BLE component is a V2.20 and the BLE component in CE216767 is at V2.0.

I have attached a zipped version of the app0 code and the app1 cyacd2 file that CySmart is trying to upload.

Any advice or suggestions would be appreciated.

Thanks,

Ed H.

0 Likes
2 Replies
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

After I made the above post, it belatedly dawned on me that I should have examined the log created by CySmart. Well, having done that I am now even a little more perplexed. The log (see below) does not report that any packet errors were reported back from the 416045 module. On the one hand, that seems to be consistent with the fact that I could not trap the detection of any packet errors in my code. OTOH, I now have even less information as to why CySmart thinks there is a packet problem.

Anybody have any idea what's going on here?

Thanks,

Ed H.

[09:13:48:962] : 'Set Local Device Security' request sent

[09:13:48:962] :  Security Level: 0x13

[09:13:48:962] :  Encryption Key Size: 16

[09:13:48:962] :  Bonding: 0x00

[09:13:48:962] :  Pairing properties: USE_KEYPRESS_NOTIFICATION

[09:13:48:962] :  Secure connection only mode: Disable

[09:13:48:962] : 'Command Status' event received

[09:13:48:962] :  Status: BLE_STATUS_OK

[09:13:48:962] : 'Command Complete' event received

[09:13:48:962] :  Status: BLE_STATUS_OK

[09:13:48:962] : 'Establish Connection' request sent

[09:13:48:962] :  BD Address Type: PUBLIC_ADDRESS

[09:13:48:962] :  BD Address: 5A:71:E8:50:A0:00:00:00

[09:13:48:963] : 'Command Status' event received

[09:13:48:963] :  Status: BLE_STATUS_OK

[09:13:54:238] : 'Establish Connection Response' event received

[09:13:54:239] : 'Enhanced connection complete' event received

[09:13:54:239] :  Status: 0x00

[09:13:54:239] :  Role: 0x00

[09:13:54:239] :  BD Address Type: PUBLIC_ADDRESS

[09:13:54:239] :  BD Address: 5A:71:E8:50:A0:00:00:00

[09:13:54:239] :  Local resolvable address: 00:00:00:00:00:00:00:00

[09:13:54:239] :  Peer resolvable address: 00:00:00:00:00:00:00:00

[09:13:54:239] :  Connection Interval: 15.00 ms

[09:13:54:239] :  Slave Latency: 0

[09:13:54:239] :  Supervision Timeout: 2000 ms

[09:13:54:239] : 'Command Complete' event received

[09:13:54:239] :  Status: BLE_STATUS_OK

[09:13:54:239] : 'Get Local Device Security' request sent

[09:13:54:240] : 'Command Status' event received

[09:13:54:240] :  Status: BLE_STATUS_OK

[09:13:54:240] : 'Get Local Device Security Response' event received

[09:13:54:240] :  Security Level: 0x13

[09:13:54:240] :  Encryption Key Size: 16

[09:13:54:240] :  Bonding: 0x00

[09:13:54:240] :  Pairing properties: USE_KEYPRESS_NOTIFICATION

[09:13:54:240] : 'Command Complete' event received

[09:13:54:240] :  Status: BLE_STATUS_OK

[09:13:54:240] : 'Exchange GATT MTU Size' request sent

[09:13:54:240] :  MTU: 0x0200

[09:13:54:241] : 'Command Status' event received

[09:13:54:241] :  Status: BLE_STATUS_OK

[09:13:54:268] : 'Exchange GATT MTU Size Response' event received

[09:13:54:268] :  MTU: 0x0200

[09:13:54:268] : 'Command Complete' event received

[09:13:54:268] :  Status: BLE_STATUS_OK

[09:13:54:268] : 'Initiate Pairing' request sent

[09:13:54:269] : 'Command Status' event received

[09:13:54:269] :  Status: BLE_STATUS_OK

[09:13:54:283] : 'Data length changed notification' event received

[09:13:54:283] :  Connection maximum Tx octet: 251

[09:13:54:283] :  Connection maximum Tx time: 2120 µs

[09:13:54:283] :  Connection maximum Rx octet: 251

[09:13:54:283] :  Connection maximum Rx time: 2120 µs

[09:13:54:298] : 'Negotiated pairing parameters' event received

[09:13:54:298] :  State: Pairing negotiated

[09:13:54:298] :  Security Level: 0x01

[09:13:54:298] :  Encryption Key Size: 16

[09:13:54:298] :  Bonding: 0x00

[09:13:54:298] :  Pairing properties: NONE

[09:13:54:448] : 'Negotiated pairing parameters' event received

[09:13:54:448] :  State: Pairing completed

[09:13:54:448] :  Security Level: 0x01

[09:13:54:448] :  Encryption Key Size: 16

[09:13:54:448] :  Bonding: 0x00

[09:13:54:448] :  Pairing properties: NONE

[09:13:54:448] : 'Command Complete' event received

[09:13:54:448] :  Status: BLE_STATUS_OK

[09:13:54:448] : 'Misc Event Notification' received

[09:13:54:448] :  Event Code: 0x0029 (GAP_ENCRYPT_CHANGE)

[09:13:54:448] :  Event Data: Encryption ON

[09:13:54:448] :  Event Data: [01]

[09:13:54:448] : 'Discover Primary Services by UUID' request sent

[09:13:54:448] :  UUID: 00060000F8CE11E4ABF40002A5D5C51B

[09:13:54:449] : 'Command Status' event received

[09:13:54:449] :  Status: BLE_STATUS_OK

[09:13:54:478] : 'Discover Primary Services by UUID Result Progress' event received

[09:13:54:478] :  Primary Service 1:

[09:13:54:478] :  -------------------------

[09:13:54:478] :  Start Handle: 0x0010

[09:13:54:478] :  End Handle: 0x0013

[09:13:54:508] : 'GATT Error Notification' event received

[09:13:54:508] :  Error Code: BLE_GATT_ERR_ATTRIBUTE_NOT_FOUND

[09:13:54:509] : 'Discover All Characteristics' request sent

[09:13:54:509] :  Start Handle: 0x0010

[09:13:54:509] :  End Handle: 0x0013

[09:13:54:510] : 'Command Status' event received

[09:13:54:510] :  Status: BLE_STATUS_OK

[09:13:54:539] : 'Discover All Characteristics Result Progress' event received

[09:13:54:539] :  Characteristic 1:

[09:13:54:539] :  --------------------------

[09:13:54:539] :  Attribute Handle: 0x0011

[09:13:54:539] :  Characteristic Value Handle: 0x0012

[09:13:54:539] :  UUID: 00060001F8CE11E4ABF40002A5D5C51B

[09:13:54:539] :  Properties: 0x1C

[09:13:54:584] : 'GATT Error Notification' event received

[09:13:54:584] :  Error Code: BLE_GATT_ERR_ATTRIBUTE_NOT_FOUND

[09:13:54:584] : 'Discover All Characteristic Descriptors' request sent

[09:13:54:584] :  Start Handle: 0x0013

[09:13:54:584] :  End Handle: 0x0013

[09:13:54:585] : 'Command Status' event received

[09:13:54:585] :  Status: BLE_STATUS_OK

[09:13:54:614] : 'Discover All Characteristic Descriptors Result Progress' event received

[09:13:54:614] :  Characteristic Descriptor 1:

[09:13:54:614] :  -------------------------------------

[09:13:54:614] :  Attribute Handle: 0x0013

[09:13:54:614] :  UUID: 0x2902

[09:13:54:614] : 'Command Complete' event received

[09:13:54:614] :  Status: BLE_STATUS_OK

[09:13:54:615] : 'Write Characteristic Descriptor' request sent

[09:13:54:615] :  Attribute Handle: 0x0013

[09:13:54:615] :  Value: [01:00]

[09:13:54:617] : 'Command Status' event received

[09:13:54:617] :  Status: BLE_STATUS_OK

[09:13:54:644] : 'Command Complete' event received

[09:13:54:644] :  Status: BLE_STATUS_OK

[09:13:54:644] : 'Read Characteristic Descriptor' request sent

[09:13:54:644] :  Attribute Handle: 0x0013

[09:13:54:646] : 'Command Status' event received

[09:13:54:646] :  Status: BLE_STATUS_OK

[09:13:54:674] : 'Read Characteristic Descriptor Response' event received

[09:13:54:674] :  Value: [01:00]

[09:13:54:674] : 'Command Complete' event received

[09:13:54:674] :  Status: BLE_STATUS_OK

[09:13:54:675] : 'Write Characteristic Value Without Response' request sent

[09:13:54:675] :  Attribute Handle: 0x0012

[09:13:54:675] :  Value: [01:38:06:00:00:00:00:00:00:00:C1:FF:17]

[09:13:54:677] : 'Command Status' event received

[09:13:54:677] :  Status: BLE_STATUS_OK

[09:13:54:678] : 'Command Complete' event received

[09:13:54:678] :  Status: BLE_STATUS_OK

[09:13:54:704] : 'Characteristic Value Notification' event received

[09:13:54:704] :  Attribute Handle: 0x0012

[09:13:54:704] :  Value: [01:04:00:00:FB:FF:17]

[09:13:54:705] : 'Write Characteristic Value Without Response' request sent

[09:13:54:705] :  Attribute Handle: 0x0012

[09:13:54:705] :  Value: [01:3B:00:00:C4:FF:17]

[09:13:54:706] : 'Command Status' event received

[09:13:54:706] :  Status: BLE_STATUS_OK

[09:13:54:707] : 'Command Complete' event received

[09:13:54:707] :  Status: BLE_STATUS_OK

[09:13:54:707] : 'Terminate Connection' request sent

[09:13:54:709] : 'Command Status' event received

[09:13:54:709] :  Status: BLE_STATUS_OK

[09:13:54:734] : 'Connection Terminated Notification' event received

[09:13:54:734] :  Reason: CONNECTION_TERMINATED_BY_LOCAL_HOST

[09:13:54:735] : 'Connection Terminated Notification' event received

[09:13:54:735] :  Reason: CONNECTION_TERMINATED_BY_LOCAL_HOST

[09:13:54:737] : 'Set Local Device Security' request sent

[09:13:54:737] :  Security Level: 0x13

[09:13:54:737] :  Encryption Key Size: 16

[09:13:54:737] :  Bonding: 0x01

[09:13:54:737] :  Pairing properties: USE_KEYPRESS_NOTIFICATION

[09:13:54:737] :  Secure connection only mode: Disable

[09:13:54:738] : 'Command Status' event received

[09:13:54:738] :  Status: BLE_STATUS_OK

[09:13:54:738] : 'Command Complete' event received

[09:13:54:738] :  Status: BLE_STATUS_OK

[09:13:54:739] : 'Get Local Device Security' request sent

[09:13:54:741] : 'Command Status' event received

[09:13:54:741] :  Status: BLE_STATUS_OK

[09:13:54:741] : 'Get Local Device Security Response' event received

[09:13:54:741] :  Security Level: 0x13

[09:13:54:741] :  Encryption Key Size: 16

[09:13:54:741] :  Bonding: 0x01

[09:13:54:741] :  Pairing properties: USE_KEYPRESS_NOTIFICATION

[09:13:54:741] : 'Command Complete' event received

[09:13:54:741] :  Status: BLE_STATUS_OK

0 Likes

Hi,

1. I recommend you to keep the BLE component version as v2.0 and check once.

2. I guess there is some problem with the project OTA_DFU project that you attached. When I program it on my board the LEDs are not blinking. So please use the PSoC6DFUBleApp0 project directly.

3. I have also tried with PSoC6DFUBleApp0 and the POC.cyacd2 file that you have attached. I am getting the same error that you have attached. So the issue may lie in POC.cyacd2 file also. If possible please attach the POC project also. I guess you have developed that project using PSoC6DFUBleApp1. Please check it once.

Thanks

Ganesh

0 Likes