-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4be5489
commit 45b3a25
Showing
10 changed files
with
2,262 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# 串口透传协议 | ||
|
||
## 发给主机 | ||
|
||
|数据|长度|含义|说明| | ||
|---|----|----|----| | ||
|EB AB 3F **A0** 75|5|索要主机状态| | ||
|EB AB 3F **A1** 76|5|索要防区|第一次索要时发送| | ||
|EB AB 3F **A2** 77|5|索要防区|在主机回应“还有更多防区”时发送此命令继续索要| | ||
|EB CB 3F 09 **A3** *P1* *P2* *P3* SUM|9|修改防区|*P1*:防区号,*P2*:防区属性,*P3*:操作码:0删除,1学码,2结束学码,3修改属性| | ||
|EB AB 3F **A5** 7A|5|索要定时器| | ||
|EB CB 3F 0E **A7** *H1 M1 H2 M2 H3 M3 H4 M4* SUM|13|设置定时器|第一组定时布防:*H1:M1*, 定时撤防:*H2:M2*;<br/> 第二组定时布防:*H3:M3*,定时撤防:*H4:M4*| | ||
|EB CB 3F 08 **A9** *DH DL* SUM|8|测试地址|*DH*:测试地址高位,*DL*:测试地址低位| | ||
|EB CB 3F 08 **AA** *P1 P2* SUM|8|修改防区探头遗失/失联|*P1*:防区号;*P2*: 0失联关,1失联开| | ||
|EB AB 3F **AC** 81|5|索要防区探头遗失/失联|第一次索要时发送| | ||
|EB AB 3F **AD** 82|5|索要防区探头遗失/失联|在主机回应“还有更多数据”时发送此命令继续索要| | ||
|EB CB 3F 08 **AE** *P1 P2* SUM|8|三区段主机布撤防|*P1*:0主机,1区段1,2区段2,3区段3;*P2*:0布防,1撤防| | ||
|EB CB 3F 06 **B0** AB|5|索要三区段主机状态|| | ||
|
||
## 主机回应 | ||
|
||
|数据|长度|含义|说明| | ||
|---|----|----|----| | ||
|EB BA 3F 07 *P0* **A0** *P1 P2 P3* SUM|10|主机状态回应|*P0*:语音;*P1*:0布防,1半布防,2撤防,3设置;*P2:主机类型| | ||
|EB BA 3F *PN* *P0* **A2** *[Z, P]xN P1* SUM|变长|主机防区数据回应|*PN*:N表示本条数据内包含多少防区,最大20;<br/> *P0*:语音;Z:防区号;P:防区属性;*P1*:FF表示没有更多数据了,其他表示还有更多数据| | ||
|EB BA 3F 07 *P0* **A3** SUM|7|学码开始回应|*P0*:语音。因为学码时主机要等待外部无线信号(用户触发探测器),<br/> 因此先回应A3表示已经开始学码,学码成功时再回 A4| | ||
|EB BA 3F 0A *P0* **A4** *P1 P2 P3* SUM|10|修改防区回应|*P0*:语音;*P1*:防区号;*P2*:防区属性;*P3*:0失败,1成功,2失败-重码,3失败-空防区| | ||
|EB BA 3F 0F *P0* **A6** *H1 M1 H2 M2 H3 M3 H4 M4* SUM|14|定时器回应|*P0*:语音;第一组定时布防:*H1:M1*, 定时撤防:*H2:M2*;<br/> 第二组定时布防:*H3:M3*,定时撤防:*H4:M4*| | ||
|EB BA 3F 07 *P0* **A7** SUM|7|修改定时器回应|*P0*:语音| | ||
|EB BA 3F 07 *P0* **A9** SUM|7|测试地址回应、激活|*P0*:语音| | ||
|EB BA 3F 09 *P0* **AB** *P1 P2* SUM|9|修改防区探头遗失/失联回应|*P0*:语音;*P1*:防区号;*P2*:0失联关,1失联开,2拒绝设置| | ||
|EB BA 3F *PN* *P0* **AD** *P1 DATA P2* SUM|变长|索要防区探头遗失/失联回应|回应所有失联开的防区。<br/> *PN*:失联开防区数量;*P0*:语音;<br/> *P1*:F0指示DATA以1个字节表示防区号,F1表示DATA以2个字节表示防区号;<br/> *DATA*:所有失联开的防区;<br/> *P2*:FF表示传输结束,其他表示还有更多数据| | ||
|EB BA 3F 08 *P0* **AF** *P1 P2* SUM|9|三区段主机布撤防回应|*P0*:语音;*P1*:0主机,1区段1,2区段2,3区段3;*P2*:0布防成功,1撤防成功| | ||
|EB BA 3F 08 *P0* **B1** *P1* SUM|8|三区段主机索要状态回应|*P0*:语音;<br/> *P1*:8位,7/6位主机状态,5/4位区段1状态,3/2位区段2状态,1/0位区段3状态<br/> 值为0布防,1撤防| | ||
|EB BA 3F 07 P0 A8 SUM|7|拒绝设置|主机如果认为对方的命令非法,都可以回复此条命令| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.