# 使用模拟器体验全流程

### 前提条件 <a href="#qian-ti-tiao-jian" id="qian-ti-tiao-jian"></a>

* 完成平台用户注册
* 在平台[创建设备](/she-bei-jie-ru/chuang-jian-she-bei.md)
* 从互联网下载好[MQTT.fx](http://www.jensd.de/apps/mqttfx/1.7.0/mqttfx-1.7.0-windows-x64.exe)客户端工具

### 安装软件

![成功后在自己的安装目录找到如下图标进行启动](/files/-MPcMWkn14Z17bqNeRv-)

### 启动打开后效果

![](/files/-MPcONwSdSP03IkJ3pUb)

### 弹出如下配置窗口

| 参数             | 说明                                   |
| -------------- | ------------------------------------ |
| Profile Name   | 输入您的自定义名称。                           |
| Profile Type   | 选择为MQTT Broker。                      |
| Broker Address | 接入地址：**47.106.149.52**。              |
| Broker Port    | 设置为1883。                             |
| Client ID      | 填写mqttClientId，用于MQTT的底层协议报文，保证唯一。   |
| General        | General栏目下的设置项可保持系统默认，也可以根据您的具体需求设置。 |

![](/files/-MPcMJ2BSwBrTCf4mmkE)

### 配置MQTT连接

Broker Address（MQTT代理服务地址）: **47.106.149.52** （DDA-IOT云平台v3.0服务地址）

Broker Port (MQTT代理服务端口)：**1883**

User Name(MQTT客户端，即网关与后台的MQTT服务器进行连接的令牌)：格式为网关的SN，也可通过"[**创建设备后复制访问令牌**](/she-bei-jie-ru/chuang-jian-she-bei.md#huo-qu-fang-wen-ling-pai)"进行获取。

![](/files/-MPcO1kYZObnJAMmnePD)

![](/files/-MPcOyzuebL37Xj_rcKY)

### 连接成功

![](/files/-MPcSiI1zRZ7BSotuv2H)

### 推送数据

我们可以开始简单用MQTT.fx工具模拟网关的MQTT协议向服务器发送一个终端遥测数据

**topic:**&#x20;

```
v1/gateway/telemetry
```

**payload:**

```
{
	"WG12345678": [{
		"ts": "1609144280398",
		"values": {
			"H": "60",
			"mode": "2",
			"NET4GSTA": "1,0",
			"mT": "3,0,2",
			"mFifo": "5528,5528,113,113",
			"DDA": "1",
			"boxSta": "0",
			"TH": "31.21,35.8",
			"NR": "42651,52212",
			"Lat": "-0.000000",
			"Lon": "-0.000000",
			"SDR": 1
		}
	}]
}
```

在上面的示例中我们"ts":"1609144280398"，是具有毫秒精度的[Unix时间戳](https://en.wikipedia.org/wiki/Unix_time)。例如：值’1609140420031’转换后是’2020-12-28 16:31:20’。

![](/files/-MPcV1m5Ktrz8RHnaO4h)

### 数据推送成功

以下为最终效果，通过模拟工具与后台进行连接并通过MQTT协议作数据推送

![](/files/-MPcVRKv2LFm3508UjGJ)

需要模拟更多其它数据内容请[参考应用开发者指南及协议API](/xie-yi-jie-kou.md)文档。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.yuncitys.com/kuai-su-ru-men/shi-yong-mo-ni-qi-ti-yan-quan-liu-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
