Hello everybody,

 

once again I need some help :(

 

We were playing with the FOTA functionality of the app BoschXDKCloudConnectivity.

Just before lunch l started a firmware update using a Leshan-Server.

When I come back I found out, that the SD-card was missing. A work-mate had taken it to copy the config-file and didn't know that an update was on running.

 

Now every time I start the XDK110 with the application following two lines appears repeatedly:

 

INFO | XDK DEVICE 1: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR 
 INFO | XDK DEVICE 1: FOTA_EVENT_DOWNLOADAGENT_CONTINUE 

 

I have tried a few things to get rid of it: 

 

  • Re-flash the app
  • Re-flash the bootloader and the app.
  • Flash the bootloader version 0.0.1 and then again the version 1.1.0
  • Format the SD-Card and re-insert the config-file

 

Unfortunately the device still shows every time the some messages.

 

The state of the Firmware Update (seen with the front-end of the leshan server) shows everytime 1. So I suppose there is something to be reset but at this point I don't know where.

 

Any hint'd be appreciated.

 

Thanks in advance.

 

Elvys

0 (0 Votes)
RE: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR
Answer
10/2/18 2:01 PM as a reply to Elvys Melo.
Hello Elvys,

thank you for providing your detailed explanation.

I assume removing the SD-card lead to a software issue in the XDK. I would really like to analyse this issue in detail.

I would ask you to get into detail about your restoring attempt to flash the bootloader to version 0.1.0 and 1.1.0. (WB-Version, XDK Serial No,...)

In general, reflashing the bootloader itself should completely restore the XDK without any states or leftovers from old applications or errors.

Please let me know if you used the following JLINK debugger to flash the bootloader:
J-Link Lite CortexM-9 or J-Link EDU Mini
Additionally please let me know if you followed the following guide for flashing the bootloader this guide by Bosch .

Kind regards,
Franjo
0 (0 Votes)
RE: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR
Answer
10/2/18 2:41 PM as a reply to Franjo Stjepandic.

Hello Franjo,

I used the J-Link Lite CortexM to flash the bootloder. On the PCB of the debugger it is written it is version 9.0.

I just repeated the operation: The last lines where:

 

 INFO | 'XDK Device 1' is connected to JLink interface '519002803'
 INFO | Try to flash bootloader 'XDK110_FOTA_Bootloader_1.1.0.bin' on device 'XDK Device 1'
 INFO | Connecting to XDK device 'XDK Device 1' in port 'COM5'...
 INFO | Connection to port 'COM5' established
 INFO | XDK DEVICE 1:  Connected to WPA network successfully
 INFO | Port 'COM5' has been disconnected
 INFO | Flashing bootloader 'XDK110_FOTA_Bootloader_1.1.0.bin' successfully executed

 

My workbench has the version 3.4.0 ( Build date 2018-07-28T17:58:02Z )

The SW was compiled on Win10-OS.

I also cleared the project and re-compiled it but with the same result.

Thank you in advance for any help.

 Regards,

 

Elvys

0 (0 Votes)
RE: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR
Answer
10/4/18 2:28 PM as a reply to Elvys Melo.
Hello Elvys,

thank you for providing further information.

For clarification I need to ask you a few questions:
 
  • Has your colleague removed the SD card during the binary download process or during the executed update process with the downloaded binary?
  • Did you use the latest BoschXDKCloudConnectivity example from the latest XDK-Workbench on your XDK?
     
  • Are you able to verify that your source code is still working on a different XDK?

    A positive answer would narrow the issue down, that it is no initial error with your application.

    Furthermore, did you try to increment the firmware version before you attempt to start another update process, to eliminate possible issues within the firmware versions?
Kind regards,
Franjo
0 (0 Votes)
RE: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR
Answer
10/5/18 5:53 AM as a reply to Franjo Stjepandic.

Hello Franjo,

  • Has your colleague removed the SD card during the binary download process or during the executed update process with the downloaded binary?
    • I suppose at that time the down-/upload was completed. I was at lunch (45 min.) and he said he came just a few minutes before me.
  • Did you use the latest BoschXDKCloudConnectivity example from the latest XDK-Workbench on your XDK?
    • I used the example coming with the XDK-Workbench. I don't know if there is a newer one.
  • Are you able to verify that your source code is still working on a different XDK?
    • Yes, it works.
  • Furthermore, did you try to increment the firmware version before you attempt to start another update process, to eliminate possible issues within the firmware versions?
    • No, I didn't. This were my steps
      • Flashs the dubug/*bin-file via USB on the XDK110.  
      • Copy the very same file to the folder where the coap-server has access.
      • Open the front-end of the leshan server with a browser.
        • Choose the file for the update
      • Seeing in the console of the XDK-Workbench that a file was being downloaded.

 

The steps in the last point where repeated successfully with another XDK110.

 

I hope this helped.

 

Thank you in advance

 

Regards,

Elvys

 

0 (0 Votes)
RE: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR
Answer
10/8/18 8:58 AM as a reply to Elvys Melo.
Hello Elvys,

Thank you for providing further information.

In that regard, one more question. Is the XDK displaying over the Leshan server that the FirmwareUpdate.UpdateResult as one and the FirwareUpdate.State as one too? Or are there different states displayed?

Additionally, I would ask you to try out the process once more while incrementing the firmware version before.

For that, open the project properties and then go to the slider XDK Bootloader and FOTA . Enable the project specific settings checkbox and choose as Bootloader version 1.1.0 and type in as firmware version 0x00000001. Afterwards build the project once more and put the binary on your CoAP download server and try out the process once more.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Votes)
RE: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR
Answer
10/9/18 6:49 AM as a reply to Franjo Stjepandic.

Hello Franjo,

 

Before I start the additional requests:

  • FirmwareUpdate.State (/5/0/3)                : 1
  • FirmwareUpdate.UpdateResult (/5/0/5)  : 0

 

Then I performed the request:

  • I did what I was asked for.
  • I copy the *bin file to the coap server
  • The XDK110 started downloading the new firmware even before the URI was inserted.
    • I don't know where the URI is saved but I supposed after the bootloader was re-flashed and the firmware was re-installed this information'd be gone.
  • After the downloading was finished the updated was executed.
  • The XDK110 works normally -- SUCCESS

 

Thank you for your help. I would have never tried it.

Can you explain what internally happened?

I must confess I can't make any sense of it.

 

Thanks again.

 

Regards,

 

Elvys

0 (0 Votes)
RE: FOTA_EVENT_DOWNLOADAGENT_UNEXPECTED_ERROR
Answer
10/12/18 2:41 PM as a reply to Elvys Melo.
Hello Elvys,

Just to be on the same page, the FOTA download process worked with the new binary file with the altered firmware version without issues?

If that is correct, then I assume what happened is that the Lwm2m server you used, buffered the CoAP download server address and that is reason why the XDK was able to download the new firmware binary without the necessity to insert manually the CoAP download server address once more.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Votes)