Receiving [Error: DFU FILE ERROR] when trying to get DFU working in my react native app

I made a device based on the nRF52832 and am developing an app to control it.  The control works great, I can send and receive BLE signals with react-native-ble-manager.  I am moving on to enable firmware updates and I am hitting a snag that I just can't find a way to get past.  I got the dfu_application.zip from my build/zephyr directory and fed it to the react-native-nordic-dfu library like:

await BleManager.createBond("F0:0A:33:69:AD:C1")
      await NordicDFU.startDFU({
        deviceAddress: "F0:0A:33:69:AD:C1",
        deviceName: "Open Scoreboard 0000",
        filePath: uri,
      })
and I get the error:

LOG DFU state: DFU_FAILED
LOG [Error: DFU FILE ERROR]

I can use the same zip in the device manager app to update the firmware successfully, but it doesn't seem to work here.  Attached is my full RN project, firmware source, and the DFU zip.  I believe the error is coming from Nordic's Android-DFU-Library, but I have not had any luck tracing back what the issue could be. I was hoping someone here might be able to see the mistake that I'm making.

Do I have an issue with my DFU file?  I have also tried exporting with "nrfutil nrf5sdk-tools pkg generate" without any luck. 

Do I have an issue with how I'm setting up my connection?  I'm connecting then bonding through react-native-ble-manager independently then running the startDFU with just the ID/Name

Any help or advice on how to move forward would be greatly appreciated.

Best,
    Phirks

   -  - 
Parents Reply
  • Thank you, that does help.  You're right I didn't realize the react native library was referencing a library that was only for the older SDK.  Do you have any advice on building FOTA updates into a custom app?  I can probably reverse engineer how it was done on the device manager app, but it would be nice to hear somebody had some documentation somewhere, even if it's swift/kotlin specific.

Children
Related