# ETIMEDOUT AWS - IOT using Micropython

**URL:** <https://forums.digi.com/t/etimedout-aws-iot-using-micropython/22498>\
**Category:** XBee - Cellular\
**Tags:** micropython, mqtt, xbee-cellular, aws, iot\
**Created:** [June 24, 2021, 10:23am UTC](https://forums.digi.com/t/etimedout-aws-iot-using-micropython/22498 "2021-06-24T10:23:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoheistich](https://avatars.discourse-cdn.com/v4/letter/y/f08c70/32.png) [@yoheistich](https://forums.digi.com/u/yoheistich)\
**Post date:** [June 24, 2021, 10:23am UTC](https://forums.digi.com/t/etimedout-aws-iot-using-micropython/22498/1 "2021-06-24T10:23:47Z")

</div>

Hello everyone,

I have an XBee 3 Cellular LTE-M/NB-IoT Global, firmware version L0.0.00.00.05.06,A.02.01, with a Brazilian sim card.

Using the microPython, I’ve already tested with success those examples from digi: connection\_status, ftp\_client, http\_request. However I can not connect to AWS IoT, but the test in my computer using my certificates worked fine.

Computer:

```auto

PS C:\Users\user&gt; &amp; python c:/Users/user/Downloads/aws_https_pc.py
HTTP/1.1 200 OK
content-type: application/json
content-length: 219
date: Wed, 23 Jun 2021 19:08:35 GMT
x-amzn-RequestId: ffa2cfbd-1510-0a1f6-0213-ebce1e95a2
connection: keep-alive

{"state":{"desired":{"welcome":"aws-iot"},"reported":{"welcome":"aws-iot"}},"metadata":{"desired":{"welcome":{"timestamp":1624468808}},"reported":{"welcome":{"timestamp":1624468808}}},"version":1,"timestamp":1624475315}

```

XBee:

```auto

 +-----------------------------------+
 | XBee MicroPython AWS HTTPS Sample |
 +-----------------------------------+

- Waiting for the module to be connected to the cellular network... [OK]
- Connecting to AWS... Traceback (most recent call last):
  File "/flash/main.py", line 134, in 
  File "/flash/main.py", line 84, in https_test
OSError: [Errno 7110] ETIMEDOUT

```

I’ve used the certificate downloaded [https://ssl-ccp.secureserver.net/repository/sf-class2-root.crt](https://ssl-ccp.secureserver.net/repository/sf-class2-root.crt) as instructed in another post in this forum ([https://forums.digi.com/70583/problems-connecting-to-aws-iot-using-micropython](https://forums.digi.com/70583/problems-connecting-to-aws-iot-using-micropython)) and also the Starfield Services Root Certificate Authority - G2 from [https://www.amazontrust.com/repository](https://www.amazontrust.com/repository). As mentioned, both of them working with the computer test, but not in the XBee, same behaviour with and without ‘-ats’ in my endpoint name.

Using the XBee, I always receive the OSError: [Errno 7110] ETIMEDOUT problem.

I’ve seen someone here asking another user to test the ATLA command with my endpoint and it returned the IP, so I think that it is working.

I’m currently trying to get the aws\_http test to work.

Also tried

```auto

&gt;&gt;&gt; import socket
&gt;&gt;&gt; s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
&gt;&gt;&gt; s.connect((b'abcdefgklmnopq-ats.iot.us-west-2.amazonaws.com', 8883))
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 7110] ETIMEDOUT

```

ATVR 1141  
ATMV L0.0.00.00.05.06,A.02.01  
ATMU ERROR

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [June 25, 2021, 8:39am UTC](https://forums.digi.com/t/etimedout-aws-iot-using-micropython/22498/2 "2021-06-25T08:39:55Z")

</div>

May I suggest you start by updating the firmware versions you are working on. Then make sure that you are checking the status of the connection before you try to send the data.
