4G DTU产品
<p><strong>简介:</strong>
使用4G通信技术,实现服务器与本地客户端的实时通信。设备采用三网通模块,可灵活根据需求选择电信、联通、移动网络。我公司通用DTU产品仅支持MQTT与串口透传,支持SSL加密通信,可定制http、tcp、udp通信,且设备计算能力富足,定制实现轻量级数据解析及自动化工作。</p>
<p>注意:
设备出厂时默认为迅鸣设备,需要切换到用户自定义模式,才能配置;
切换到用户自定义模式后设备将无法再切换回迅鸣设备模式;
切换方法:通过串口向设备发送【rrpc,clear_pwd】即可;</p>
<pre><code class="language-c">
**默认参数:**
串口1配置:115200,8,N,1
【串口1--&gt;网络】透传发送topic:/xm/sh/response/mqtt/$gwsn/pub
【网络接收--&gt;串口1】消息topic:/sub/$gwsn/v2
网络接收指令topic:/xm/sh/request/mqtt/$gwsn/3001/v2
网络发送指令topic:/xm/sh/response/mqtt/$gwsn/3001/v2【固定不可修改】
网络转串口默认分帧间隔:900ms
串口转网络默认分帧间隔:20ms
**修改注意:**
1、mqtt订阅主题示例:【/xm/sh/request/mqtt/gwsn/+/v2;0;/sub/gwsn/v2;0】
解释:(以&quot;;&quot;分割的四个数据)
数据1为订阅的控制通道topic;
数据2为控制通道QOS;
数据3为网络透传到串口1的数据通道topic;
数据4为数据通道QOS;
2、发布消息主题示例:【/xm/sh/response/mqtt/gwsn/pub;0】
解释:(以&quot;;&quot;分割的两个数据)
数据1为串口1向网络透传时的topic;
数据2为发送QOS;
控制通道商标topic是固定的,不能修改;
遗嘱topic:/xm/sh/will/mqtt/$gwsn/3001/v2
遗嘱数据:willTopic
配置框填写示例:
{&quot;qos&quot;:0,&quot;retain&quot;:0,&quot;topic&quot;:&quot;willTopic&quot;,&quot;payload&quot;:&quot;willPayload&quot;}
注意:
①遗嘱功能可靠性不足,不能仅靠遗嘱判断设备下线需要增加备用机制。
②topic支持gwsn、imei两个变量,如{&quot;topic&quot;:&quot;willTopic/gwsn/imei&quot;},实际生效为{&quot;topic&quot;:&quot;willTopic/132xxxxx/86xxxx&quot;}。
③配置项目不改则无需填写,即保持默认值。
topic支持变量,变量清单如下:
imei:设备序列号,建议使用
muid
imsi
iccid
productid
messageid
productkey
devicename
gwsn:mqtt设置的客户端id,通常用于用户自定义的设备id。如果使用统一mqtt设置,则建议配置为为空,即自动使用imei号;
串口发送数据时,数据开头要避免使用如下关键字:
sync
comm
onli
erro
read
alar
chec
{\&quot;IdentifyID\&quot;
如果使用上述字符开头,设备“可能”会将数据识别为配置指令。
心跳topic:/xm/sh/request/mqtt/$gwsn/3001/v2
心跳数据:{&quot;header&quot;:{&quot;timeStamp&quot;:&quot;1749548154&quot;},&quot;payload&quot;:{&quot;devices&quot;:[{&quot;nodeid&quot;:&quot;000&quot;,&quot;action&quot;:&quot;sync&quot;,&quot;serviceid&quot;:&quot;30010101&quot;,&quot;params&quot;:{&quot;15&quot;:&quot;41&quot;,&quot;20&quot;:&quot;0&quot;,&quot;12&quot;:0}}]}}
其他配置项目参照【[4G产品MQ协议v2](https://www.showdoc.com.cn/1014034257250686/8384078571000608 &quot;4G产品MQ协议v2&quot;)】
</code></pre>
<hr />
<p>usb驱动下载:<a href="https://pan.baidu.com/s/1L0OHh7Mdz1vtgViisfqgcA?pwd=1111">https://pan.baidu.com/s/1L0OHh7Mdz1vtgViisfqgcA?pwd=1111</a> 提取码:1111
配置工具下载:<a href="https://pan.baidu.com/s/1udV8HNDkX4Ok0CpuZ20OtQ?pwd=1111">https://pan.baidu.com/s/1udV8HNDkX4Ok0CpuZ20OtQ?pwd=1111</a> 提取码:1111</p>
<p>设备本地配置方法:
安装驱动成功后,使用usb口连接设备,在本机设备管理器中会出现3个串口设备。
打开配置工具,串口选择“xxxx AT"串口,波特率选择115200,点击连接。
点击读取配置,提示信息解析成功,说明设备已成功连接。</p>
<p>注意:每次点击写入配置后,设备会重启,如果再次使用配置工具需要点击”断开“,再点击”连接“后才可操作。</p>