Hi All,

  1. Currently using default firmware I’m able to send AT commands using USB, but not Uart. Is it that I need to flash using at_client only I’m able to use Uart?

  2. What are the steps to send data using http by AT command? I want to use NB-iot. I couldn’t find an example of doing so. I want to test the network first without changing any firmware.

Please help.

Thanks,
Rezan

    mrezan Currently using default firmware I’m able to send AT commands using USB, but not Uart. Is it that I need to flash using at_client only I’m able to use Uart?

    It actually uses UART. You would need to re-map the AT interface to another set of pins using an overlay.

    mrezan What are the steps to send data using http by AT command? I want to use NB-iot. I couldn’t find an example of doing so. I want to test the network first without changing any firmware.

    The default firmware doesn’t support HTTP. I think the SLM though does. https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/README.html

      10 days later

      jaredwolff

      Hi Jaredwolff,

      Thanks. Does SLM support NBIOT network too? Sorry I’m still new with this and trying to understand it.

      Thanks,
      Rezan

        I tried to compile the serial_LTE_modem, but I got this error:

        C:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem>west build -b circuitdojo_feather_nrf9160ns -p
        -- west build: making build dir C:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem\build pristine
        -- west build: generating a build system
        Loading Zephyr default modules (Zephyr base).
        -- Application: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem
        -- Using NCS Toolchain 2.3.0 for building. (C:/Nordic_Semi/ncs/toolchains/v2.3.0/cmake)
        -- Found Python3: C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
        -- Cache files will be written to: C:/Nordic_Semi/ncs/v2.3.0/zephyr/.cache
        -- Zephyr version: 3.2.99 (C:/Nordic_Semi/ncs/v2.3.0/zephyr)
        -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
        CMake Warning at C:/Nordic_Semi/ncs/v2.3.0/zephyr/cmake/modules/boards.cmake:80 (message):
          Deprecated BOARD=circuitdojo_feather_nrf9160ns name specified, board
          automatically changed to: circuitdojo_feather_nrf9160_ns.
        Call Stack (most recent call first):
          C:/Nordic_Semi/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
          C:/Nordic_Semi/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
          C:/Nordic_Semi/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
          CMakeLists.txt:9 (find_package)
        
        
        -- Board: circuitdojo_feather_nrf9160_ns
        -- Found host-tools: zephyr 0.15.2 (C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
        -- Found toolchain: zephyr 0.15.2 (C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
        -- Found Dtc: C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
        -- Found BOARD.dts: C:/Nordic_Semi/ncs/v2.3.0/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns.dts
        -- Generated zephyr.dts: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/build/zephyr/zephyr.dts
        -- Generated devicetree_generated.h: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/build/zephyr/include/generated/devicetree_generated.h
        -- Including generated dts.cmake file: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/build/zephyr/dts.cmake
        
        warning: Experimental symbol TFTP_LIB is enabled.
        
        
        warning: Experimental symbol HTTP_CLIENT is enabled.
        
        
        C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/prj.conf:113: warning: attempt to assign the value 'y' to the undefined symbol PDN_SYS_INIT
        Parsing C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/Kconfig
        Loaded configuration 'C:/Nordic_Semi/ncs/v2.3.0/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns_defconfig'
        Merged configuration 'C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/prj.conf'
        
        error: Aborting due to Kconfig warnings
        
        CMake Error at C:/Nordic_Semi/ncs/v2.3.0/zephyr/cmake/modules/kconfig.cmake:328 (message):
          command failed with return code: 1
        Call Stack (most recent call first):
          C:/Nordic_Semi/ncs/v2.3.0/nrf/cmake/modules/kconfig.cmake:29 (include)
          C:/Nordic_Semi/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
          C:/Nordic_Semi/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
          C:/Nordic_Semi/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
          CMakeLists.txt:9 (find_package)
        
        
        -- Configuring incomplete, errors occurred!
        FATAL ERROR: command exited with status 1: 'C:\Nordic_Semi\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=C:\Nordic_Semi\ncs\toolchains\v2.3.0\opt\bin\python.exe' '-BC:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem\build' -GNinja -DBOARD=circuitdojo_feather_nrf9160ns '-SC:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem'

        Even I have added the overlay file:
        C:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem\boards\circuitdojo_feather_nrf9160ns.overlay

        I use latest nrfConnect v2.3.0.
        If I use 1.4.1 I have no problem to compile.

        Best Regards,
        Rezan

          The overlay should be circuitdojo_feather_nrf9160_ns (that last underscore is critical)
          Looks like the error is complaining about PDN_SYS_INIT is that something you’re trying to add to the sample? Or maybe you haven’t updated to the latest version of Zephyr/NCS? west update should download and get you the latest (or Zephyr Tools: Update Dependencies if you’re using my extension)

            jaredwolff

            I’ve changed the overlay file, still the same.

            No. I’m not adding anything yet except the overlay file. After the west update is still the same.

            Best Regards,
            Rezan

              jaredwolff

              here:

              C:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem>west build -b circuitdojo_feather_nrf9160_ns -p
              -- west build: generating a build system
              Loading Zephyr default modules (Zephyr base).
              -- Application: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem
              -- Using NCS Toolchain 2.3.0 for building. (C:/Nordic_Semi/ncs/toolchains/v2.3.0/cmake)
              -- Found Python3: C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
              -- Cache files will be written to: C:/Nordic_Semi/ncs/v2.3.0/zephyr/.cache
              -- Zephyr version: 3.2.99 (C:/Nordic_Semi/ncs/v2.3.0/zephyr)
              -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
              -- Board: circuitdojo_feather_nrf9160_ns
              -- Found host-tools: zephyr 0.15.2 (C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
              -- Found toolchain: zephyr 0.15.2 (C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
              -- Found Dtc: C:/Nordic_Semi/ncs/toolchains/v2.3.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
              -- Found BOARD.dts: C:/Nordic_Semi/ncs/v2.3.0/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns.dts
              -- Found devicetree overlay: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/boards/circuitdojo_feather_nrf9160_ns.overlay
              'tx-pin' is marked as deprecated in 'properties:' in C:/Nordic_Semi/ncs/v2.3.0/zephyr/dts/bindings\serial\nordic,nrf-uarte.yaml for node /soc/peripheral@40000000/uart@9000.
              'rx-pin' is marked as deprecated in 'properties:' in C:/Nordic_Semi/ncs/v2.3.0/zephyr/dts/bindings\serial\nordic,nrf-uarte.yaml for node /soc/peripheral@40000000/uart@9000.
              -- Generated zephyr.dts: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/build/zephyr/zephyr.dts
              -- Generated devicetree_generated.h: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/build/zephyr/include/generated/devicetree_generated.h
              -- Including generated dts.cmake file: C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/build/zephyr/dts.cmake
              
              warning: Experimental symbol TFTP_LIB is enabled.
              
              
              warning: Experimental symbol HTTP_CLIENT is enabled.
              
              
              C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/prj.conf:113: warning: attempt to assign the value 'y' to the undefined symbol PDN_SYS_INIT
              Parsing C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/Kconfig
              Loaded configuration 'C:/Nordic_Semi/ncs/v2.3.0/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns_defconfig'
              Merged configuration 'C:/Nordic_Semi/ncs/v2.3.0/nrf/applications/serial_lte_modem/prj.conf'
              
              error: Aborting due to Kconfig warnings
              
              CMake Error at C:/Nordic_Semi/ncs/v2.3.0/zephyr/cmake/modules/kconfig.cmake:328 (message):
                command failed with return code: 1
              Call Stack (most recent call first):
                C:/Nordic_Semi/ncs/v2.3.0/nrf/cmake/modules/kconfig.cmake:29 (include)
                C:/Nordic_Semi/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
                C:/Nordic_Semi/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
                C:/Nordic_Semi/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
                CMakeLists.txt:9 (find_package)
              
              
              -- Configuring incomplete, errors occurred!
              FATAL ERROR: command exited with status 1: 'C:\Nordic_Semi\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=C:\Nordic_Semi\ncs\toolchains\v2.3.0\opt\bin\python.exe' '-BC:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem\build' -GNinja -DBOARD=circuitdojo_feather_nrf9160_ns '-SC:\Nordic_Semi\ncs\v2.3.0\nrf\applications\serial_lte_modem'

                Not sure, what your overlay contains.

                Using “boards/circuitdojo_feather_nrf9160_ns.overlay” with:

                /	{
                
                	chosen {
                		ncs,slm-uart = &uart0;
                	};
                
                };

                and “boards/circuitdojo_feather_nrf9160_ns.conf”:

                # GPS Antenna configuration
                CONFIG_MODEM_ANTENNA=y
                CONFIG_MODEM_ANTENNA_AT_COEX0="AT\%XCOEX0=1,1,1565,1586"
                
                # Configuration related to external sensors.
                CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
                CONFIG_UART_0_NRF_HW_ASYNC=y
                CONFIG_SLM_WAKEUP_PIN=26

                works with NCS-2.3.0 “on my machine”.

                (I didn’t test, if it runs on the feather, but it compiles/builds. The UART/WAKEUP PIN may require more attention.)

                  AchimKraus

                  my overlay file:

                  &uart0 {
                  status = "okay";
                  current-speed = <115200>;
                  tx-pin = <24>;
                  rx-pin = <23>;
                  };

                  can you share your full overlay file?

                    That is the full overlay file.
                    It must be saved in the “boards” folder of the SLM application with the board’s name. It chose uart0 for “ncs,slm-uart” and that’s, what the app needs. Also the project conf file must be saved in that folder and must be named according the board.

                      Again, your prj.conf is trying to activate PDN_SYS_INIT which is not a valid configuration variable in NCS 2.3.

                      If you run git diff I bet it has some changes in there that maybe didn’t get updated/reset when you changed to 2.3?

                      If you do a west forall -c "git reset --hard" it should clear out any modifications. I’ve had issues like this where I was syncing Zephyr across different machines and lead to a ton of modified files (I was switching between versions which lead to it). You can also delete all the folders and west update again to re-download. (accomplishes the same thing as the above command.)

                      Btw, you will lose any changes you’ve made to the samples so be aware of this before you do any of the above!

                      Hope that helps.

                      P.S. Thanks AchimKraus for helping 🙂

                        jaredwolff AchimKraus

                        After I followed your advice, I managed to compile it and load it to the board. But I have another problem, it won’t reply to my AT command. I use USB.

                        What I did is run this command: west forall -c "git reset --hard"
                        Then edit \nrf\west.yml:
                        Remotes section add:

                        name: circuitdojo
                        url-base: https://github.com/circuitdojo

                        projects section add:

                        name: nfed
                        repo-path: nrf9160-feather-examples-and-drivers
                        revision: v1.4.x
                        path: nfed
                        remote: circuitdojo

                        Then follow AchimKraus on .overlay file and .conf file.

                          I’ve tested the “serial_lte_modem” app. It “works on my machine with my feather”.

                          nRF9160-feather v5,
                          NCS-2.3.0, the board specific overlay and conf as above (no change for uart0 in the device tree).
                          Connected via USB.
                          nRF connect / LTE Link Monitor v2.0.3.

                          The serial lte modem app enables the http-client by default.

                            mrezan you’re calling out the wrong version of NFED. It should be 2.3.x

                            revision: v1.4.x

                            Should be

                            revision: v2.3.x

                            Can you share where you’re getting the information you’re using to edit the manifest? Sparkfun’s tutorial? If so, they’re out of date and not supported. Only supported documentation is on https://docs.jaredwolff.com/ (You can use the setup documentation for the nRF9160 Feather for the Thing Plus.)

                              AchimKraus jaredwolff
                              I’ve changed to: revision: v2.3.x

                              It still not communicate with my USB.
                              How to change the uart pin to using TX and RX pin that compatible with this version?
                              I did this:

                              &uart0 {
                              status = "okay";
                              current-speed = <115200>;
                              tx-pin = <24>;
                              rx-pin = <23>;
                              }; 

                              But have error during build.

                                Do you use a nRF9160 feather v5? Or which board?
                                It doesn’t help to route tx/rx to 24/23, because the USB chip on the feather v5 is routed to 6/5.
                                Let me recommend, that you try to start with one of the samples provided for your board. Enable the logging and see, if that shows up in serial terminal. If so, the board definition is already the right one. Then you mainly need to adjust the “chosen ncs,slm-uart”.

                                Anyway, it’s a waste of time, if you don’t provide the basic information, which board you’re using. So, please, only waste your time by randomly trying the pins. In one or two months I guess you will have tried all combinations ;-).

                                  AchimKraus

                                  I use “Sparkfun Thing Plus nRF9160”

                                  with ncs version 1.4.1 and 1.7.0 it can works by usb or uart 24/23.

                                  I’ll try remove and redownload this ncs 2.3.0 to see able to solve or not.

                                  jaredwolff

                                  Can you share where you’re getting the information you’re using to edit the manifest? Sparkfun’s tutorial?

                                  Yes from there.

                                    Both board-definitions have 3 UARTs. One UART is connected to the onboard USB chip, that seems to be the UART0 with pin 6/5. Additionally the board definitions use an optional UART2 with pin 24/23 as TTL UART routed to the headers.
                                    If you want to use the onboard USB, use UART0, otherwise UART2 with an external TTL3V/USB-Serial. But I don’t see, that this requires to define the PINs. What is required for UART2 is to set the status and baudrate in the overlay:

                                    &uart2 {
                                    status = “okay”;
                                    current-speed = <115200>;
                                    };

                                    (Not sure, which board definition you are using. The names of the board specific project files must be the same, e.g. “sparkfun_thing_plus_nrf9160_ns”)
                                    I’m not sure, if enabling UART2 requires to disable something else.
                                    I used UART0 and the onboard USB.


                                      Since the Sparkfun board is based off of the nRF9169 Feather, the USB-UART pins are the same. There’s no reason to re-map them.

                                      By the way if you are loading via the bootloader with the latest NCS your apps will not boot due to changes in the bootloader. You may have to flash it directly with a nRF53 board (or similar) using the 10 pin header. Or stick with the older deprecated SDK version.

                                        Terms and Conditions | Privacy Policy