• Support
  • All AT Commands time out in LTE link monitor

Just received my nRF9160 Feather and am trying to access AT commands to check things out but having all sorts of problems (perhaps just cockpit errors)

I assumed (perhaps incorrectly?) that I needed to load the at-client-v1.3.2.bin to do this. I set up newtmgr and loaded the at-client binary from the download section. LTE link monitor connects but all commands time out.
Hitting the reset button on the feather doesn’t appear to do anything.

I downloaded the blinky-v1.3.2.bin and loaded that via newtmgr and although it loaded without errors, there is no blinking of any LEDs going on…

I found a post that indicated that the firmware installed at the factory will output the accelerometer readings but since I reloaded the board I no longer have that firmware installed. Is there a place where I can download that firmware to load with newtmgr to at least ensure that I have basic sanity on the board? If I do install that, what baud rate do I use when connecting a serial terminal to the board?

Thanks, Kurt V

  • jaredwolff replied to this.
  • jaredwolff Found the problem! I instrumented the is_cloned() call (which was the check that leads to the call to the default load that throws the exception). It calls a git() method that constructs a git command line that it uses to determine if the build is being run in a cloned repo. When I printed the return from the git command I saw it failed with the following:

    git res = CompletedProcess(args=[‘git’, ‘rev-parse’, ‘–show-cdup’], returncode=1, stdout=b’', stderr=b’xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n’)

    I’m running OS X Big Sur and apparently my command line tools license was not active (I know I activated it after I installed Big Sur). Ran the following:
    $ xcode-select --install
    After the install completed, I’m now able to successfully build the sample code!
    Thanks for your help and patience Jared. I’m hoping that with all of this up front hassle everything else is now going to be a breeze!

    Kurt

    kava60 Hey Kurt

    kava60 I found a post that indicated that the firmware installed at the factory will output the accelerometer readings but since I reloaded the board I no longer have that firmware installed. Is there a place where I can download that firmware to load with newtmgr to at least ensure that I have basic sanity on the board?

    Give this guy a whirl. You’ll need to use newtmgr to load it.

    https://community.jaredwolff.com/assets/files/2021-05-16/1621201946-606027-testbin.zip

    If I do install that, what baud rate do I use when connecting a serial terminal to the board?

    When connecting to view you’ll want to use 115200. The transfer speed though is 1M BAUD.

    I also recommend you build the examples from nfed.

    If you haven’t already, you can set up your SDK using nRF Connect Desktop. Here are the instructions:

    Thanks

    Jared

      Thanks Jared. I loaded that test.bin to the feather and it now is flashing its blue LED. When I connect my serial monitor it doesn’t look like things are going too well. Here is the start of the boot:

      [00:00:00.211,090] <inf> lis2dh: bus=I2C_1 fs=2, odr=0×1 lp_en=0×0 scale=9576
      *** Booting Zephyr OS build v2.4.99-ncs1 ***
      [00:00:00.231,872] <inf> app: Start of Pyrinas Hub example!
      [00:00:00.237,854] <inf> test_uart: evt: 3
      [00:00:00.242,401] <inf> test_uart: evt: 6
      [00:00:00.246,887] <inf> test_uart: stopped. buf null
      [[00:00:00.252,502] <inf> test_uart: evt: 6
      [00:00:00.257,019] <inf> test_uart: stopped. buf null
      [00:00:00.262,542] <inf> test_uart: evt: 4

      … this sort of chatter repeats until about 3 seconds in and then I see this (the ‘not able to allocate UART buffer’ then pours out of the device from then forward)

      00:00:02.996,429] <inf> test_uart: evt: 5
      [00:00:03.001,007] <wrn> test_uart: Not able to allocate UART receive buffer (disabled)
      ame is PCF85063A
      [00:00:03.012,603] <inf> rtc: mode 0×16
      [00:00:03.017,395] <inf> app: Area 0 at 0×0 on W25Q32JV for 33554432 bytes
      [00:00:03.024,658] <inf> littlefs: LittleFS version 2.2, disk version 2.0
      [00:00:03.032,928] <inf> littlefs: FS at W25Q32JV:0×0 is 8192 0×1000-byte blocks with 512 cycle
      [00:00:03.042,022] <inf> littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
      [00:00:03.050,079] <inf> littlefs: /lfs mounted
      [00:00:03.055,023] <inf> app: /lfs mount: 0
      [00:00:03.059,875] <wrn> test_uart: Not able to allocate UART receive buffer (uart work)
      [00:00:03.069,274] <inf> app: /lfs: bsize = 16 ; frsize = 4096 ; blocks = 8192 ; bfree = 8190
      [00:00:03.078,247] <inf> app: Set up button at GPIO_0 pin 12
      [00:00:03.089,050] <inf> app: Battery: 2462 mV
      [00:00:03.095,001] <inf> app: Accel reading: #1 @ 3095 ms
      [00:00:03.118,774] <wrn> test_uart: Not able to allocate UART receive buffer (uart work)
      [00:00:03.177,673] <wrn> test_uart: Not able to allocate UART receive buffer (uart work)

      … repeats about 15 times/second until I power off the device.

      Kurt

        kava60 Hey Kurt,

        Ahh that’s right. This is the factory test image, it will barf at you because you don’t have anything connected to the UART pins. You can short the TX and RX pins together or download this pre-compiled at_client binary and load it..

        https://community.jaredwolff.com/assets/files/2021-05-17/1621218699-636557-at-client.zip

        Hopefully that will get you started! I recommend you get your SDK setup that way you can build these examples yourself.

          jaredwolff Jared,
          Thanks I’ll short those pins and try again. That link you provided above downloads something called app_update.bin (not at-client) - should I load app_update.bin?
          I originally loaded the at-client-v1.3.2.bin (the start of this post and saga) and when I connected LTE link monitor, every AT command I would issue would time out. At this point, getting the AT commands working, so I can evaluate the modem is really all I’m trying to do (for now)
          Thanks, Kurt

            jaredwolff Jared,
            Thanks! That worked. So… What is different between loading this “app_update.bin” vs my original attempt loading the at-client-v1.3.2.bin? Curious what I did wrong.
            Kurt

            jaredwolff Jared,
            Never mind - I’m guessing you just rebuilt the at-client sample and the app_update.bin was just the output of the build. I’m working my way through the development environment and building the samples.
            Kurt

              jaredwolff Jared
              Ok, so I’ve followed the instructions to set up the SDK and when I tried to build the blinky sample it fails (see output below). Sorry to be such a pest - I usually don’t have this much trouble getting going with things…
              Kurt

              macair> west build –board circuitdojo_feather_nrf9160ns -p
              – west build: making build dir /opt/nordic/ncs/v1.5.0/nfed/samples/blinky/build pristine
              – west build: generating a build system
              Including boilerplate (Zephyr base): /opt/nordic/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
              – Application: /opt/nordic/ncs/v1.5.0/nfed/samples/blinky
              – Using NCS Toolchain 1.5.0 for building. (/opt/nordic/ncs/v1.5.0/toolchain/cmake)
              – Zephyr version: 2.4.99 (/opt/nordic/ncs/v1.5.0/zephyr)
              – Found Python3: /opt/nordic/ncs/v1.5.0/toolchain/bin/python3 (found suitable exact version “3.8.2”) found components: Interpreter
              – Found west (found suitable version “0.9.0”, minimum required is “0.7.1”)
              CMake Error at /opt/nordic/ncs/v1.5.0/zephyr/cmake/zephyr_module.cmake:61 (message):
              Traceback (most recent call last):

              File "/opt/nordic/ncs/v1.5.0/zephyr/scripts/zephyr_module.py", line 378, in <module>
                main()
              File "/opt/nordic/ncs/v1.5.0/zephyr/scripts/zephyr_module.py", line 283, in main
                manifest = Manifest.from_file()
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 1084, in from_file
                return Manifest(**kwargs)
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 1273, in __init__
                self._load(source_data['manifest'],
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 1527, in _load
                self._load_projects(manifest, url_bases, defaults, ctx)
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 1859, in _load_projects
                self._import_from_project(project, imp, ctx)
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 2047, in _import_from_project
                self._import_path_from_project(project, imap.file,
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 2059, in _import_path_from_project
                imported = self._import_content_from_project(project, path)
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 2122, in _import_content_from_project
                content = self._importer(project, path)
              File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 176, in _default_importer
                raise ManifestImportFailed(project, file)

              west.manifest.ManifestImportFailed: ManifestImportFailed: project <Project
              zephyr (‘/opt/nordic/ncs/v1.5.0/zephyr’) at v2.4.99-ncs1> file west.yml

              Call Stack (most recent call first):
              /opt/nordic/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake:183 (include)
              /opt/nordic/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
              /opt/nordic/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
              CMakeLists.txt:4 (find_package)

              – Configuring incomplete, errors occurred!
              FATAL ERROR: command exited with status 1: /opt/nordic/ncs/v1.5.0/toolchain/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/v1.5.0/toolchain/bin/python3 -B/opt/nordic/ncs/v1.5.0/nfed/samples/blinky/build -S/opt/nordic/ncs/v1.5.0/nfed/samples/blinky -GNinja -DBOARD=circuitdojo_feather_nrf9160ns

                kava60 hmmm. Haven’t seen this one before. Are you doing this from a CLI that you opened with nRF Connect? Alternatively you can also run this and it will do the same thing:

                export PATH=/opt/nordic/ncs/v1.5.0/toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ; export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb ; export GIT_EXEC_PATH=/opt/nordic/ncs/v1.5.0/toolchain/Cellar/git/2.26.2/libexec/git-core ; export GNUARMEMB_TOOLCHAIN_PATH=/opt/nordic/ncs/v1.5.0/toolchain ; clear⏎

                I keep these commands in a file called setenv and then when I want to set my environment I simply run

                source setenv

                This will set the environment variables which may be causing this weirdness.

                You may also have a malformed west.yml. Did you only make the necessary edits to add NFED? Did you have any issues when you ran west update?

                  jaredwolff I am running this in the terminal/shell that opens from the nRF connect toolchain manager. I did make the edits to add NFED and didn’t see any errors when I ran west update after making the changes to west.yml.

                  I think I’ll see if there is a way to blow away the SDK and reinstall it again to see if that clears up the problem.

                  Kurt

                    jaredwolff I removed the SDK, reinstalled, modified west.yml and west update. Then tried building the sample again. Same problem. It kind of looks like the failure is because there is a ‘_default_importer’ method that is the default callback invoked when “the source file requires importing manifest data that aren’t found locally”. The default one simply throws the exception. From looking at the API, it looks like the caller of the Manifest API is supposed to provide an ‘importer’ callback if they expect to handle this case (manifest data not found locally). Apparently there isn’t one provided in this case, so the exception is thrown. I’ll keep working my way back from this info to see if I can tell why this is happening. I’m guessing this must be some sort of environmental issue on my system… Sigh.

                    Kurt

                      kava60 yea it’s likely some type of environment issue. As long as you open a terminal from nRF Connect Desktop or overwrite your path with he commands I gave you earlier it should just work. I’m assuming you have Python installed elsewhere? Do you have any of the Zephyr SDK tools installed? west cmake ninja?

                        kava60 also are you doing this within an editor like VSCode? The editor tends to muck with your environment variables as well.

                          jaredwolff I do have make installed on my Mac; I have a /usr/local/bin/cmake which reports version 3.19.1. Likely a requirement for something else I develop with. When I do a which cmake in the terminal window created from nRF connect desktop toolchain manager, it reports: /opt//nordic/ncs/v1.5.0/toolchain/bin/cmake so I don’t think it is getting the /usr/local/bin/cmake that is installed on my Mac. A which on west and ninja also reports the same path under /opt/nordic/ncs/v1.5.0/toolchain/bin.

                          As for your second question - no, I’m not running any of this in an IDE, just at the shell prompt in the terminal window that is opened (with the correct environment setup) from the nRF connect desktop…

                          Kurt

                          jaredwolff also, just in case I did a chmod -x on my /usr/local/bin/cmake and tried again - same failure so we can rule out the cmake I have installed on my Mac…
                          Kurt

                          jaredwolff in case it is useful, doing a west config -l reports the following:

                          manifest.path=nrf
                          manifest.file=west.yml
                          zephyr.base=zephyr

                          That looks ok.

                          Maybe it’s a weird permissions issue in your /opt/nordic folder? My folder is owned by my user in OS X.

                          /opt/nordic 
                          ❯ ls -la
                          total 24
                          drwxrwsr-t  4 root        staff   128 Dec 18 22:53 ./
                          drwxr-xr-x  4 root        wheel   128 Jan 24 00:27 ../
                          -rw-r--r--@ 1 jaredwolff  staff  8196 May  3 10:25 .DS_Store
                          drwxr-xr-x  7 jaredwolff  staff   224 May  3 10:26 ncs/
                          /opt🔒 
                          ❯ ls -la
                          total 0
                          drwxr-xr-x   4 root  wheel  128 Jan 24 00:27 ./
                          drwxr-xr-x  22 root  admin  704 May 13 23:41 ../
                          drwxrwsr-t   4 root  staff  128 Dec 18 22:53 nordic/
                          drwxr-xr-x   4 root  wheel  128 Jan 24 00:27 vagrant/

                          Is there anything in your opt folder that could have changed things up?

                          Also, are you using a newer M1 Mac or Intel based?

                            Terms and Conditions | Privacy Policy