I need to automate updating the bootloader and radio for an nRF51 in a production setting with 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()
I have two questions:
- 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?
- 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?