Debug devices

更新时间:
复制 MD 格式

Use online debugging to test the connection between a device and the cloud. This feature also lets you view the device's operational log.

Prerequisites

A test device has been added. For more information, see Add a test device.

If you debug a physical device, the device must be configured to connect to the platform. For more information, see Connect a device to the platform.

If you want to debug a Bluetooth device or use voice debugging, you need a registered Taobao account. This account must be linked to the Tmall Genie app, and you must have a device bound within the app.

Device debugging overview

The debugging method varies based on the product's project and network connection type, as shown in the following table. For standard devices, you can debug both physical and virtual devices. For Bluetooth devices and voice debugging, you can only debug physical devices.

Project categoryNetwork connection typeDebugging method
Proprietary brand projectAllDebug standard devices
Tmall Genie ecosystem projectWi-FiDebug standard devices, Voice debugging
Bluetooth MeshDebug Bluetooth devices, Voice debugging
Bluetooth GATTDebug Bluetooth devices, Voice debugging

Debug standard devices

  1. Log on to the IoT Platform console.
  2. Go to the Device Debugging page for the product.
  3. Click Debug or Online Debugging for the target device to open the device debugging page.
    调试设备
  4. From the Debug Device drop-down list, select the DeviceName of the device.
  5. Debug the device online.

    You can debug standard devices as either physical or virtual devices.

    • Debug a physical device:

      On the Debug Physical Device tab, select a function and method for the device, and then click Send Instruction. After the "Instruction sent successfully" message is displayed, the corresponding real-time log is displayed on the right.

      Note To debug a physical device, you must first connect the device to the platform and complete operations, such as network configuration.
      调试结果
    • Debug a virtual device:

      On the Virtual Device tab, click Start Virtual Device.

      虚拟真实设备

      You can push messages to the virtual device in the following two ways.

      • Standard push:

        Configure the parameters and click Push. The corresponding real-time log is displayed on the right.

        推送消息
      • Policy-based push:

        After you configure the parameters, click Policy-based Push and configure the push method.

        A policy-based push automatically sends a message at a scheduled time. There are two types of policy-based pushes:

        • Scheduled push:

          Automatically pushes a message at a specified future time.

        • Continuous push:

          Continuously pushes messages at a specified interval within a specified future time range.

        配置策略推送

Debug Bluetooth devices

  1. Log on to the IoT Platform console.
  2. Go to the Device Debugging page for the product.
  3. Click Debug or Online Debugging for the target device to open the device debugging page.
    调试设备
  4. Click Log on with Taobao Account.
    设备调试
  5. From the Select a device to debug drop-down list, select a device that is bound in the Tmall Genie app.
    After you select a device, its Product Id, Device Name, and Device ID are displayed.
  6. (Optional) Select a speaker to debug.
    If multiple speakers are bound to your Tmall Genie app, you must also select a specific speaker for debugging.语音调试
  7. Debug the device online.

    You can debug Bluetooth devices using the Thing Specification Language (TSL) model or by sending instructions.

    • TSL model:

      On the TSL Model tab, select a debug function for the device and click Send Instruction.

      For example, the following figure shows how to send a "turn off light" instruction to the device using the TSL Model method. You can view the corresponding operational log for the device in the log area on the right.

      发送指令
    • Instruction:

      On the Instruction tab, enter the Opcode and Parameters for the instruction to test, and then click Send Instruction.

      For example, the following figure shows how to send an instruction to the device to switch the light scenario to night light mode using the Instruction method. You can view the corresponding operational log for the device in the log area on the right.

      二进制调试示例

Voice debugging

  1. Log on to the IoT Platform console.
  2. Go to the Device Debugging page for the product.
  3. Click Debug or Online Debugging for the target device to open the device debugging page.
    调试设备
  4. Select the Voice Debugging tab and click Log on with Taobao Account.
    登录淘宝账号
  5. From the Select a device to debug drop-down list, select a device that is bound in the Tmall Genie app.
    After you select a device, its Product Id, Device Name, and Device ID are displayed.
  6. (Optional) Select a speaker to debug.
    If multiple speakers are bound to your Tmall Genie app, you must also select a specific speaker for debugging.语音调试
  7. In the Conversation Flow area, enter a conversational utterance.
    The platform supports two types of utterances: standard and generalized.
    • Standard utterance:

      On the Standard Corpus tab, click a standard utterance provided by the platform. For more information about standard utterances, see Configure voice commands.

      标准语料
    • Generalized utterance:

      On the Generalized Corpus tab, enter a generalized test utterance and click Send Test.

      泛化语料