This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

calling ble_dfu.py from Windows application

I need to automate OTA updating the bootloader and radio for several hundred units that have an nRF51 (softdevice 7.1.0) from a VB.NET windows application. I'm able to call dfu/main.py with the code below and it starts to execute ble_dfu.py.

    mEngine = Python.CreateEngine()
    mScope = mEngine.CreateScope
    mSource = mEngine.CreateScriptSourceFromFile(sourceFile, System.Text.Encoding.ASCII, Microsoft.Scripting.SourceCodeKind.Statements)
    mcCode = mSource.Compile()
    mcCode.Execute(Scope)

I have two questions:

  1. How do I monitor the progress of the update process? I see that there are calls to ble_dfu.Progress, but how do I get at that from the .NET side?
  2. The update process usually gets stuck with a "Waiting for packet receipt notification" message, which sounds like the host didn't get a receipt from the nRF51. Is there another configuration setting that needs to be done?
Related