0

Feather nrf52 - OTA Software Updates
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather nrf52 - OTA Software Updates

by jcscott on Thu Sep 14, 2017 7:37 pm

I have been trying for the last while to determine if there is a way to upgrade the software I've mounted on the Feather nrf52 without connecting to the device using USB. I've encountered a scenario where I'd like to mount prototype I'm making out of reach (at the top of a flag pole), and I would rather not have to retrieve it to change the software.

Is it possible to tap into the DFU OTA update functionality to update the software I've loaded initially from the Arduino IDE?

I appreciate any insight anyone can provide!

-J

jcscott
 
Posts: 19
Joined: Thu Jul 06, 2017 8:19 am

Re: Feather nrf52 - OTA Software Updates

by adafruit_support_mike on Fri Sep 15, 2017 5:28 am

It's possible, but only as an unsupported, at-your-own-risk option:

https://learn.adafruit.com/bluefruit-nr ... bootloader

adafruit_support_mike
 
Posts: 45954
Joined: Thu Feb 11, 2010 2:51 pm

Re: Feather nrf52 - OTA Software Updates

by jcscott on Wed Sep 20, 2017 3:30 pm

Thanks for getting back to me! Unfortunately, I have been unable to figure out how to move forward to achieve this. I'll revisit in the future but if anyone has any ideas, I'm all ears!

jcscott
 
Posts: 19
Joined: Thu Jul 06, 2017 8:19 am

Re: Feather nrf52 - OTA Software Updates

by hathach on Thu Sep 21, 2017 4:56 am

there is a couple of topics on this. Basically, you copy the .zip file generated by Arduino compilation. Then use Nordic nrf toolbox app on mobile phone to perform the upgrade.

hathach
 
Posts: 511
Joined: Tue Apr 23, 2013 1:02 am

Re: Feather nrf52 - OTA Software Updates

by jcscott on Thu Sep 21, 2017 12:12 pm

Thanks for the helpful tip hathach. I'll keep working on this and post my solution when I figure this out!

jcscott
 
Posts: 19
Joined: Thu Jul 06, 2017 8:19 am

Re: Feather nrf52 - OTA Software Updates

by bojh on Wed Nov 15, 2017 12:05 pm

Hello,
I just mentioned, that the nordic "nrf Toolbox"-App (-DFU) on Android does find the AdaDFU service in the devices OTA status, but the according iOS nordic App does can not find this "AdaDFU" service. Why is there something missing?
This seems a little bit surprising for me, because I allready had managed a directly modified/installed OTA-DFU bootloader based on the nRF_SDK_11.0.0/examples/dfu/bootloader example source on another board, which has already worked also unter iOS. Is ther something specific with the adafruit bootloader DFU service?
Is the bootloader source available? I couldn't find it at the moment.

bojh
 
Posts: 21
Joined: Thu Sep 28, 2017 5:17 am

Re: Feather nrf52 - OTA Software Updates

by hathach on Wed Nov 15, 2017 12:28 pm

You need a ble sketch e.g bleuart. Dfu serive is auto added when Bluefruit.begin() is called. There should be no issue to ota via ios. I did it with ios everytime I test OTA.

The bootloader code is not available due to license restriction from Nodic sdk 11 though.

hathach
 
Posts: 511
Joined: Tue Apr 23, 2013 1:02 am

Re: Feather nrf52 - OTA Software Updates

by bojh on Thu Nov 16, 2017 9:23 am

Hello Hathach,
Yes I have a sketch with the bluefruit buildin DFU-Service. With the android Nordic nRF Tool App (DFU Library version 1.3.0) I can see the advertising AdaDfu service, but with the iOS App not.
Don't know why? Did you have the same DFU library on your iOS App (iOS: DFU Library version 3.0.6)

Next I have tried to upload with the Android app a *.zip package: which was build as follows:
./nrfutil-v052.exe dfu genpkg \
--application-version 0xFFFFFFFF \
--application dist/$BASE_NAME.hex \
--dev-type 0xFFFF \
--dev-revision 0xFFFF \
--sd-req 0xFFFE \
dist/$BASE_NAME.zip
This is my current way (/wo versioning) to create a new sketch distribution package a s132 based app for update - but I have got an Error: Upload failed: "REMOTE DFU OPERATION FAILED"

bojh
 
Posts: 21
Joined: Thu Sep 28, 2017 5:17 am

Re: Feather nrf52 - OTA Software Updates

by bojh on Thu Nov 16, 2017 11:59 am

OK a step further:
A reboot of my iPhone has solved the iOS scan problem finding the AdaDFU service: I can see it for now!
But trying to upload a distribution *.zip package on iOS ..... does finish very fast!. The device does reboot - but as I can see: No new app/sketch is installed!
Status for me: Something is not correct at all! .... but no error message.
Did somebody have an idea, if the package (see above) is not bootloader conform? versioning issue?

bojh
 
Posts: 21
Joined: Thu Sep 28, 2017 5:17 am

Re: Feather nrf52 - OTA Software Updates

by bojh on Thu Nov 16, 2017 1:05 pm

.... and another step forward:
using the Adafruit Bluefruit app Updates DFU (Center Mode) Service "Use custom firmware" functionality we need the *.hex and init *.dat file.
Providing that as extract from the distribution *.zip does produce a message: "Operation failed. Ensure the firmware target that device type and version."
So my question is now: where can I get the device type and version info to set up init data for generation with the nordic tool?

bojh
 
Posts: 21
Joined: Thu Sep 28, 2017 5:17 am

Re: Feather nrf52 - OTA Software Updates

by bojh on Thu Nov 16, 2017 1:22 pm

... and another step:
I have found at the Arduino-IDE log the location creating the distribution package for serial update - looks like:
"C:\Users\xxxx\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.7.5/tools/nrfutil-0.5.2/binaries/win32/nrfutil.exe" dfu genpkg --dev-type 0x0052 --application "C:\Users\xxxx\AppData\Local\Temp\arduino_build_974452/my_app.ino.hex" "C:\Users\xxxx\AppData\Local\Temp\arduino_build_974452/my_app.ino.zip"
Zip created at C:\Users\xxxx\AppData\Local\Temp\arduino_build_974452/my_app.ino.zip
So next, I will try to set the right ---dev-type 0x0052 info.

bojh
 
Posts: 21
Joined: Thu Sep 28, 2017 5:17 am

Re: Feather nrf52 - OTA Software Updates

by hathach on Thu Nov 16, 2017 2:23 pm

I mentioned this multiple times before. All you need to do is enable the compile log from Arduino. Then use the zip file IDE created at the end of the compilation progress to perform the ota.

hathach
 
Posts: 511
Joined: Tue Apr 23, 2013 1:02 am

Re: Feather nrf52 - OTA Software Updates

by bojh on Fri Nov 17, 2017 3:54 am

Thanks for your help and sorry I haven't red it exactly: Who reads is clearly in the advantage! I will test that.

bojh
 
Posts: 21
Joined: Thu Sep 28, 2017 5:17 am

Re: Feather nrf52 - OTA Software Updates

by bojh on Mon Nov 20, 2017 12:58 pm

Well testet OTA DFU! - Thanks for your very good work - great job!

bojh
 
Posts: 21
Joined: Thu Sep 28, 2017 5:17 am

Please be positive and constructive with your questions and comments.