Technical Support ================= This page summarizes common issues and solutions encountered when using mPython IoT. Wi-Fi Connection Issues ----------------------- Unable to Connect to Wi-Fi ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Confirm the Wi-Fi name (SSID) and password are entered correctly, paying attention to case sensitivity. - mPython IoT only supports the **2.4 GHz** band. Ensure you are not connecting to a 5 GHz network. - Check whether the router has MAC address filtering or connection limit enabled. - Move the device closer to the router to rule out insufficient signal strength. Wi-Fi LED Keeps Blinking ^^^^^^^^^^^^^^^^^^^^^^^^ A blinking LED indicates the device is connecting. If it does not turn solid after a long time, this is usually caused by an incorrect password or weak signal. Refer to the previous item for troubleshooting. IP Address Acquisition Failure ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If connected but no IP address is obtained, check whether the router DHCP service is functioning properly, or try restarting the router. MQTT Communication Issues ------------------------- Frequent MQTT Disconnections ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Check whether multiple devices are using the same ``client_id``. Duplicates cause connection conflicts; assign a unique ID to each node. - Set the ``keepalive`` parameter appropriately and maintain the connection via periodic ``ping()``. - Ensure the network is stable; Wi-Fi disconnection will also cause MQTT to drop. Not Receiving Subscribed Messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Confirm that ``set_callback()`` was called before ``subscribe()`` to set the callback function. - Confirm the publisher and subscriber use exactly the same topic name. - Call ``wait_msg()`` or ``check_msg()`` in a loop to continuously receive messages. Topic Conflicts ^^^^^^^^^^^^^^^ Multiple devices publishing to the same topic will result in mixed data. Use hierarchical naming conventions with independent topics for each node. See :doc:`../4_api/4_2_mqtt_client` for details. Multi-Node Networking Issues ---------------------------- Is There a Limit on the Number of Nodes? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mPython IoT itself has no hard limit on the number of networking nodes. The actual number of nodes that can connect depends on the MQTT broker capacity and Wi-Fi network bandwidth. In educational scenarios, dozens of nodes typically work without issues. Nodes Unable to Communicate ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Confirm all nodes are connected to the **same broker** and are on the same network. For local network setups, ensure all nodes and the server can reach each other. Battery and Power Issues ------------------------ How to Extend Battery Life ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Reduce data acquisition and reporting frequency to minimize Wi-Fi and MQTT communication. - When there are no communication tasks, reduce the transmission frequency or put the device into a low-power state. - Avoid keeping high-brightness indicator LED output for extended periods. Device Won't Power On ^^^^^^^^^^^^^^^^^^^^^ - Confirm the power toggle switch is turned on. - Check whether the battery has charge; try charging via the Type-C interface first. - Observe the charging LED to confirm the charging circuit is working properly. Flashing and Firmware Issues ---------------------------- Serial Port Not Found ^^^^^^^^^^^^^^^^^^^^^ - Replace with a Type-C data cable that supports data transfer. - Install the corresponding USB-to-serial driver. - Check Device Manager to confirm the serial port is properly recognized. Flashing Failed ^^^^^^^^^^^^^^^ - Try lowering the flashing baud rate. - Do not power off or disconnect the cable during flashing. - If necessary, re-enter flash mode and retry. See :doc:`../2_software/2_2_flash` for details. More Help --------- - :doc:`../2_software/2_3_wifi_config` - :doc:`../3_examples/3_2_mqtt` - :doc:`../4_api/4_2_mqtt_client`