OSError: [Errno 7111] ECONNREFUSED` using good certs and aws_publish example code

Hi,

I’m using XBEE 3 Global LTE , firmware 11620

I am using the Pycharm Digi Example code called “aws_publish” to publish MQTT to AWS.

I have created the policy as per the Digi documentation (un restricted)

I have verified the certs have worked on my local machine using the python code and certs that AWS IOT generated.

The error I get using the same certs, and the sample code is `import main
±------------------------------------+
| XBee MicroPython AWS Publish Sample |
±------------------------------------+

  • Waiting for the module to be connected to the cellular network… [OK]
  • Connecting to AWS… Traceback (most recent call last):
    File “”, line 1, in
    File “/flash/main.py”, line 77, in
    File “/flash/main.py”, line 54, in publish_test
    File “/flash/lib/umqtt/simple.py”, line 72, in connect
    OSError: [Errno 7111] ECONNREFUSED`

How do we resolve this error?

which of the certificates did you use from Digi MicroPython Programming Guide

and how did you upload them to the module?

When you use AWS IOT Console to connect a thing, you can select Python for your programming language. It will create a software package for download containing the certifications and allows testing. This application was successful with the certs, so I uploaded the certs with the Digi Xbee Studio file manager.

@robomike this is not necessarily correct for the XBee modules. For the XBee modules, you need to use the proper certificates. You need to use the ones listed at Digi MicroPython Programming Guide