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

MQTT_Connect -45 when connecting to AWS

I am trying to write a simple application to publish messages over MQTT to an AWS IoT-Core broker. I started with the MQTT_Simple and AWS_FOTA examples. When trying to do the mqtt_connect I am getting a -45 error code.  My code is as follows:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
*/
#include <zephyr.h>
#include <stdio.h>
#include <uart.h>
#include <string.h>
#include <at_cmd.h>
#include <lte_lc.h>
#include <net/mqtt.h>
#include <net/socket.h>
//#include <net/aws_fota.h>
#include <dfu/mcuboot.h>
#include <misc/reboot.h>
#if defined(CONFIG_BSD_LIBRARY)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

1 2