Skip to content

PPP DNS Resolution Error in Micropython 1.27 #18737

@SixelaSenshu

Description

@SixelaSenshu

Port, board and/or hardware

ESP32S3

MicroPython version

Board: ESP32S3 (custom board, not commercially available)

MicroPython version: 1.27

ESP-IDF version: 5.5.1

Hardware: AT-Modem LTE-4G (Simcom7070G for reference)

Reproduction

try:
client_id = ubinascii.hexlify(machine.unique_id())
ip = "test.mosquitto.org"
port = 1883
self.Client = MQTTClient(
client_id=client_id,
server=ip,
port=port,
)
except OSError as e:
errno = e.args[0] if e.args else 'Unknown'
print(f"OSError[{errno}] : {e}")
return False

self.Client.set_callback(self.message_callback)
self.Client.connect()
print("Connected successfully to MQTT!")

Expected behaviour

MQTT client should connect successfully via LTE modem using PPP.
Expected: MQTT connected
Actual issue: OSError[-202] : -202

Observed behaviour

Using PPP over LTE modem (Simcom7070G) not work

When using Wi-Fi directly: MQTTs connects without any problem, DNS resolution works fine.
When using AT commands on the modem, can ping and resolve test.mosquitto.org and enterprise DNS servers without issues. Can also get time with ntp command, be connected to an operator and have a good quality signal.

When using PPP over LTE modem:

  • Can connect to MQTT server only ~50% of the time when using the IP address
  • Sending small (200 B) or large (2 KB) packets works is ok if i succes to connect
  • DNS resolution fails with OSError[-202]
  • Unlimited wait loop on MQTT.connect when using enterprise server IP directly

The same code and hardware worked with MicroPython 1.25 before.

Additional Information

LTE modem works fine for basic AT commands: ping, DNS resolve, open socket, send data
Private server uses MQTTS with SSL certificate, username, and password
Issue seems specific to DNS resolution via PPP on MicroPython 1.27 but it's can be more deep than i expect actually.

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions