BM系统UART协议


无线开关类设备

<ul> <li> <p>更新说明</p> <pre><code>2024-06-01 23:34:37 星期六,整理UART指令段;</code></pre> </li> <li>UART指令段 数据结构中:第16-30个字节,设备数据; 本设备指令:0x02 NN NN,后面用 0xF5 补到16个字节满。</li> </ul> <table> <thead> <tr> <th style="text-align: center;">字节位置</th> <th style="text-align: center;">字节长度</th> <th style="text-align: center;">名称</th> <th style="text-align: center;">定义</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">0</td> <td style="text-align: center;">1</td> <td style="text-align: center;">指令</td> <td style="text-align: center;">0x02(固定值)</td> </tr> <tr> <td style="text-align: center;">1</td> <td style="text-align: center;">1</td> <td style="text-align: center;">使能位</td> <td style="text-align: center;">Bit7(第1路)至 Bit0(第8路),1:使能,0:忽略;</td> </tr> <tr> <td style="text-align: center;">2</td> <td style="text-align: center;">1</td> <td style="text-align: center;">状态位</td> <td style="text-align: center;">Bit7(第1路)至 Bit0(第8路),1:开,0:关;</td> </tr> </tbody> </table> <ul> <li>常用示例: <pre><code>第1路开:0x02 80(10000000) 80 (10000000) 第1路关:0x02 80(10000000) 00 (00000000) 第2路开:0x02 40(01000000) 40 (01000000) 第2路关:0x02 40(01000000) 00 (00000000) 第3路开:0x02 20(00100000) 20 (00100000) 第3路关:0x02 20(00100000) 00 (00000000) 第4路开:0x02 10(00010000) 10 (00010000) 第4路关:0x02 10(00010000) 00 (00000000) 第5路开:0x02 08(00001000) 08 (00001000) 第5路关:0x02 08(00001000) 00 (00000000) 第6路开:0x02 04(00000100) 04 (00000100) 第6路关:0x02 04(00000100) 00 (00000000) 第7路开:0x02 02(00000010) 02 (00000010) 第7路关:0x02 02(00000010) 00 (00000000) 第8路开:0x02 01(00000001) 01 (00000001) 第8路关:0x02 01(00000001) 00 (00000000) 8路全开:0x02 FF(11111111) FF (11111111) 8路全关:0x02 FF(11111111) 00 (00000000) 1234开 :0x02 F0(11110000) F0 (11110000) 1234关 :0x02 F0(11110000) 00 (00000000)</code></pre></li> </ul>

页面列表

ITEM_HTML