- Edited
The external MCU that I am using does not support RTS/CTS hardware flow control. Is there a way to configure the serial LTE modem application to communicate through the UART using a 2-wire Tx/Rx with Hardware flow control disabled?
The external MCU that I am using does not support RTS/CTS hardware flow control. Is there a way to configure the serial LTE modem application to communicate through the UART using a 2-wire Tx/Rx with Hardware flow control disabled?
in order to disable the HWFC i am configuring the application and added these lines to the prj file.
CONFIG_SLM_DATAMODE_HWFC=n
CONFIG_SLM_LOG_LEVEL_INF=y
CONFIG_SLM_CONNECT_UART_2=y
CONFIG_UART_2_NRF_HW_ASYNC_TIMER=2
CONFIG_SLM_CR_LF_TERMINATION=y
CONFIG_SLM_GPS=y
CONFIG_SLM_HTTPC=y
I am getting the following compilation errors for the serial lte application
PC@DESKTOP-HG29JE3 MINGW64 ~/ncs/v1.5.0
$ cd c:/nfed/nrf/applications/serial_lte_modem
PC@DESKTOP-HG29JE3 MINGW64 /c/nfed/nrf/applications/serial_lte_modem ((v1.3.2))
C:/nfed/nrf/applications/serial_lte_modem/prj.conf:64: warning: attempt to assign the value ‘n’ to the undefined symbol SLM_DATAMODE_HWFC
C:/nfed/nrf/applications/serial_lte_modem/prj.conf:69: warning: attempt to assign the value ‘y’ to the undefined symbol SLM_GPS
C:/nfed/nrf/applications/serial_lte_modem/prj.conf:70: warning: attempt to assign the value ‘y’ to the undefined symbol SLM_HTTPC
error: Aborting due to Kconfig warnings
I have followed the instructions given in Application description — nRF Connect SDK 1.5.0 documentation (nordicsemi.com)
What am I missing?
Thank you
Below is the complete output of the compilation:
$ west build -b circuitdojo_feather_nrf9160ns -p
WARNING: ZEPHYR_BASE=C:/Users/PC/ncs/v1.5.0/zephyr in the calling environment will be used,
but the zephyr.base config option in C:\nfed is “zephyr”
which implies a different ZEPHYR_BASE=C:\nfed\zephyr
To disable this warning in the future, execute ‘west config –global zephyr.base-prefer env’
– west build: making build dir C:\nfed\nrf\applications\serial_lte_modem\build pristine
– west build: generating a build system
Including boilerplate (Zephyr base): C:/Users/PC/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
– Application: C:/nfed/nrf/applications/serial_lte_modem
– Using NCS Toolchain 1.5.0 for building. (C:/Users/PC/ncs/v1.5.0/toolchain/cmake)
– Zephyr version: 2.4.99 (C:/Users/PC/ncs/v1.5.0/zephyr)
– Found Python3: C:/Users/PC/ncs/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version “3.8.2”) found components: Interpreter
– Found west (found suitable version “0.9.0”, minimum required is “0.7.1”)
– Board: circuitdojo_feather_nrf9160ns
– Cache files will be written to: C:/Users/PC/ncs/v1.5.0/zephyr/.cache
– Found dtc: C:/Users/PC/ncs/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version “1.4.7”, minimum required is “1.4.6”)
– Found toolchain: gnuarmemb (C:/Users/PC/ncs/v1.5.0/toolchain/opt)
– Found BOARD.dts: C:/Users/PC/ncs/v1.5.0/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160ns.dts
– Found devicetree overlay: C:/nfed/nrf/applications/serial_lte_modem/boards/circuitdojo_feather_nrf9160ns.overlay
– Generated zephyr.dts: C:/nfed/nrf/applications/serial_lte_modem/build/zephyr/zephyr.dts
– Generated devicetree_unfixed.h: C:/nfed/nrf/applications/serial_lte_modem/build/zephyr/include/generated/devicetree_unfixed.h
– Generated device_extern.h: C:/nfed/nrf/applications/serial_lte_modem/build/zephyr/include/generated/device_extern.h
C:/nfed/nrf/applications/serial_lte_modem/prj.conf:64: warning: attempt to assign the value ‘n’ to the undefined symbol SLM_DATAMODE_HWFC
C:/nfed/nrf/applications/serial_lte_modem/prj.conf:69: warning: attempt to assign the value ‘y’ to the undefined symbol SLM_GPS
C:/nfed/nrf/applications/serial_lte_modem/prj.conf:70: warning: attempt to assign the value ‘y’ to the undefined symbol SLM_HTTPC
Parsing C:/nfed/nrf/applications/serial_lte_modem/Kconfig
Loaded configuration ‘C:/Users/PC/ncs/v1.5.0/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160ns_defconfig’
Merged configuration ‘C:/nfed/nrf/applications/serial_lte_modem/prj.conf’
error: Aborting due to Kconfig warnings
CMake Error at C:/Users/PC/ncs/v1.5.0/zephyr/cmake/kconfig.cmake:262 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/Users/PC/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake:534 (include)
C:/Users/PC/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
C:/Users/PC/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:20 (find_package)
– Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: ‘C:\Users\PC\ncs\v1.5.0\toolchain\opt\bin\cmake.EXE’ ‘-BC:\nfed\nrf\applications\serial_lte_modem\build’ ‘-SC:\nfed\nrf\applications\serial_lte_modem’ -GNinja -DBOARD=circuitdojo_feather_nrf9160ns
upswing The external MCU that I am using does not support RTS/CTS hardware flow control. Is there a way to configure the serial LTE modem application to communicate through the UART using a 2-wire Tx/Rx with Hardware flow control disabled?
You’l have to create an overlay file and remove the CTS/RTS pins if they’re enabled. By default though, they’re deactivated. circuitdojo_feather_nrf9160_common.dts
controls this if you look at the entries for uart1
or uart2
depending if you’re using other peripherals
upswing I am getting the following compilation errors for the serial lte application
I would read the output carefully. It appears you’re trying to set values that don’t exist.
upswing I will add that you should reference the .overlay file already in that example. (nrf9160dk_nrf9160ns.overlay
) Copy and change the name to circuitdojo_feather_nrf9160ns
and comment out/remove the rts
,cts
, and hw-flow-control
entries. You shouldn’t need to change anything in prj.conf
.
jaredwolff There is a list of configuration options on this page: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/nrf/applications/serial_lte_modem/doc/slm_description.html#
There is a suggestion to include these configuration options in the prj.conf according to your needs..
for example:
CONFIG_SLM_CR_LF_TERMINATION - CR+LF termination
This option configures the application to accept AT commands ending with carriage return and line feed.
This option is accepted whereas the next option below is not accepted:
CONFIG_SLM_DATAMODE_HWFC - UART HWFC for data mode
This option specifies whether UART hardware flow control is required for data mode. By default, UART hardware flow control is required.
So it is not clear why some options are supported and other not supported..
In any case thank you for giving me a solution…
upswing hmm looking at this again and then looking at the serial_lte_modem
code, the config variables set that have SLM
in them are in the Kconfig of the serial_lte_modem
project.
#
# SLM-specific configurations
#
CONFIG_SLM_LOG_LEVEL_INF=y
# Configure external XTAL for UART
CONFIG_SLM_EXTERNAL_XTAL=n
# Enable GPIO wakeup if sleep is expected
#CONFIG_SLM_GPIO_WAKEUP=y
# Use UART_0 (when working with PC terminal)
CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
CONFIG_SLM_DATAMODE_HWFC=n
# Use UART_2 (when working with external MCU)
#CONFIG_SLM_CONNECT_UART_2=y
#CONFIG_UART_2_NRF_HW_ASYNC_TIMER=2
# Use optional GPS service
#CONFIG_SLM_GPS=y
# Use optional FTP client service
#CONFIG_SLM_FTPC=y
# Use optional MQTT client service
#CONFIG_SLM_MQTTC=y
# Use optional HTTP client service
#CONFIG_SLM_HTTPC=y
So something is wonky there. Can you try deleting your build
folder or using the -p
flag to rebuild. Is your example dirty? I find myself using something like SourceTree to check if I modified something by accident. Also, simple mistakes, like formatting errors, in prj.conf
throw everything off.
Also, if you do end up creating an .overlay
file you’ll need to make sure you match the pin numbers to the entries in your overlay. For example the default TX/RX pins on the board are defined as:
tx-pin = <24>;
rx-pin = <23>;
uart2
by default, uses these pins but you need to enable the uart2
interface. So the minimal .overlay you need is:
&uart2 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
status = "okay";
};
Obviously change the speed to whatever you need.