Anviz EP300. Unexpected data in response of Get Record Information command (0x3C)

﹥>﹥吖頭↗ 提交于 2020-01-06 05:26:09

问题


We have EP300 device working in server mode. I've implemented Anviz Client application in PHP language in accordance with this protocol description.

I have noticed some unexpected stuff in a handler for Get record information (0x3C) command: from time to time, with expected response (with ACK 0xBC), I'm receiving additional lines like this: a500000001df00000e000000000a259a2b6501030000001bd9.

Here is complete "parsed" example of such response:

STX |    CH    | ACK | RET | LEN  | DATA                                 | CRC16
--- | -------- | --- | --- | ---- | ------------------------------------ | --- 
a5  | 00000001 | bc  | 00  | 0012 | 00002600002a000002000000004e2c000003 | 0cc0
a5  | 00000001 | df  | 00  | 000e | 000000000a259a2b650103000000         | 1bd9

As I found in documentation, df ACK code is returned for Sent T&A record in real time CMD:0x5F. Not sure how it works but looks like it sends TA records in response of other commands. The DATA structure is the same as for Download T&A records CMD:0x40 command

User code  | Date&time | Backup code | Record type | Work types
---------- | --------- | ----------- | ----------- | ----------
000000000a |  259a2b65 |          01 |          03 |     000000

It makes me confused a bit and it is unexpected and I'm afraid it may cause some TA records lose. I suspect that after TA records are sent with "real time" response, they will not appear next time in response for "Download T&A records" command when I'm trying to fetch new TA records.

Can anyone advice with it:

  • How to properly handle "Sent T&A record in real time" items and "Download T&A records" together?
  • May be "Sent T&A record in real time" can be switched off?

Thanks

来源:https://stackoverflow.com/questions/59528983/anviz-ep300-unexpected-data-in-response-of-get-record-information-command-0x3c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!