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

MQTT Error Codes

When attempting to connect to an MQTT broker set up on my local machine using the mqtt simple sample code, I get this output:

Fullscreen
1
2
3
4
5
6
7
8
9
***** Booting Zephyr OS v1.14.99-ncs1 *****
The MQTT simple sample started
LTE Link Connecting ...
LTE Link Connected!
IPv4 Address found 0x0100007f
ERROR: mqtt_connect -60
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

What does this error code mean? Also, is there a location where I can see what all the error codes mean?

prj.conf for reference:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# General config
CONFIG_TEST_RANDOM_GENERATOR=y
# Networking
CONFIG_NETWORKING=y
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
# BSD library
CONFIG_BSD_LIBRARY=y
# AT Host
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_AT_HOST_LIBRARY=y
# MQTT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks

Parents
  • Take a look at ncs\zephyr\lib\libc\minimal\include\errno.h for more information about errors. The error 60 is ETIMEDOUT, which means the connection timed out.

    Best regards,

    Simon

Reply
  • Take a look at ncs\zephyr\lib\libc\minimal\include\errno.h for more information about errors. The error 60 is ETIMEDOUT, which means the connection timed out.

    Best regards,

    Simon

Children
No Data