python TLS outdated on xbee gateway

I tried to publish MQTT files directly from the xbee gateway using the PAHO micropython

def publish(clientId, topic, msg, hostname=“”):
c = mqtt.Client(client_id=clientId)
c.tls_set(ca_certs=“certs/TeamViewerAuthority.crt”, certfile=“certs/clie
context = ssl.create_default_context()
print(” MQTT {0}…".format(hostname)),
c.connect(hostname, port=18884)
c.publish(topic, payload=msg)

But the result I got was:

“Exception: Python 2.7.9 and 3.2 are the minimum supported versions for TLS.”

As long as I know, python on the xbee gateway is 2.7.1 and cannot be updated. Any ideas how to go around this?

Try using the TLS Lite functions of Python 2.7.

I took a look, but there is no TLS 1.2, just TLS 1.1, and Teamviewer IoT just accepts 1.2 since October 20. I am going around with Node Red on a Raspberry Pi, but not ideal.