DEV Community

HarmonyOS
HarmonyOS

Posted on

[Smart Watch] [API 6] Smartwatch Wi-Fi debugging

Read the original article:[Smart Watch] [API 6] Smartwatch Wi-Fi debugging

Smartwatch Wi-Fi debugging

1.1 Prerequisites

  1. The Wearable and PC are connected to the same Wi-Fi network.

  2. In Wearable, open Developer Mode. In Settings > About, touch Version until the message "You are in Developer Mode!" is displayed. Then, in Settings > Developer Options, turn on HDC Debugging and Debugging via WLAN. (Note: There is no "Developer Mode" for the sports table.)

cke_1828.png

1.2 Operation Procedure

  1. Go to Developer and check the watch's IP address. (DevEco Studio 3.0.0.800 is recommended.)

  2. On the DevEco Studio menu bar, choose Tools > IP Connection, enter the IP address of the connected device, and click. After the connection is successful, the device status changes to online.
    cke_3057.png

  3. Sometimes, the DevEco Studio connection fails. Ping the watch's IP address from the PC,Check whether the PC and watch can ping each other and whether they are connected to the same WLAN
    cke_4255.png

  4. Sometimes, the connection may fail due to the DevEco Studio. You can run commands to connect the connection.adb connect 192.168.43.122:5555

  5. Sometimes, the DevEco Studio cannot be connected and the command cannot be connected. Disable and then enable the debugging through WLAN. (Note: Due to this reason, DevEco Studio cannot connect to the watch.)

  6. On the menu bar, choose Run > Run'module name to run the application.
    cke_5393.png

  7. Debugging through Wi-Fi. When you manually install the hap, the following situation occurs: Kill the adb process. If the problem cannot be solved, restart the computer. If the problem still cannot be solved, change the computer. (To connect to the CP outside China, change the computer to solve the problem.)

1.3 FAQ

Debug the watch according to the official website wifi, why still can't

Solution:

  1. Check whether the watch network is on the same network as the computer. Ping the watch IP address to check whether the ping operation is successful.

  2. Manually turn off and on the WLAN on the watch for debugging, and then connect the watch again.

When the watch is connected to a computer through Wi-Fi, the error message "protocol fault" is displayed when the watch pushes packets

Solution:

Kill the adb process. If the problem persists, restart the computer. If the problem persists, change the computer

The watch is connected to the DevEco Studio, but the watch is not displayed on IP Connection Devices

Solution:

Replace the IDE version with 3.0.0.800

Written by Aycanur Ucar

Top comments (0)