nRF9160 MQTT Connection refused

Hi 

I'm trying to send and receive data with MQTT.

I tried uploading asset trackerV2 bin file and it works fine with nrf cloud.

now I want to use the sample "MQTT_simple" to connect to nrf cloud

but it's giving me this error ( I tried as well changing the sec tag to 42 but still the same problem)

my prj.conf is

 

#
# Copyright (c) 2020 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Networking
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n

# Modem library
CONFIG_NRF_MODEM_LIB=y

# MQTT
CONFIG_MQTT_LIB=y
CONFIG_MQTT_LIB_TLS=y
CONFIG_MQTT_CLEAN_SESSION=y

# Application
CONFIG_MQTT_PUB_TOPIC="prod/1b1ed61d-1e9e-494d-8eca-a7d9e5c275b8"
CONFIG_MQTT_SUB_TOPIC="prod/1b1ed61d-1e9e-494d-8eca-a7d9e5c275b8"
CONFIG_MQTT_CLIENT_ID="my-client-id"
CONFIG_MQTT_BROKER_HOSTNAME="a2n7tk1kp18wix-ats.iot.us-east-1.amazonaws.com"
CONFIG_MQTT_BROKER_PORT=8883
CONFIG_MQTT_TLS_SEC_TAG=16842753

# Button support
CONFIG_DK_LIBRARY=y

# Enable logging
CONFIG_LOG=y
CONFIG_MQTT_SIMPLE_LOG_LEVEL_DBG=y

# Memory
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=2048

# NewLib C
CONFIG_NEWLIB_LIBC=y

# Modem key management, for provisioning certificates
CONFIG_MODEM_KEY_MGMT=y

I have certificate already installed:

note : I tried connecting to different broker(without TLS) and it works fine

Parents Reply Children
No Data
Related