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

Thingy91: pynrfjprog deadlocks at 100% cpu usage

I'm using the script from https://devzone.nordicsemi.com/f/nordic-q-a/53208/updating-nrf9160-modem-firmware-through-the-command-line/215357#215357

Under strace, it never forks any other process and doesn't create the file it's looking for, so I'm really not sure what it's expecting to happen.

Full strace at http://triffid-hunter.no-ip.info/pynrf-flash.strace since this forum thing keeps throwing errors when I try to attach it.

https://devzone.nordicsemi.com/f/nordic-q-a/62397/nrfjprog-bug-gets-stuck-due-to-temporary-directory-permissions seems related however my permissions are fine, and the directory tree in /tmp is recreated identically if I wipe it first.

Since this is apparently the only way to update the NRF91 modem firmware from a terminal, and all the examples seem to be complaining about out-of-date modem firmware, I'm once again stuck.

Parents
  • Hi,

     

    Unfortunately, this is a bug that we recently found in pynrfjprog. We are working on fixing this, but its not yet ready for release.

    My apologies for the inconvenience this has caused.

     

    Is it possible that you can use nRF connect for desktop (programmer app, works on *nix + win) to upgrade the modem on this device?

     

    Kind regards,

    Håkon

  • Is it possible that you can use nRF connect for desktop (programmer app, works on *nix + win) to upgrade the modem on this device?

    Not until https://devzone.nordicsemi.com/f/nordic-q-a/64132/nordic-thingy91-error-updating-modem-firmware is fixed for Linux, and since I have a very strong penchant for Makefiles and command-line tools (since I enjoy hands-off automation and CI) that would only ever be an unsustainable kludge for me.

    How usable are the tools mentioned in https://devzone.nordicsemi.com/f/nordic-q-a/14671/nrfjprog-for-arm-cpu-raspberry-pi-3 these days?

  • Hi,

     

    Triffid_Hunter said:

    that is a shell script on top of JLinkExe, which does not have support for programming a nRF9160 modem, unfortunately. You can use it to program the application (JLinkExe -> loadfile <hex>), but not the modem.

     

    Triffid_Hunter said:
    Not until https://devzone.nordicsemi.com/f/nordic-q-a/64132/nordic-thingy91-error-updating-modem-firmware is fixed for Linux, and since I have a very strong penchant for Makefiles and command-line tools (since I enjoy hands-off automation and CI) that would only ever be an unsustainable kludge for me.

    That case is related to using mcuboot for upgrading the modem (ie: a USB CDC device) on the thingy:91, and most of the errors in that case is related to either non-installed JLink binaries / nrfjprog binaries, or path problems towards one or both of these. I'm not excluding issues with other distros, but its more likely that its deps or path related.

    I tried the sequence for mcuboot-upgrade-of-modem + programming it standalone using the nrf connect v3.4.2 - programmer app, and both are working in ubuntu 20.04 amd64. If you get an error message when trying this procedure either via thingy:91's mcuboot or via an external debugger, please share it with me and I'll try to help out.

     

    Kind regards,

    Håkon

  • Just FYI, amazon is throwing 403 errors at your client when it tries to do partial updates.

    13:05:22.626 › Checking for update
    13:05:42.052 › Found version 3.4.2 (url: nrfconnect-3.4.2-x86_64.AppImage)
    13:05:47.330 › Downloading update from nrfconnect-3.4.2-x86_64.AppImage
    13:05:47.349 › updater cache dir: /home/triffid/.cache/nrfconnect-updater
    13:05:47.363 › No cached update info available
    13:07:08.977 › dkTihOXnG2ovqMEkpxwLPI+I duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › JRb1UK4Z/x76FrzcLRE0UX6J duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › oqYY7uJtPGEu9GT1URW/ZIZc duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › gRW5vkI5NXYlu2aP5yoTNMeY duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › 9LuhCEOQzb8vn0X29vVoEb83 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › o6Hp7Jg7kvy5lZV89L6QRBa7 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › /L8C1zeBidj9/kArl4fnYFM5 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.978 › tSaId5LMeXrZEioF0oMGS+Z7 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.978 › br2FvDMSa6Bk8w6LNGa/5RFf duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.979 › File has 1302 changed blocks
    13:07:08.979 › [
    {
    "kind": 0,
    "start": 0,
    "end": 159006
    },
    {
    "kind": 1,
    "start": 159006,
    "end": 191774
    },
    {
    "kind": 0,
    "start": 191774,
    "end": 59020876
    },
    {
    "kind": 1,
    "start": 59020876,
    "end": 59032521
    },
    {
    "kind": 0,
    "start": 59032522,
    "end": 66092751
    },
    {
    "kind": 1,
    "start": 66092750,
    "end": 66813059
    },
    {
    "kind": 0,
    "start": 66812143,
    "end": 66829834
    },
    {
    "kind": 1,
    "start": 66830750,
    "end": 67114423
    },
    {
    "kind": 0,
    "start": 67113436,
    "end": 67124550
    },
    {
    "kind": 1,
    "start": 67125537,
    "end": 67323400
    },
    {
    "kind": 0,
    "start": 88126999,
    "end": 88137299
    },
    {
    "kind": 1,
    "start": 67333700,
    "end": 67509636
    },
    {
    "kind": 0,
    "start": 67508589,
    "end": 67630889
    },
    {
    "kind": 1,
    "start": 67631936,
    "end": 67653730
    },
    {
    "kind": 0,
    "start": 67652683,
    "end": 67661468
    },
    {
    "kind": 1,
    "start": 67662515,
    "end": 74477772
    },
    {
    "kind": 0,
    "start": 66812143,
    "end": 66853473
    },
    {
    "kind": 1,
    "start": 74519102,
    "end": 74660620
    },
    {
    "kind": 0,
    "start": 74640545,
    "end": 74650179
    },
    {
    "kind": 1,
    "start": 74670254,
    "end": 86724996
    },
    {
    "kind": 0,
    "start": 66683393,
    "end": 66693181
    },
    {
    "kind": 1,
    "start": 86734784,
    "end": 93452268
    },
    {
    "kind": 0,
    "start": 92925548,
    "end": 100429017
    },
    {
    "kind": 1,
    "start": 100955737,
    "end": 100990952
    }
    ]
    13:07:08.990 › Full: 98,728.24 KB, To download: 26,570.51 KB (27%)
    13:07:08.992 › Differential download: github.com/.../nrfconnect-3.4.2-x86_64.AppImage
    13:07:08.995 › download range: bytes=159006-191773
    13:07:09.680 › Redirect to github-production-release-asset-2e65be.s3.amazonaws.com/.../ca45de00-d7cf-11ea-856e-beed2fafbb84
    13:07:17.848 › download range: bytes=59020876-59032520
    13:07:19.483 › download range: bytes=66092750-66813058
    13:29:14.325 › download range: bytes=66830750-67114422
    13:29:14.957 › Cannot download differentially, fallback to full download: HttpError: 403 Forbidden
    Headers: {
    "connection": [
    "close"
    ],
    "content-type": [
    "application/xml"
    ],
    "date": [
    "Wed, 12 Aug 2020 05:29:14 GMT"
    ],
    "server": [
    "AmazonS3"
    ],
    "transfer-encoding": [
    "chunked"
    ],
    "x-amz-id-2": [
    "MJwp4R8UJc4aCwKW4b828qX1sqOVxulGmzRPJIcrpu94JbavvDoGYS5o2h0Ix6Ke96eZ6nWlYTU="
    ],
    "x-amz-request-id": [
    "8C1F1693119B1923"
    ]
    }
    at createHttpError (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/builder-util-runtime/src/httpExecutor.ts:30:10)
    at ClientRequest.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:200:20)
    at ClientRequest.emit (events.js:194:13)
    at URLRequest.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/api/net.js:207:12)
    at URLRequest.emit (events.js:194:13)
    From previous event:
    at /tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/graceful-fs/graceful-fs.js:333:16
    at FSReqCallback.oncomplete (fs.js:150:20)
    From previous event:
    at FileWithEmbeddedBlockMapDifferentialDownloader.doDownloadFile (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:115:82)
    at FileWithEmbeddedBlockMapDifferentialDownloader.downloadFile (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:89:17)
    at FileWithEmbeddedBlockMapDifferentialDownloader.doDownload (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:76:17)
    at /tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.ts:14:16
    From previous event:
    at FileWithEmbeddedBlockMapDifferentialDownloader.download (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.ts:8:17)
    at Object.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppImageUpdater.ts:53:14)
    at Generator.next (<anonymous>)
    From previous event:
    at Object.task (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppImageUpdater.ts:37:11)
    at /tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:609:25
    at Generator.next (<anonymous>)
    at processImmediate (internal/timers.js:443:21)
    From previous event:
    at AppImageUpdater.executeDownload (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:544:68)
    at AppImageUpdater.executeDownload (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/BaseUpdater.ts:27:18)
    at AppImageUpdater.doDownloadUpdate (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppImageUpdater.ts:33:17)
    at AppImageUpdater.downloadUpdate (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:419:19)
    at callFunction (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/rpc-server.js:252:24)
    at /tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/rpc-server.js:411:10
    at EventEmitter.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/rpc-server.js:275:21)
    at EventEmitter.emit (events.js:194:13)
    at WebContents.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/api/web-contents.js:418:21)
    at WebContents.emit (events.js:194:13)

    I've been waiting a couple hours for it to finish the full download and it's still going - perhaps you should put a progress bar and some numbers in the client?

