🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Problem M5Touch hostname, transport base, mqtt_cliente anda M5Thing

    Scheduled Pinned Locked Moved PRODUCTS
    2 Posts 2 Posters 839 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      Jose Manuel
      last edited by

      Hi everyone, I'm having a problem with an M5tough that I use with a thermocouple and MQTT. I'm getting the following error. I don't know what it's due to or how to fix it. Has anyone else had the same problem? I searched the forum and couldn't find anything. Thanks for the help.

      prolema_m5.JPG

      Y 1 Reply Last reply Reply Quote 0
      • Y Offline
        yuyun2000 @Jose Manuel
        last edited by

        @Jose-Manuel The error you're encountering (getaddrinfo() returns 202) typically indicates a DNS resolution issue, meaning the M5Tough is unable to resolve the hostname uiflow2.m5stack.com. Here are some steps to troubleshoot and resolve the issue:

        1. Check Network Connection

        Ensure the M5Tough is connected to a stable Wi-Fi network.
        Verify the Wi-Fi credentials (SSID and password) are correctly configured.

        1. Verify DNS Settings

        If the device is unable to resolve the hostname, try using a different DNS server (e.g., Google's DNS: 8.8.8.8 or 8.8.4.4).
        You can configure this in the Wi-Fi settings or DHCP settings of your router.

        1. Test Connectivity

        Use a tool like ping or nslookup to check if the hostname uiflow2.m5stack.com is resolvable from another device on the same network.

        1. MQTT Configuration

        Ensure the MQTT broker settings (hostname, port, client ID, etc.) are correctly configured in your code.
        If the broker requires authentication, verify the username and password.

        1. Firmware Update

        Ensure the M5Tough is running the latest firmware. Outdated firmware might have bugs related to network connectivity.

        1. Debugging

        Add debug prints in your code to check the Wi-Fi and MQTT connection status before attempting to send messages.
        Example:print("Wi-Fi connected:", wifi.isconnected())
        print("MQTT connected:", mqtt.isconnected())

        1. Alternative MQTT Broker

        Temporarily switch to a public MQTT broker (e.g., test.mosquitto.org) to rule out issues with the uiflow2.m5stack.com server.

        Example Code for MQTT Connection (MicroPython)
        from umqtt.simple import MQTTClient
        import network

        Wi-Fi Configuration

        wifi = network.WLAN(network.STA_IF)
        wifi.active(True)
        wifi.connect("YOUR_SSID", "YOUR_PASSWORD")

        Wait for Wi-Fi connection

        while not wifi.isconnected():
        pass

        print("Wi-Fi connected:", wifi.isconnected())

        MQTT Configuration

        mqtt = MQTTClient("client_id", "test.mosquitto.org", port=1883)
        mqtt.connect()
        print("MQTT connected:", mqtt.isconnected())

        Suggested Next Steps
        If the issue persists, you can contact M5Stack support at support@m5stack.com for further assistance.
        reply with https://chat.m5stack.com/

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post