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

https://nordicsemiconductor.github.io/asset-tracker-cloud-docs/v1.5.x/docs/aws/GettingStarted/Flashing.html

Hello, the directions indicate that it is possible to use Windows Subsystem for Linux, and you instruct us to use version 2 of WSL, but I have no access to the COM ports so I cannot flash from WSL -- a severe inconvenience. I read somewhere that only WSL 1 allows access to COM ports. What gives here?

  • Anyway, this is the page I mean: System requirements — Asset Tracker Cloud Example 1c21a7deb7914b547791f76e6c2b75d7f43ba2f0 documentation (nordicsemiconductor.github.io). It does not explicitly say anything about WSL 2, and I don't know what made me upgrade my WSL 1 other than when I went to the referenced Microsoft page, I thought of it as an update/upgrade, similar to any other Windows update. MS only tells you how fast it is -- nothing about how they dropped capabilities. So I'm just suggesting that you warn users on the page I mention.

  • Hi Markus,

    I verified that the at_client that I find under cat_tracker_aws, the one for DK, i.e., cat-tracker-aws/node_modules/@nordicsemiconductor/firmware-ci-device-helpers/at_client/91dk_at_client_increased_buf.hex, will not function...SCRATCH THAT, it works fine, I had to close Teraterm. Question is, should I open a new ticket if I cannot use node cli flash even though that at_client is not the problem, rather than using this ticket? I had nothing like Teraterm running when I tried to use node cli flash on Linux.

  • Holy Crap! -- I was able to get that nasty "node cli flash" to work in the msys2 bash environment I start from ToolChain manager. One stumbling block was JLinkExe. They really mean JLinkExe.exe and not JLink.exe. Apparently the SEGGER folks never heard of Java and the JLink command in the Java JDK, etc. I copied SEGGER's JLink.exe to JLinkEXE.exe in directory ~/bin after creating ~/bin as I noticed that directory was in my PATH. Then I just needed to export my correct AWS credentials and I was ready to run the command. I put the certificates into slot 43 and verified afterwards with an AT_Client+LTE Link Monitor that they got there.

    However, nothing doing when I try this from a Windows console, can you tell me what is wrong?

    C:\Users\Burt\cat-tracker-aws>node cli flash --dk -p COM10 -s 44 --debug -f "/c/ncs/v1.5.0/nrf/applications/asset_tracker_v2/build/zephyr/merged.hex" 352656100392227
    An unhandled exception occured!
    Exception origin: "uncaughtException"
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:329:5)
    at validateString (node:internal/validators:129:11)
    at Object.resolve (node:path:147:9)
    at Object.<anonymous> (C:\Users\Burt\cat-tracker-aws\dist\cli\commands\flash.js:17:28)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (C:\Users\Burt\cat-tracker-aws\dist\cli\cli.js:24:17)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19) {
    code: 'ERR_INVALID_ARG_TYPE'
    }

    It is really good that the bash shell works. If someone builds using WSL 2, they can then set up cat-tracker-aws in their bash environment, copy the certificate directory from their WSL and their AWS key/secret key also, and make progress. Assuming they have a complete set of directions in the documentation. Well, I guess not really, it was a fun experiment, but it would be quicker to do the old fashioned annoying process with Programmer and LTE Link Monitor.

    And then there is always GitHub - inductivekickback/cred: A command line tool for writing credentials to nRF91 devices via the SWD interface which is what I was trying to think of earlier.

  • Nice digging into this, I will keep an eye on the issue reports around the flash command ... and eventually provide an alternative using nrfjprog.

    The issue you ran into was caused a poor home directory detection, and is fixed here: https://github.com/NordicSemiconductor/asset-tracker-cloud-aws-js/commit/0924c0f0220fcd7d7dca7fc0ec9b16dbebd4381c

    A fix release will be available shortly.

  • Nice Windows fix -- that error disappeared after I updated. I guess I will close this ticket now. Thanks again, Markus.

Related