Getting "CRC does not match!" in nRF Connect iOS mobile application

I am trying to integrate GitHub - NordicSemiconductor/IOS-DFU-Library: OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs library in one of the SwiftUI mobile application. The integration was easy due to really well documentation instructions on the library page. 

I went ahead and tried to load my ZIP file, but it gave me "CRC does not match!" error in the logs, and then DFU process just stuck at aero progress.

Then I tried to load DFU using your app, which is currently on AppStore - nRF Connect for Mobile on the App Store (apple.com), but I got the same log

I am trying to integrate GitHub - NordicSemiconductor/IOS-DFU-Library: OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs (v4.11.1) pod library in one of the SwiftUI mobile application project. The integration was seamless due to really well documentation instructions on the library page. 

I went ahead and tried to load my ZIP file, but it gave me "CRC does not match!" error in the logs, and then DFU process just stuck at zero progress.

Then I tried to load DFU using your app, which is currently on AppStore - nRF Connect for Mobile on the App Store (apple.com), but I got the same error in log (attached TXT version log from nRF iOS app)

I also tried nRF Connect Android app from Play Store, with same BLE device and same ZIP file, it worked!

I am not sure why iOS DFU library or nRF Connect iOS app giving CRC error.

Any help would be appreciated.

I have tested this on iPod Touch (iOS 14.8)

Parents Reply
  • Hi Charlie,

    The process you mentioned to test loading zip file on my nRF50 worked through nRF connect iOS application. It means nRF iOS application is working. Do you have any idea why my zip file giving "CRC Does not match!" error on iOS and same file working on Android nRF app?

    Additionally, Android nRF application printing same logs, means same "CRC Does not match!" error. BUT, on the notification bar, the DFU loading progress shows and it does actual DFU loading even though there is CRC error in logs.

Children
  • Hi Meet,

    Meet said:
    The process you mentioned to test loading zip file on my nRF50 worked through nRF connect iOS application. It means nRF iOS application is working. Do you have any idea why my zip file giving "CRC Does not match!" error on iOS and same file working on Android nRF app?

    If the zip file in nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\examples\dfu\secure_dfu_test_images\ble works on both iOS and Android apps but your zip file gives "CRC Does not match!", shouldn't you check your zip file next step? Can you explain how you build your application based on which sample or document?

    Best regards,

    Charlie

  • Hi Charlie,

    I contacted one of our firmware engineer who created the zip file. He said that he used Nordic tool to generate zip file from .bin file.

    My iOS SwiftUI application code to initiate DFU process looks like below:

    if let dfuZipFileName = dfuZipFileName, let dfuFileURL: URL = Bundle.main.url(forResource: dfuZipFileName, withExtension: "zip") {
        let selectedFirmware = DFUFirmware(urlToZipFile: dfuFileURL)
        // Use the DFUServiceInitializer to initialize the DFU process.
        let dfuServiceInitiator = DFUServiceInitiator().with(firmware: selectedFirmware!)
    
        dfuServiceInitiator.delegate = self // - to be informed about current state and errors
        dfuServiceInitiator.progressDelegate = self // - to show progress bar
        dfuServiceInitiator.logger = self // - to get log info
        dfuServiceInitiator.packetReceiptNotificationParameter = 1 // default is 12
        dfuServiceInitiator.dataObjectPreparationDelay = 0.3
        dfuServiceController = dfuServiceInitiator.start(target: peripheral)
    }

    Note: I have also tried dfuServiceInitiator.forceDfu = true, but that also gave same CRC error.

    I have some questions:

    1. Does CRC check is mandatory process to initiate DFU process?
    2. Can you explain how the process works of DFU with regards to CRC generation?
      I believe that if I am loading a zip file to my BLE sensor, which has a DFU characteristics. Does my sensor generating CRC, is there any chance my sensor's DFU implementation generating wrong CRC?!
    3. Is there any configuration in iOS DFU library where I can disable checking CRC checksum and proceed directly loading DFU?
Related