This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error uploading app thru optiboot-ble and NRF toolbox

I am trying to use optiboot-ble with the nRF8001 and an atmega328p to allow application update over bluetooth. I have successfully compiled the bootloader and flashed it to the microcontroller. I have loaded the uart project with dfu from the SDK onto the microcontroller and it appears to work fine. I have been unsuccessful however in uploading an app via bluetooth using either the nRF toolbox app (ios Version 4.4.1) or the nRF Connect app (ios Version 1.7.5). Both connect fine and start the upload process but then get a disconnect error (disconnected by remote device). I have tried changing the number of packets down to 1 in the toolbox app but no change in result. Attached is the log file from the connect app.dfu log.txt

Also attached is the serial output from the debugger.debugger output.txt

Parents
  • Suggestions: Use the bootloader hex file as attached in the release in github. nRF toolbox android version (I used only the Android version):

    Settings:

    • Set the MBR size to zero
    • External MCU DFU to ON

    Additional comments, I have never used the iOS app for testing this so I suggest that the android one is use for verifying that it works.

  • David - thanks for the help - this is working now. I think I found a couple additional problems / errors under some conditions:

    1. During the watchdog reset into the bootloader rdyn and the reset lines are tri-stated. This seemed to cause problems for me locking up the nrf8001 even after I added an external pull-up on rdyn (didn't do anything with the reset). To get around this I decided to just jump from the application directly into the bootloader - rather than reset into it.
    2. In the bootloader_data_store procedure in the nordic ble sdk the following line: for (uint8_t i = 0; i < sizeof(pipes); i++) stores the incorrect number of bytes for the pipes because it is taking the sizeof the local uint8_t *pipe which is 1. This causes the ble-optiboot to read the incorrect values for the second and third pipes and thus it never progressed to the uploading of the app image stage.
Reply
  • David - thanks for the help - this is working now. I think I found a couple additional problems / errors under some conditions:

    1. During the watchdog reset into the bootloader rdyn and the reset lines are tri-stated. This seemed to cause problems for me locking up the nrf8001 even after I added an external pull-up on rdyn (didn't do anything with the reset). To get around this I decided to just jump from the application directly into the bootloader - rather than reset into it.
    2. In the bootloader_data_store procedure in the nordic ble sdk the following line: for (uint8_t i = 0; i < sizeof(pipes); i++) stores the incorrect number of bytes for the pipes because it is taking the sizeof the local uint8_t *pipe which is 1. This causes the ble-optiboot to read the incorrect values for the second and third pipes and thus it never progressed to the uploading of the app image stage.
Children
No Data
Related