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

httpS sample

Hi

I am trying to merge zephyr's http_get example (with TLS option) into the nordic mqtt_simple example (ncs 0.4.0) since I need to set up a httpS connection and not just a http connection as nordic's http_application_update shows (TLS not supported by nordic's download_client lib). I took the mqtt_simple as base since it is a simpler project than http_application_update and figured it would be easier to swap the mqtt requests with https requests.

I loaded the mqtt_simple into SES 4.16 and then tried to change the configuration using Project => Configure nRF Connect Project... and enable all symbols as given in the proj.conf of zephyr's http_get example (attached below)

# General config
CONFIG_NEWLIB_LIBC=y

# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=y
CONFIG_NET_TCP=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y

CONFIG_DNS_RESOLVER=y
CONFIG_DNS_SERVER_IP_ADDRESSES=y
CONFIG_DNS_SERVER1="192.0.2.2"

# Network driver config
CONFIG_TEST_RANDOM_GENERATOR=y

# Network address config
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2"
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2"

# Network debug config
CONFIG_NET_LOG=y

I get the following error message after pressing "Configure" (and the whole SES project is not usable anymore..)

Loading solution mqtt_simple.emProject
Executing load commands
cmake -GNinja -DBOARD=nrf9160_pca10090ns -DBOARD_DIR=C:/work/git/ncs/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/work/gnuarmemb -BC:/work/git/ncs/nrf/samples/nrf9160/mqtt_simple/build_nrf9160_pca10090ns -HC:/work/git/ncs/nrf/samples/nrf9160/mqtt_simple -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/work/EmbeddedStudio_ARM_Nordic_v416_win_x64/arm_segger_embedded_studio_v416_win_x64_nordic/html/configure_nordic_project_menuconfig.py
-- Using application from 'C:/work/git/ncs/nrf/samples/nrf9160/mqtt_simple'
Zephyr version: 1.14.99
-- Selected BOARD nrf9160_pca10090ns
-- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.5.8", minimum required is "0.5.6")
-- Cache files will be written to: C:\Users\lama5\AppData\Local/.cache/zephyr
USING OUT OF TREE BOARD
-- Loading C:/work/git/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
-- Overlaying C:/work/git/ncs/zephyr/dts/common/common.dts

warning: user value 0 on the int symbol DNS_RESOLVER_MAX_SERVERS (defined at subsys\net\lib\dns\Kconfig:49) ignored due to being outside the active range ([1, 0]) -- falling back on defaults

warning: default value 1 on DNS_RESOLVER_MAX_SERVERS (defined at subsys\net\lib\dns\Kconfig:49) clamped to 0 due to being outside the active range ([1, 0])
Parsing Kconfig tree in C:/work/git/ncs/nrf/samples/nrf9160/mqtt_simple/Kconfig
Loading C:/work/git/ncs/nrf/samples/nrf9160/mqtt_simple/build_nrf9160_pca10090ns/zephyr/.config as base

Error: Aborting due to non-whitelisted Kconfig warning 'warning: user value 0 on the int symbol
DNS_RESOLVER_MAX_SERVERS (defined at subsys\net\lib\dns\Kconfig:49) ignored due to being outside the
active range ([1, 0]) -- falling back on defaults'. Note: If this warning doesn't point to an actual
problem, you can add it to the whitelist at the top of
C:/work/git/ncs/zephyr/scripts/kconfig/kconfig.py.

CMake Error at C:/work/git/ncs/zephyr/cmake/kconfig.cmake:194 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  C:/work/git/ncs/zephyr/cmake/app/boilerplate.cmake:500 (include)
  CMakeLists.txt:10 (include)


-- Configuring incomplete, errors occurred!
See also "C:/work/git/ncs/nrf/samples/nrf9160/mqtt_simple/build_nrf9160_pca10090ns/CMakeFiles/CMakeOutput.log".
See also "C:/work/git/ncs/nrf/samples/nrf9160/mqtt_simple/build_nrf9160_pca10090ns/CMakeFiles/CMakeError.log".
Project load failed
Reported error: solution load command failed (1)

Setting DNS_RESOLVER_MAX_SERVERS = 1 is not possible in "Configure nRF Connect Project" since it gets reset to 0 automatically. 

Also the NET_TCP symbol can not be enabled in "Configure nRF Connect Project" of the mqtt_simple sample compared to zephyr's http_get example where it is visible in "Configure nRF Connect Project". 

What am I doing wrong / what would be the right approach?

Is https even supported by the nRF9160?

BR, Marc

Parents Reply Children
No Data
Related