How to Interface nRF9160 with external MCU for nb-IOT control using AT commands?

Hi,

I have this development board https://www.nordicsemi.com/Products/Development-hardware/nRF9160-DK .  I would like to use development board as nb-IOT modem and other MCU to control it send data over  nb-IOT modem using AT commands, it is possible to do this? 

I have tested this board with nRF desktop software using 2G network and AT command. 

As of now, I don't  have nb-IOT sim card available to test, so not able to test. 

Query targeting MCU interface : 

1) Which RX, TX pin of nRF9160 would be used to control over MCU? 

2) Which SDK should I use for AT command functionality? 

3) what other changes are needed to work with nb-IOT network ? 

please suggest if there is any reference example available for this purpose.

Any help will be appreciated. 

Thanks & Regards,

Ashvin

  • Hi Hakon

    Thanks a lot for your help.

    I am able to find nrf/application and built it successfully, but I am getting warnings more than 50. I don't know they are for.

    I have flash the file into DK board and able to test AT commands on over USB with pc.

    Now, for MCU purpose, need to changes those line but not able find this lines , 

    "CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2 ,

    #CONFIG_SLM_CONNECT_UART_2=y, 

    #CONFIG_UART_2_NRF_HW_ASYNC_TIMER=2" in file.

    Attaching the prj.conf file,

    Thanks 

    #
    # Copyright (c) 2020 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    # General config
    CONFIG_LOG=y
    CONFIG_LOG_DEFAULT_LEVEL=3
    CONFIG_STACK_SENTINEL=y
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_RING_BUFFER=y
    
    # Segger RTT
    CONFIG_USE_SEGGER_RTT=n
    CONFIG_RTT_CONSOLE=y
    CONFIG_UART_CONSOLE=n
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_NATIVE=n
    
    # Modem library
    CONFIG_NRF_MODEM_LIB=y
    # Align the max FD entry to NRF_MODEM_MAX_SOCKET_COUNT(8)
    CONFIG_POSIX_MAX_FDS=8
    # Enable below for modem trace
    #CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y
    
    # Use GPIO
    CONFIG_GPIO=y
    CONFIG_GPIO_NRFX=y
    
    # UART interface
    CONFIG_SERIAL=y
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_TIMER2=y
    
    # Stacks and heaps
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_HEAP_MEM_POOL_SIZE=16384
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    # Device power management
    CONFIG_PM_DEVICE=y
    
    # FOTA
    CONFIG_HTTP_PARSER_URL=y
    CONFIG_FOTA_DOWNLOAD=y
    CONFIG_FOTA_DOWNLOAD_PROGRESS_EVT=y
    CONFIG_DFU_TARGET=y
    CONFIG_DOWNLOAD_CLIENT=y
    CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_IMG_MANAGER=y
    
    # FLASH
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    CONFIG_IMG_ERASE_PROGRESSIVELY=y
    
    # Settings
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_FCB=y
    CONFIG_FCB=y
    
    # nRF Cloud
    CONFIG_CLOUD_API=y
    CONFIG_NRF_CLOUD_MQTT=y
    CONFIG_NRF_CLOUD_FOTA=n
    CONFIG_NRF_CLOUD_AGPS=y
    CONFIG_NRF_CLOUD_PGPS=y
    CONFIG_NRF_CLOUD_CELL_POS=y
    CONFIG_NRF_CLOUD_LOG_LEVEL_INF=y
    CONFIG_DATE_TIME=y
    CONFIG_MODEM_INFO=y
    CONFIG_MODEM_INFO_ADD_DATE_TIME=n
    CONFIG_AT_MONITOR=y
    CONFIG_MODEM_JWT=y
    # Use "nrf-<IMEI>" as the default device_id format
    # Use "<device_uuid>" as the device_id format by below
    #CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y
    
    #
    # SLM-specific configurations
    #
    CONFIG_SLM_CUSTOMIZED=n
    CONFIG_SLM_LOG_LEVEL_INF=y
    CONFIG_SLM_EXTERNAL_XTAL=n
    CONFIG_SLM_START_SLEEP=n
    
    # nRF Cloud based location services
    CONFIG_SLM_AGPS=n
    CONFIG_SLM_PGPS=n
    CONFIG_SLM_CELL_POS=n
    
    # Serial DFU support
    CONFIG_SLM_NRF52_DFU=n
    CONFIG_SLM_NRF52_DFU_LEGACY=n
    

  • My bad, it's in boards/nrf9160dk_nrf9160_ns.conf. This was changed recently.

  • Hi Hakon,

    Thanks for your help and sorry for late reply. 

    I will look into your referral  links and update you soon.

  • Hi Hakon,

    Thanks for your support.

    Now, I am able to connect with  board with UART2 on pin P0.10, P0.11. 

    Is There any other pins are available for UART2 , expect P0.10, P0.11?  If Yes, can you please share here?

    can I use any other UART for same purpose? 

    Thanks & Regards,

    Ashvin Makwana

  • Ashvin Makwana said:
    If Yes, can you please share here?

    You can see most GPIO pins that are not being used by the DK already. For more information you can look here.

Related