This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-CC2652RB: Device aborts OTA and cannot be updated

Part Number: LP-CC2652RB

Hello

I have two identical development boards on which i'm testing OTA functionality with local or external repository firmwares using Zigbee2Mqtt and Home Assistant. The problem i have is that one of the boards works really well (albeit incredibly slow, taking 5 hours to update a 170KB image) while the other one would never perform an update regardless of the image source.

The procedure to check and program the boards is identical between them and goes as follows:

  1. Delete boards from Z2M and clear records stored in persistent storage to ensure fresh repair
  2. Erase memory
  3. Program the board with BIM.hex and _oad.bin files
  4. Re-pair boards with coordinator (pairing is successful every time)
  5. Check for updates
  6. Update board

Everything works correctly for both boards up until step 6 where one board will never update and i get an error message.

Checking for updates and starting procedure:

Zigbee2MQTT:info  2023-10-03 17:01:50: MQTT publish: topic 'zigbee2mqtt/0x00124b00214f4a0b', payload '{"update":{"installed_version":2,"latest_version":3,"state":"available"},"update_available":true,"voltage":3800}'
Zigbee2MQTT:debug 2023-10-03 17:01:54: Received MQTT message on 'zigbee2mqtt/bridge/request/device/ota_update/update' with data '{"id":"0x00124b00214f4a0b","transaction":"6v0j5-24"}'
Zigbee2MQTT:info  2023-10-03 17:01:54: Updating '0x00124b00214f4a0b' to latest firmware
Zigbee2MQTT:info  2023-10-03 17:01:54: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Updating '0x00124b00214f4a0b' to latest firmware","meta":{"device":"0x00124b00214f4a0b","status":"update_in_progress"},"type":"ota_update"}'

Zigbee2MQTT:debug 2023-10-03 17:01:58: getNewImage for '0x00124b00214f4a0b', image header {"otaUpgradeFileIdentifier":{"type":"Buffer","data":[30,241,238,11]},"otaHeaderVersion":256,"otaHeaderLength":56,"otaHeaderFieldControl":0,"manufacturerCode":48830,"imageType":9810,"fileVersion":3,"zigbeeStackVersion":2,"otaHeaderString":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","totalImageSize":176794}
Zigbee2MQTT:debug 2023-10-03 17:01:58: Got new image for '0x00124b00214f4a0b'
Zigbee2MQTT:debug 2023-10-03 17:01:58: Starting upgrade

Finally getting the error message:

Zigbee2MQTT:info  2023-10-03 17:02:34: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Update of '0x00124b00214f4a0b' failed (Update failed with reason: 'aborted by device')","meta":{"device":"0x00124b00214f4a0b","status":"update_failed"},"type":"ota_update"}'
Zigbee2MQTT:info  2023-10-03 17:02:34: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/ota_update/update', payload '{"data":{"id":"0x00124b00214f4a0b"},"error":"Update of '0x00124b00214f4a0b' failed (Update failed with reason: 'aborted by device')","status":"error","transaction":"6v0j5-24"}'
Zigbee2MQTT:error 2023-10-03 17:02:34: Update of '0x00124b00214f4a0b' failed (Update failed with reason: 'aborted by device')
Zigbee2MQTT:debug 2023-10-03 17:02:34: Error: Update failed with reason: 'aborted by device'
    at /app/node_modules/zigbee-herdsman-converters/src/lib/ota/common.ts:422:24

I find it weird that the header string is all zeros, but the image size is correct and the update works and is functioning as expected for the other board.

I suspect this might have something to do with my board rather than Z2M or the Sonoff coordinator as the other identical board will always work and this one has never did. I've tested multiple firmware versions (as we've had to keep adding features) and this one never works while the other one hasn't had any issues as far as i know.

Just to mention, all other communication between coordinator and boards works as expected and both send and receive messages as expected. I cannot sniff the traffic as i don't have a sniffer.

  • Hi A V,

    The speed of the OTA update will depend on your Zigbee2Mqtt host source and ZNP settings.  Have you tried using the zc_ota_server example for evaluation/comparison?  Since one board is operable using the same setup, the OTA firmware and update image itself does not seem to be an issue.  Are you using the LP-CC2652RB, and if so are they brand new out-of-box?  How does the RSSI of each perform when using Smart RF Studio RX/TX tests?  Or if a custom design, have you submitted it to SIMPLELINK-2-4GHZ-DESIGN-REVIEWS for further review?  Note that you can use these TI development boards as a sniffer as well, if you are able to obtain a third (see Packet Sniffing Solutions).  Either way it appears that one board is performing poorly in respect to RF.

    Regards,
    Ryan

  • Have you tried using the zc_ota_server example for evaluation/comparison?

    Yes. I'm sorry for having missed to mention this. I could not validate whether ota server works as i cannot connect the end device board to the app; or at least that's what i suspect might be the issue. After flashing OTA_server to the board and loading the image and putting the board in pairing mode, the only thing i see is a PAN id but no other devices seem to be discoverable. I tried numerous times but gave up as i couldn't go past this step.

    Are you using the LP-CC2652RB, and if so are they brand new out-of-box?

    Both are identical boards that i've been using for a couple of months now. 

    How does the RSSI of each perform when using Smart RF Studio RX/TX tests?

    I've tried to do this now and i cannot get permission to download the software. I've tried a couple of times and am constantly being refused permission. However, checking Z2M i can see that the problematic board has a LQI of 142 and the properly working one has 116 when placed at the same distance from the coordinator. It seems that LQI is not a standard measure and depends on the implementation of the specific service. I am not sure whether Z2M / HA uses RSSI or a different metric for reporting LQI.

  • If you follow the Sample OTA Applications or Zigbee Over-the-Air (OTA) Upgrades SimpleLink Academy Lab then you should be able to get the default ota_server and ota_client examples to commission and perform an OTA Update.  Even if the LP-CC2652RB are identical it is possible that the hardware has been damaged through mishandling, ESD, etc. and you should obtain backups for further testing plus sniffing options.

    Regards,
    Ryan