Reply
  • Just FYI, amazon is throwing 403 errors at your client when it tries to do partial updates.

    13:05:22.626 › Checking for update
    13:05:42.052 › Found version 3.4.2 (url: nrfconnect-3.4.2-x86_64.AppImage)
    13:05:47.330 › Downloading update from nrfconnect-3.4.2-x86_64.AppImage
    13:05:47.349 › updater cache dir: /home/triffid/.cache/nrfconnect-updater
    13:05:47.363 › No cached update info available
    13:07:08.977 › dkTihOXnG2ovqMEkpxwLPI+I duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › JRb1UK4Z/x76FrzcLRE0UX6J duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › oqYY7uJtPGEu9GT1URW/ZIZc duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › gRW5vkI5NXYlu2aP5yoTNMeY duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › 9LuhCEOQzb8vn0X29vVoEb83 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › o6Hp7Jg7kvy5lZV89L6QRBa7 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.977 › /L8C1zeBidj9/kArl4fnYFM5 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.978 › tSaId5LMeXrZEioF0oMGS+Z7 duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.978 › br2FvDMSa6Bk8w6LNGa/5RFf duplicated in blockmap (same size), it doesn't lead to broken differential downloader, just corresponding block will be skipped)
    13:07:08.979 › File has 1302 changed blocks
    13:07:08.979 › [
    {
    "kind": 0,
    "start": 0,
    "end": 159006
    },
    {
    "kind": 1,
    "start": 159006,
    "end": 191774
    },
    {
    "kind": 0,
    "start": 191774,
    "end": 59020876
    },
    {
    "kind": 1,
    "start": 59020876,
    "end": 59032521
    },
    {
    "kind": 0,
    "start": 59032522,
    "end": 66092751
    },
    {
    "kind": 1,
    "start": 66092750,
    "end": 66813059
    },
    {
    "kind": 0,
    "start": 66812143,
    "end": 66829834
    },
    {
    "kind": 1,
    "start": 66830750,
    "end": 67114423
    },
    {
    "kind": 0,
    "start": 67113436,
    "end": 67124550
    },
    {
    "kind": 1,
    "start": 67125537,
    "end": 67323400
    },
    {
    "kind": 0,
    "start": 88126999,
    "end": 88137299
    },
    {
    "kind": 1,
    "start": 67333700,
    "end": 67509636
    },
    {
    "kind": 0,
    "start": 67508589,
    "end": 67630889
    },
    {
    "kind": 1,
    "start": 67631936,
    "end": 67653730
    },
    {
    "kind": 0,
    "start": 67652683,
    "end": 67661468
    },
    {
    "kind": 1,
    "start": 67662515,
    "end": 74477772
    },
    {
    "kind": 0,
    "start": 66812143,
    "end": 66853473
    },
    {
    "kind": 1,
    "start": 74519102,
    "end": 74660620
    },
    {
    "kind": 0,
    "start": 74640545,
    "end": 74650179
    },
    {
    "kind": 1,
    "start": 74670254,
    "end": 86724996
    },
    {
    "kind": 0,
    "start": 66683393,
    "end": 66693181
    },
    {
    "kind": 1,
    "start": 86734784,
    "end": 93452268
    },
    {
    "kind": 0,
    "start": 92925548,
    "end": 100429017
    },
    {
    "kind": 1,
    "start": 100955737,
    "end": 100990952
    }
    ]
    13:07:08.990 › Full: 98,728.24 KB, To download: 26,570.51 KB (27%)
    13:07:08.992 › Differential download: github.com/.../nrfconnect-3.4.2-x86_64.AppImage
    13:07:08.995 › download range: bytes=159006-191773
    13:07:09.680 › Redirect to github-production-release-asset-2e65be.s3.amazonaws.com/.../ca45de00-d7cf-11ea-856e-beed2fafbb84
    13:07:17.848 › download range: bytes=59020876-59032520
    13:07:19.483 › download range: bytes=66092750-66813058
    13:29:14.325 › download range: bytes=66830750-67114422
    13:29:14.957 › Cannot download differentially, fallback to full download: HttpError: 403 Forbidden
    Headers: {
    "connection": [
    "close"
    ],
    "content-type": [
    "application/xml"
    ],
    "date": [
    "Wed, 12 Aug 2020 05:29:14 GMT"
    ],
    "server": [
    "AmazonS3"
    ],
    "transfer-encoding": [
    "chunked"
    ],
    "x-amz-id-2": [
    "MJwp4R8UJc4aCwKW4b828qX1sqOVxulGmzRPJIcrpu94JbavvDoGYS5o2h0Ix6Ke96eZ6nWlYTU="
    ],
    "x-amz-request-id": [
    "8C1F1693119B1923"
    ]
    }
    at createHttpError (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/builder-util-runtime/src/httpExecutor.ts:30:10)
    at ClientRequest.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:200:20)
    at ClientRequest.emit (events.js:194:13)
    at URLRequest.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/api/net.js:207:12)
    at URLRequest.emit (events.js:194:13)
    From previous event:
    at /tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/graceful-fs/graceful-fs.js:333:16
    at FSReqCallback.oncomplete (fs.js:150:20)
    From previous event:
    at FileWithEmbeddedBlockMapDifferentialDownloader.doDownloadFile (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:115:82)
    at FileWithEmbeddedBlockMapDifferentialDownloader.downloadFile (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:89:17)
    at FileWithEmbeddedBlockMapDifferentialDownloader.doDownload (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/DifferentialDownloader.ts:76:17)
    at /tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.ts:14:16
    From previous event:
    at FileWithEmbeddedBlockMapDifferentialDownloader.download (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.ts:8:17)
    at Object.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppImageUpdater.ts:53:14)
    at Generator.next (<anonymous>)
    From previous event:
    at Object.task (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppImageUpdater.ts:37:11)
    at /tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:609:25
    at Generator.next (<anonymous>)
    at processImmediate (internal/timers.js:443:21)
    From previous event:
    at AppImageUpdater.executeDownload (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:544:68)
    at AppImageUpdater.executeDownload (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/BaseUpdater.ts:27:18)
    at AppImageUpdater.doDownloadUpdate (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppImageUpdater.ts:33:17)
    at AppImageUpdater.downloadUpdate (/tmp/.mount_nrfconNHk6h0/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:419:19)
    at callFunction (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/rpc-server.js:252:24)
    at /tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/rpc-server.js:411:10
    at EventEmitter.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/rpc-server.js:275:21)
    at EventEmitter.emit (events.js:194:13)
    at WebContents.<anonymous> (/tmp/.mount_nrfconNHk6h0/resources/electron.asar/browser/api/web-contents.js:418:21)
    at WebContents.emit (events.js:194:13)

    I've been waiting a couple hours for it to finish the full download and it's still going - perhaps you should put a progress bar and some numbers in the client?

Children
No Data
Related