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

nRF9160 at_client sample project

After much work I can build the nRF9160 at_client sample project and flash it into the development kit. Using nRF Connect, the at_client sample project  only prints the line "The AT host sample started" as per the source code (shouldn't this be "AT client sample started"?).  AT commands entered into nRF Connect timeout with no response.  Inspecting the file main.c of at_client and there is no code to read the UART and no code to parse AT commands.  I have flashed an at_client.hex file supplied by Nordic and that firmware does respond to AT commands.

Is something missing from the at_client sample project?  I would need to modify the firmware so that it can switch the UART to a data mode upon registration with the LTE data network. In order to do this I need access to the UART and AT command handlers. How do I get this and the source for the working at_client.hex file?

I'm evaluating the nRF9160 for a project and need confirmation that it can work.

Thanks

Parents
  • Due to Easter Holiday, our support team has not been fully staffed. We apologize for the late answer, and any inconvenience this may have caused.


    Hello, 

    What version of the nRF Connect SDK are you using? When was the last time you updated the nRF Connect SDK (NCS) code? Please ensure you are using the latest version of NCS. How old is the at_client.hex file you received?

    For convenience, please update your modem FW to the latest version. Click here to go to the nRF9160 download page, and scroll to nRF9160 Modem Firmware and Modem DFU Tool.


    Thanks!

    Kind regards,
    Øyvind

  • I'm using nRF Connect v2.6.2 and cloned the SDK on 4/11 and again on 4/18 with no different results. Is there a file with the installed version?

    On the repository at_client main.c tagged v0.3.0 has references to functions at_host_init() and at_host_process() which were removed from the latest SDK. This looks like the reason the latest at_client is broken.

  • Can you please try to run the attached file?
    uicr_tcxo.hex

    nrfjprog.exe --program uicr_tcxo.hex -f nrf91 --sectorerase --verify

    Discussing the issue with my colleague, he mentioned that it could be an issue with the 32 MHz temperature compensated crystal oscillator (TCXO) register.

  • A sim card had been inserted and it worked with s Nordic supplied file at_client.hex.

    I erased flash then flashed file uicr_txco.hex, ran it, then flashed the built code. No AT commands.

    File prj.conf has the line CONFIG_AT_HOST_LIBRARY=y plus several other AT related lines. After a Clean Solution followed by Build Solution no AT* files are built.  See the attached build log.

    What is the search path for  modules referenced in prj.conf ?

    Building �zephyr/include/generated/driver-validation.h� from solution �build� in configuration �Common�
    1> Combining �zephyr/include/generated/driver-validation.h�
    Building �zephyr/CMakeFiles/driver_validation_h_target� from solution �build� in configuration �Common�
    Building �zephyr/driver_validation_h_target� from solution �build� in configuration �Common�
    Building �zephyr/include/generated/kobj-types-enum.h� from solution �build� in configuration �Common�
    1> Combining �zephyr/include/generated/kobj-types-enum.h�
    Building �zephyr/include/generated/otype-to-str.h� from solution �build� in configuration �Common�
    Building �zephyr/CMakeFiles/kobj_types_h_target� from solution �build� in configuration �Common�
    Building �zephyr/kobj_types_h_target� from solution �build� in configuration �Common�
    Building �zephyr/misc/generated/syscalls.json� from solution �build� in configuration �Common�
    1> Combining �zephyr/misc/generated/syscalls.json�
    Building �zephyr/include/generated/syscall_list.h� from solution �build� in configuration �Common�
    1> Combining �zephyr/include/generated/syscall_list.h�
    Building �zephyr/CMakeFiles/syscall_list_h_target� from solution �build� in configuration �Common�
    Building �zephyr/include/generated/syscall_dispatch.c� from solution �build� in configuration �Common�
    Building �zephyr/syscall_list_h_target� from solution �build� in configuration �Common�
    Building �zephyr/include/generated/syscall_macros.h� from solution �build� in configuration �Common�
    1> Combining �zephyr/include/generated/syscall_macros.h�
    Building �zephyr/CMakeFiles/syscall_macros_h_target� from solution �build� in configuration �Common�
    Building �zephyr/syscall_macros_h_target� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_offsets� from solution �build� in configuration �Common�
    Building �zephyr/offsets� from solution �build� in configuration �Common�
    1> Compiling �offsets.c�
    Building �zephyr/include/generated/offsets.h� from solution �build� in configuration �Common�
    1> Combining �zephyr/include/generated/offsets.h�
    Building �zephyr/CMakeFiles/offsets_h� from solution �build� in configuration �Common�
    Building �zephyr/offsets_h� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_app� from solution �build� in configuration �Common�
    Building �app/libapp.a� from solution �build� in configuration �Common�
    1> Compiling �main.c�
    Building �cmake_object_order_depends_target_zephyr� from solution �build� in configuration �Common�
    1> Archiving �libapp.a�
    Building �zephyr/libzephyr.a� from solution �build� in configuration �Common�
    1> Compiling �isr_tables.c�
    2> Compiling �sw_isr_common.c�
    3> Compiling �arm_core_cmse.c�
    4> Compiling �crc32_sw.c�
    4> Compiling �crc16_sw.c�
    1> Compiling �crc8_sw.c�
    2> Compiling �crc7_sw.c�
    3> Compiling �fdtable.c�
    1> Compiling �mempool.c�
    2> Compiling �rb.c�
    4> Compiling �thread_entry.c�
    3> Compiling �work_q.c�
    4> Compiling �printk.c�
    1> Compiling �assert.c�
    2> Compiling �configs.c�
    3> Compiling �soc.c�
    2> Compiling �mpu_regions.c�
    1> Compiling �system_nrf9160.c�
    4> Compiling �nrfx_glue.c�
    2> Compiling �socket_offload.c�
    1> Compiling �rand32_timer.c�
    3> Compiling �power.c�
    4> Compiling �policy_residency.c�
    2> Compiling �uart_console.c�
    1> Compiling �nrf_power_clock.c�
    3> Compiling �sys_clock_init.c�
    4> Compiling �nrf_rtc_timer.c�
    Building �cmake_object_order_depends_target_arch__arm__core� from solution �build� in configuration �Common�
    1> Archiving �libzephyr.a�
    Building �cmake_object_order_depends_target_arch__arm__core__cortex_m� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_arch__arm__core__cortex_m__mpu� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_drivers__gpio� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_drivers__serial� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_kernel� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_lib__libc__minimal� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_subsys__net� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_subsys__net__ip� from solution �build� in configuration �Common�
    Building �zephyr/linker.cmd� from solution �build� in configuration �Common�
    1> Combining �zephyr/linker.cmd�
    Building �zephyr/CMakeFiles/linker_script_target� from solution �build� in configuration �Common�
    Building �zephyr/linker_script_target� from solution �build� in configuration �Common�
    Building �cmake_object_order_depends_target_zephyr_prebuilt� from solution �build� in configuration �Common�
    Building �zephyr/arch/arm/core/libarch__arm__core.a� from solution �build� in configuration �Common�
    1> Assembling �swap_helper.S�
    2> Assembling �exc_exit.S�
    3> Assembling �cpu_idle.S�
    4> Assembling �fault_s.S�
    1> Assembling �isr_wrapper.S�
    2> Compiling �irq_init.c�
    3> Compiling �swap.c�
    4> Compiling �fault.c�
    1> Compiling �irq_manage.c�
    2> Compiling �thread.c�
    3> Compiling �fatal.c�
    4> Compiling �sys_fatal_error_handler.c�
    1> Compiling �thread_abort.c�
    Building �zephyr/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a� from solution �build� in configuration �Common�
    1> Archiving �libarch__arm__core.a�
    2> Assembling �vector_table.S�
    3> Assembling �reset.S�
    4> Assembling �nmi_on_reset.S�
    1> Compiling �prep_c.c�
    2> Compiling �scb.c�
    3> Compiling �nmi.c�
    4> Compiling �exc_manage.c�
    Building �zephyr/arch/arm/core/cortex_m/mpu/libarch__arm__core__cortex_m__mpu.a� from solution �build� in configuration �Common�
    1> Archiving �libarch__arm__core__cortex_m.a�
    2> Compiling �arm_core_mpu.c�
    3> Compiling �arm_mpu.c�
    Building �zephyr/lib/libc/minimal/liblib__libc__minimal.a� from solution �build� in configuration �Common�
    1> Archiving �libarch__arm__core__cortex_m__mpu.a�
    2> Compiling �atoi.c�
    3> Compiling �strtol.c�
    4> Compiling �strtoul.c�
    1> Compiling �malloc.c�
    2> Compiling �strncasecmp.c�
    3> Compiling �strstr.c�
    4> Compiling �string.c�
    1> Compiling �prf.c�
    3> Compiling �stdout_console.c�
    2> Compiling �sprintf.c�
    4> Compiling �fprintf.c�
    Building �zephyr/subsys/net/libsubsys__net.a� from solution �build� in configuration �Common�
    1> Archiving �liblib__libc__minimal.a�
    2> Compiling �buf.c�
    Building �zephyr/subsys/net/ip/libsubsys__net__ip.a� from solution �build� in configuration �Common�
    1> Archiving �libsubsys__net.a�
    2> Compiling �net_context.c�
    3> Compiling �net_core.c�
    4> Compiling �net_if.c�
    1> Compiling �net_pkt.c�
    3> Compiling �net_tc.c�
    1> Compiling �utils.c�
    2> Compiling �icmpv6.c�
    3> Compiling �nbr.c�
    2> Compiling �ipv6.c�
    4> Compiling �ipv6_nbr.c�
    1> Compiling �ipv6_mld.c�
    3> Compiling �route.c�
    2> Compiling �connection.c�
    1> Compiling �udp.c�
    Building �zephyr/drivers/gpio/libdrivers__gpio.a� from solution �build� in configuration �Common�
    1> Archiving �libsubsys__net__ip.a�
    2> Compiling �gpio_nrfx.c�
    Building �zephyr/drivers/serial/libdrivers__serial.a� from solution �build� in configuration �Common�
    1> Archiving �libdrivers__gpio.a�
    2> Compiling �uart_nrfx_uarte.c�
    Building �zephyr/kernel/libkernel.a� from solution �build� in configuration �Common�
    1> Archiving �libdrivers__serial.a�
    2> Compiling �device.c�
    3> Compiling �errno.c�
    4> Compiling �idle.c�
    1> Compiling �init.c�
    2> Compiling �mailbox.c�
    3> Compiling �mem_slab.c�
    4> Compiling �mempool.c�
    1> Compiling �msg_q.c�
    2> Compiling �mutex.c�
    3> Compiling �pipes.c�
    4> Compiling �queue.c�
    1> Compiling �sched.c�
    2> Compiling �sem.c�
    4> Compiling �stack.c�
    3> Compiling �system_work_q.c�
    2> Compiling �thread.c�
    4> Compiling �thread_abort.c�
    3> Compiling �version.c�
    1> Compiling �work_q.c�
    3> Compiling �smp.c�
    4> Compiling �timeout.c�
    2> Compiling �timer.c�
    3> Compiling �poll.c�
    1> Archiving �libkernel.a�
    Building �zephyr/zephyr_prebuilt.elf� from solution �build� in configuration �Common�
    1> Compiling �empty_file.c�
    1> Linking �zephyr_prebuilt.elf�
    1> Memory region         Used Size  Region Size  %age Used
    1>            FLASH:       49476 B         1 MB      4.72%
    1>             SRAM:       20084 B        64 KB     30.65%
    1>         IDT_LIST:          72 B         2 KB      3.52%
    Building �zephyr/linker_pass_final.cmd� from solution �build� in configuration �Common�
    1> Combining �zephyr/linker_pass_final.cmd�
    Building �zephyr/CMakeFiles/linker_pass_final_script_target� from solution �build� in configuration �Common�
    Building �zephyr/linker_pass_final_script_target� from solution �build� in configuration �Common�
    Building �zephyr/isr_tables.c� from solution �build� in configuration �Common�
    1> Combining �zephyr/isr_tables.c�
    Building �cmake_object_order_depends_target_kernel_elf� from solution �build� in configuration �Common�
    Building �zephyr/zephyr.elf� from solution �build� in configuration �Common�
    1> Compiling �empty_file.c�
    2> Compiling �isr_tables.c�
    1> Linking �zephyr.elf�
    1> Post-link command 
    Building �all� from solution �build� in configuration �Common�
    Build complete
    

  • Hello,

    A sim card had been inserted and it worked with s Nordic supplied file at_client.hex.

    Ok, that means that your board is working correctly and everything is as it should be. 

    I erased flash then flashed file uicr_txco.hex, ran it, then flashed the built code. No AT commands.

    Then we have excluded that issue. 

    File prj.conf has the line CONFIG_AT_HOST_LIBRARY=y plus several other AT related lines. After a Clean Solution followed by Build Solution no AT* files are built.  See the attached build log.

    I assume you are using Segger Embedded Studio due to "Clean Solution command", Therefore, I think we should move from using Segger Embedded Studio to building using command line instead, as there have been some issues with Segger Embedded Studio (that we are aware of) and the SDK. 


    Please follow this tutorial. Make sure to change the folder to \nrf\samples\nrf9160\at_client\ and delete the build folder.

    What is the search path for  modules referenced in prj.conf ?

    Have a look at this guide.

  • If  Segger Embedded Studio is not working correctly then it should be documented and corrected. When will it be corrected? Is much easier to debug code with the IDE.

    Can you provide step by step instructions for building for target nRD9160-DK via Window 10 command line?

    There is an error message on attempting to build:

    C:\Users\cwallach\Projects\Heart_Hero\LTE\ncs\nrf\samples\nrf9160\at_client\build>cmake -GNinja -DBOARD=nrf9160_pca10090 ..
    -- Using application from 'C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/nrf/samples/nrf9160/at_client'
    Zephyr version: 1.14.99
    -- Found PythonInterp: C:/Users/cwallach/AppData/Local/Programs/Python/Python37/python.exe (found suitable version "3.7.3", minimum required is "3.4")
    -- Selected BOARD nrf9160_pca10090
    -- Found west: C:/Users/cwallach/AppData/Local/Programs/Python/Python37/Scripts/west.exe (found suitable version "0.5.8", minimum required is "0.5.6")
    -- Cache files will be written to: C:\Users\cwallach\AppData\Local/.cache/zephyr
    CMake Error at C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/zephyr/cmake/generic_toolchain.cmake:57 (include):
      include could not find load file:
    
        C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/zephyr/cmake/toolchain/cgnuarmemb/generic.cmake
    Call Stack (most recent call first):
      C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/zephyr/cmake/app/boilerplate.cmake:446 (include)
      CMakeLists.txt:9 (include)
    
    
    -- Loading C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090.dts as base
    -- Overlaying C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/zephyr/dts/common/common.dts
    CMake Error at C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/zephyr/cmake/dts.cmake:131 (message):
      command failed with return code: The system cannot find the file specified
    Call Stack (most recent call first):
      C:/Users/cwallach/Projects/Heart_Hero/LTE/ncs/zephyr/cmake/app/boilerplate.cmake:493 (include)
      CMakeLists.txt:9 (include)
    
    
    -- Configuring incomplete, errors occurred!

    File LTE/ncs/zephyr/cmake/toolchain/cgnuarmemb/generic.cmake exists.

    Thanks

  • Hello,
    We are constantly working with SES and the master branch, some have it working, others have not. Do you have the latest Segger Embedded Studio (SES)?
    My colleague has SES working on Windows 10 here, please try this solution first and see if you can get that working.

    If the above does not work, we'll continue with command line. From the output you attached it seems that you have not configured the build environment correctly, see this link

    Kind regards,
    Øyvind
Reply Children
  • I am using SEGGER Embedded Studio for ARM Release 4.16  Build 2019032803.38728 Windows x64

    I had previously reinstalled the SDK with no change. On attempting a 3rd reinstall, as suggested in a message thread, an error resulted

    west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf
    West already initialized. Aborting.
    

    There is a thread suggesting removing ZEPHYR_BASE,  tried this and still got the error.

    This is ridiculous.  Why not edit ALL the steps into one document along with the exact versions of all software? Then verify it works.

    Clearly the nRF9160 was released prematurely and cannot be recommended.

  • Clearly the nRF9160 was released prematurely and cannot be recommended.
    It's unfortunate that you feel it this way, and we are sorry that you feel that it is not recommended. We are aware of the issues and are constantly working with improvements. Given that the device is so complex and more advanced than previous devices, we are working to find a good solution for customers on how to use the device. Both internally and externally. Our technical support team is not working directly with the SDK and meet the same issues as the customer meet.

    Why not edit ALL the steps into one document along with the exact versions of all software? Then verify it works.
    With the answer from above in mind, this gives us some challenges when writing tutorials. The first tutorial was written right after product announcement and has unfortunately not been updated since. This has to do with our SDK team working to find a better solution on how to reduce the complexity, and that the device is still in the public sampling stage. You can follow the status on the device here.

    This is also why we have customers register a support case with issues they are seeing with the nRF9160, so we can give feedback to the SDK team on what is working and what is not.
    When the device reaches the production state, we will have a more stable SDK and be able to write more complete tutorials. But there will be more tutorials before then.

    I had previously reinstalled the SDK with no change. On attempting a 3rd reinstall, as suggested in a message thread, an error resulted
    Great, you have initialized west presumably with the ncs folder referred to in your previous comment.
    In the command prompt, standing in the ncs folder, do the following:
    cd nrf
    
    git pull
    
    west update
    This should update to the latest. 

    To build a project using the command prompt in Windows 10, please do the following. 
    1. Move back to ncs folder
    2. Navigate to the zephyr folder
    3. In the zephyr folder, run zephyr-env.cmd
      1. This should set the correct path to your zephyr folder which is needed to build projects.
      2. Run echo %zephyr_base% to ensure the path. It should print the whole path of the zephyr folder e.g. C:\ncs\zephyr
    4. Navigate to the at_clint sample project folder: nrf\samples\nrf9160\at_client
      1. If you have any build folders in the at_client folder, please delete these.
      2. Make an empty build folder and navigate to this.
    5. Standing in the build folder, run the following
      cmake -DBOARD=nrf9160_pca10090ns -GNinja ..
      
      ninja
      
      ninja flash

      1. This will build and flash the at_client sample along with the SPM to your nRF9160.


    There is a thread suggesting removing ZEPHYR_BASE,  tried this and still got the error.
    I am not aware of this thread/suggestion, can you please provide me a link?
  • I should have been clearer. After

    mkdir ncs
    cd ncs
    west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf
    West already initialized. Aborting.
    dir
    

    No directories or files are present in the ncs directory. Nothing. A cd nrf command fails.

    Seriously, there has to be complete, tested, and verified guide with each of the steps along with exact software versions.  Fully debug the procedure. Verify it. Then compile it all into a  batch file. Verify it again. This 

    I am a software engineer with decades of experience in multiple development environments. The nrf9160 is not ready for production use.

  • CWallach said:
    I am a software engineer with decades of experience in multiple development environments. The nrf9160 is not ready for production use.

    I'm really sorry you feel this way, sir. I can understand the frustration, given the experience. 

    I am here to help you get this running, and will do what I can from here in Norway. Would you like me to put you in contact with our sales team? They have several experienced FAE's who can assist you with the issue. 

    CWallach said:
    Seriously, there has to be complete, tested, and verified guide with each of the steps along with exact software versions.  Fully debug the procedure. Verify it. Then compile it all into a  batch file. Verify it again. This 

     There are several tested and verified guides available in DevZone, and have helped several people.

    As mentioned we are working on getting more tutorials out to our customers, but have not been able to gather all guides into one yet. Please be patient and use DevZone as much as possible.

    CWallach said:
    The nrf9160 is not ready for production use.

     Yes, you are correct. The device is still not in production but available for public sampling, so you can test and verify your design before production devices are available. Given that the nRF9160 is completely new for Nordic Semiconductor, we are using this time to learn and get an overview of what customer needs. This is why you are seeing so many issues as we using this as a way to remove all bugs in code and silicon.

    Nordic Semiconductor did have the same issues when moving from legacy 8-bit devices to 32-bit nRF51 and nRF52.


    Back your issue

    Since you are getting "West already initialized. Aborting." this means that the folder has been initialized somehow. I suggest that you make a new folder, this time call it NCS2. Following these commands:

    mkdir NCS2 && cd NCS2
    
    west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf
    
    cd nrf
    
    west update

    There really should not be any issues with this as I am using the command prompt in Windows 10 to do the same. 


    Kind regards,
    Øyvind

  • One major problem is that the modem firmware shipped in the 0.8.2 and 0.8.5 nRF9160 development boards is broken and has to to be replaced.

Related