pdf-icon

UiFlow Tutorial

UiFlow1 Development Guide

Project Management

Use LTE network

UiFlow1 Blockly

Event

Unit

UiFlow2 Development Guide

UI Editor

Device Security & Sharing

Unit PoE-P4: Flash Firmware & Run Code

1. Preparation

  • Refer to the UIFlow2 Web IDE Tutorial to understand the basic workflow of UiFlow2 and complete the installation of the M5Burner firmware flashing tool.
  • Log in and register with M5Burner. Once the device is successfully flashed, the device information will be bound to the account.

2. Firmware Flashing

  1. Enter Download Mode: Connect the device to your computer via a USB Type-C cable, then press and hold the side button for 3 seconds until the green LED lights up. The device will enter Download Mode and be ready for flashing.
  1. Download the firmware compatible with Unit PoE-P4 in M5Burner, as shown below.
  1. Connect the device to your computer via a USB cable. In M5Burner, click the Burn button for the corresponding firmware, select the appropriate device port, then click Start.
  1. Fill in the required configuration information, then click Next to begin flashing.
  • Server: The server address the device connects to
  • SNTP Server
    • SNTP0: Alibaba Cloud NTP Server (China)
    • SNTP1: Japan NTP Server Pool
    • SNTP2: Global Public NTP Server Pool
  • Timezone: Timezone configuration
  • Boot Option
    • run main.py directly: Run main.py directly
    • show startup nemu and network setup: Display the startup screen (NEMU) and network settings
    • only net work setup: Network setup only
  • Net Mode: Network mode
  • Eth Mode: Ethernet mode
    • DHCP: Dynamic Host Configuration Protocol
    • Static: Static IP mode

When the prompt Burn successfully, click here to return appears, the flashing has completed successfully. Restart the device at this point to apply the flashed configuration.

3. Log In to UiFlow2

Go to the UiFlow2 page and click the user icon in the top-right corner to log in to your UiFlow2 account.

UiFlow2 Account
This account must be the same account used to log in to M5Burner. Once logged in successfully, devices connected to a valid Wi-Fi network under this account can be viewed by clicking Select Device. To transfer device ownership, the binding between the device and the current account must first be removed.

4. Entering the Programming Interface

You can connect your device to UiFlow2 via USB or Pair Code to enter the programming interface. The methods are described below:

USB

  1. Connect Unit PoE-P4 to your computer via a USB cable. Select the Unit PoE-P4 device module from the device list, then click Confirm.
  1. Set the Mode to USB at the bottom of the interface.
  1. Click the WebTerminal button.
  1. In the dialog, select the serial port for Unit PoE-P4 and click Connect.

When the WebTerminal screen displays Connected to Serial Port!, the USB connection is established successfully and you can enter the UiFlow2 programming interface for the device.

Pair Code

  1. Connect an Ethernet cable to the Unit PoE-P4 device.

  2. Set the Mode to (Cloud)Pair Code at the bottom of the interface.

  1. Click Web Terminal in the bottom-left corner of the interface. In the dialog, select the serial port for Unit PoE-P4, then click Connect.

The currently active pairing code generated by the device can be viewed in the serial terminal interface.

  1. Click Select Code, enter the Pair Code in the dialog that appears, then click Add Device to connect the Unit PoE-P4 to UiFlow2.
Pair Code Notes
1. Switching browsers, using private/incognito mode, or clearing the UiFlow website cache will invalidate the existing pairing state.
2. Simply closing the tab, restarting the browser, or logging in/out of an account will not affect an established pairing.
3. Once a device is paired by another browser, the pairing in the original browser will be immediately invalidated.

5. RUN

Once the above steps are complete, you can start programming with UiFlow2.

On This Page