Home/Support/Support Forum/Digi Xbee3 LTE-M connection to AWS, how to resolve Bytes index out of range error?

Digi Xbee3 LTE-M connection to AWS, how to resolve Bytes index out of range error?

0 votes
I have been running into this error while running the script from umqtt, its getting snagged at the end of the connect() function, I'm not sure how to resolve this issue. Im trying to finalize the connection to AWS IoT core to publish mqtt messages. The error im receiving is on line 108 of the connect()function begins on line 63 here:

https://github.com/digidotcom/xbee-micropython/blob/master/lib/umqtt/umqtt/simple.py

this is the command I'm pasting into the Micropython Terminal:
```
1=== from umqtt.simple import MQTTClient
2=== mqtt = MQTTClient("Xbee", "aypis74v8aacn-ats.iot.us-east-1.amazonaws.com", ssl=True, ssl_params={"keyfile": "cert/aws.key", "certfile": "cert/aws.crt", "ca_certs": "cert/aws.ca" })
3=== mqtt.connect()

```

and this is the error that i am receiving back:

```

Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/flash/lib/umqtt/simple.py", line 108, in connect
IndexError: bytes index out of range

```

Anybody have any idea of what I need to do to resolve this?
asked Apr 20 in XBee3 Cellular by CarlMisco New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
What versions of both the firmware and the library are you working with?
answered Apr 22 by mvut Veteran of the Digi Community (14,807 points)
...