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

AWS FOTA fails with errno 128

On current nrf master c1feced5e8768ff6b4e08a62dab1026fb36dda5f

Relevant logs:

[00:05:26.242,980] <dbg> download_client.download_thread: Read 1024 bytes from socket
[00:05:26.250,640] <dbg> download_client.download_thread: Awaiting full fragment (3668)
[00:05:26.258,300] <dbg> download_client.download_thread: Receiving up to 428 bytes at 0x20020e58...
[00:05:26.267,181] <dbg> download_client.download_thread: Read 428 bytes from socket
[00:05:26.274,566] <inf> download_client: Downloaded 126976/234120 bytes (54%)
[00:05:26.327,514] <inf> fota_flash_block: Erasing sector at offset 0x0001f000
[00:05:26.425,933] <dbg> download_client.HTTP request
47 45 54 20 2f 69 6d 61 67 65 73 2f 6e 72 66 39 |GET /ima ges/nrf9
31 36 30 5f 70 63 61 31 30 30 39 30 6e 73 2f 61 |160_pca1 0090ns/a
70 70 5f 75 70 64 61 74 65 2e 62 69 6e 20 48 54 |pp_updat e.bin HT
54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 75 70 |TP/1.1.. Host: up
64 61 74 65 2e 6c 6f 67 69 73 74 69 6d 61 74 69 |date.log istimati
63 73 2e 63 6f 6d 2e 73 33 2e 61 6d 61 7a 6f 6e |cs.com.s 3.amazon
61 77 73 2e 63 6f 6d 0d 0a 43 6f 6e 6e 65 63 74 |aws.com. .Connect
69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d |ion: kee p-alive.
0a 52 61 6e 67 65 3a 20 62 79 74 65 73 3d 31 32 |.Range: bytes=12
36 39 37 36 2d 31 33 31 30 37 31 0d 0a 0d 0a |6976-131 071....
[00:05:26.490,936] <dbg> download_client.get_request_send: Sending HTTP request
[00:05:26.497,894] <err> download_client: Failed to send HTTP request, errno 128
[00:05:26.505,004] <err> fota_download: Download client error
[00:05:26.510,589] <inf> dfu_target_mcuboot: MCUBoot image upgrade aborted.
[00:05:26.517,211] <err> aws_fota: FOTA download failed, report back

errno 128 is either KEYREVOKED or -1 EPERM.  Any idea why this is failing?

Parents
  • Hey,

    have you provisioned the certificates for AWS on the modem?

  • Yes, I can successfully connect directly to my AWS IOT broker.  This error is occurring when downloading firmware from an unsecured HTTP server.  As you can see from the Range: header, about half of it has been downloaded before I get this error.

    Any ideas about what is causing the error?

  • brendanyounger said:
    As you can see from the Range: header, about half of it has been downloaded before I get this error.

     Does it always happen at the same point during download, or is it random?

  • I have confirmed that the download works fine with a Verizon SIM.  The issue appears to be related to some of the roaming MVNO SIMs I have been using.

    We do need to be able to run on these roaming SIMs like Hologram and Twilio, though.  We are seeing issues with low data rates, hung downloads, and an inability to send/receive SMSes.

Reply
  • I have confirmed that the download works fine with a Verizon SIM.  The issue appears to be related to some of the roaming MVNO SIMs I have been using.

    We do need to be able to run on these roaming SIMs like Hologram and Twilio, though.  We are seeing issues with low data rates, hung downloads, and an inability to send/receive SMSes.

Children
  • Could it be a connection issue? You can check the signal strength with the AT%XMONITOR command. Make sure you have a stable connection before attempting FOTA.

  • aws_fota program is unstable. I succeeded in updating a program once but failed many times. I don't get err 128, but get "aws_fota_mqtt_evt_handler: Failed! -14." I'm using Hologram SIM in Japan.