问题
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