Security PUSH Communication Protocol 20200325
Security PUSH Communication Protocol 20200325
Security PUSH
Communication Protocol
PUSH SDK
Date: March 2020
English
Thank you for choosing our product. Please read the instructions carefully
before operation. Follow these instructions to ensure that the product is
functioning properly. The images shown in this manual are for illustrative
purposes only.
Trademark
is a registered trademark of ZKTeco. Other trademarks involved in this manual are owned by
their respective owners.
Disclaimer
This manual contains information on the operation and maintenance of the ZKTeco equipment. The
copyright in all the documents, drawings, etc. in relation to the ZKTeco supplied equipment vests in and
is the property of ZKTeco. The contents hereof should not be used or shared by the receiver with any
third party without express written permission of ZKTeco.
The contents of this manual must be read as a whole before starting the operation and maintenance of
the supplied equipment. If any of the content(s) of the manual seems unclear or incomplete, please
contact ZKTeco before starting the operation and maintenance of the said equipment.
It is an essential pre-requisite for the satisfactory operation and maintenance that the operating and
maintenance personnel are fully familiar with the design and that the said personnel have received
thorough training in operating and maintaining the machine/unit/equipment. It is further essential for
the safe operation of the machine/unit/equipment that personnel has read, understood and followed the
safety instructions contained in the manual.
In case of any conflict between terms and conditions of this manual and the contract specifications,
drawings, instruction sheets or any other contract-related documents, the contract
conditions/documents shall prevail. The contract specific conditions/documents shall apply in priority.
ZKTeco offers no warranty, guarantee or representation regarding the completeness of any information
contained in this manual or any of the amendments made thereto. ZKTeco does not extend the warranty
of any kind, including, without limitation, any warranty of design, merchantability or fitness for a
particular purpose.
ZKTeco does not assume responsibility for any errors or omissions in the information or documents which
are referenced by or linked to this manual. The entire risk as to the results and performance obtained
from using the information is assumed by the user.
ZKTeco in no event shall be liable to the user or any third party for any incidental, consequential, indirect,
special, or exemplary damages, including, without limitation, loss of business, loss of profits, business
interruption, loss of business information or any pecuniary loss, arising out of, in connection with, or
relating to the use of the information contained in or referenced by this manual, even if ZKTeco has been
advised of the possibility of such damages.
This manual and the information contained therein may include technical, other inaccuracies or
typographical errors. ZKTeco periodically changes the information herein which will be incorporated into
new additions/amendments to the manual. ZKTeco reserves the right to add, delete, amend or modify
the information contained in the manual from time to time in the form of circulars, letters, notes, etc. for
better operation and safety of the machine/unit/equipment. The said additions or amendments are
meant for improvement /better operations of the machine/unit/equipment and such amendments shall
not give any right to claim any compensation or damages under any circumstances.
ZKTeco shall in no way be responsible (i) in case the machine/unit/equipment malfunctions due to any
non-compliance of the instructions contained in this manual (ii) in case of operation of the
machine/unit/equipment beyond the rate limits (iii) in case of operation of the machine and equipment
in conditions different from the prescribed conditions of the manual.
The product will be updated from time to time without prior notice. The latest operation procedures and
relevant documents are available on http://www.zkteco.com
ZKTeco Headquarters
Address ZKTeco Industrial Park, No. 26, 188 Industrial Road,
The founders of ZKTeco have been determined for independent research and development of biometric
verification procedures and the productization of biometric verification SDK, which was initially widely
applied in PC security and identity authentication fields. With the continuous enhancement of the
development and plenty of market applications, the team has gradually constructed an identity
authentication ecosystem and smart security ecosystem, which are based on biometric verification
techniques. With years of experience in the industrialization of biometric verifications, ZKTeco was
officially established in 2007 and now has been one of the globally leading enterprises in the biometric
verification industry owning various patents and being selected as the National High-tech Enterprise for 6
consecutive years. Its products are protected by intellectual property rights.
All figures displayed are for illustration purposes only. Figures in this manual may not be
exactlyconsistent with the actual products.
Document Conventions
GUI Conventions
For Software
Convention Description
Bold font Used to identify software interface names e.g. OK, Confirm, Cancel
> Multi-level menus are separated by these brackets. For example, File > Create > Folder.
For Device
Convention Description
<> Button or key names for devices. For example, press <OK>
Window names, menu items, data table, and field names are inside square brackets. For
[]
example, pop up the [New User] window
Symbols
Convention Description
This implies about the notice or pays attention to, in the manual
example.
Revision History
2018/8/29 V1.0 1. Added protocols for visible light face Yan Guangtian
recognition
First
2018/4/16 Li Xianping
edition
Table of Contents
1 Abstract...................................................................................................................................................................................... 14
2 Features ..................................................................................................................................................................................... 14
3 Encoding ................................................................................................................................................................................... 14
4 About HTTP .............................................................................................................................................................................. 14
5 Definition .................................................................................................................................................................................. 15
6 Functions................................................................................................................................................................................... 17
6.1 Specification of Hybrid Identification Protocol .............................................................................................. 17
7 Process ....................................................................................................................................................................................... 20
7.1 Initialize Information Interaction ......................................................................................................................... 20
7.2 Exchange Public Keys (scenarios in which communication encryption is supported) .................... 24
7.3 Exchange Factors (scenarios in which communication encryption is supported) ............................ 25
7.4 Registration ................................................................................................................................................................. 27
7.5 Download Configuration Parameters ................................................................................................................ 34
7.6 Upload Device Parameters..................................................................................................................................... 36
8 Authorization ........................................................................................................................................................................... 38
9 Heartbeat .................................................................................................................................................................................. 40
10 Upload ..................................................................................................................................................................................... 42
10.1 Upload Method........................................................................................................................................................ 42
10.2 Upload Real-time Events ...................................................................................................................................... 42
10.3 Upload Real-time Status ....................................................................................................................................... 44
10.4 Upload Returned Result of the Command .................................................................................................... 45
10.5 Upload User Information...................................................................................................................................... 47
10.6 Upload the Identity Card Information ............................................................................................................. 49
10.7 Upload Fingerprint Template ............................................................................................................................. 53
10.8 Upload Comparison Photo .................................................................................................................................. 56
10.9 Upload Snapshot..................................................................................................................................................... 58
10.10 Upload User Photo ............................................................................................................................................... 60
10.11 Upload Integrated Template ............................................................................................................................ 62
10.12 Upload Error Log................................................................................................................................................... 65
11 Download ............................................................................................................................................................................... 68
11.1 Download Cache Command............................................................................................................................... 68
12 Details of Server Commands ........................................................................................................................................... 70
12.1 Data .............................................................................................................................................................................. 70
12.1.1 Update............................................................................................................................................................ 70
12.1.2 Delete ............................................................................................................................................................. 103
12.1.3 Count .............................................................................................................................................................. 122
12.1.4 Query .............................................................................................................................................................. 127
1 Abstract
The PUSH protocol is a data protocol defined on the basis of the hypertext transfer protocol (HTTP) and is
established on TCP/IP connections. It mainly controls the data interaction between the server and
ZKTeco's devices, such as the T&A devices and access control devices. It defines the transmission format
of data (including user information, biometric templates, and access control records) and the command
format of control devices. At present, the protocol supports ZKTeco's WDMS, ZKECO, ZKNET,
ZKBioSecurity3.0, and other servers as well as third-party servers such as Indian ESSL.
2 Features
New data is actively uploaded.
All actions, such as data upload and command delivered by the server, are all initiated by the client.
3 Encoding
Most of the data transmitted over the protocol are ASCII characters, but some fields, such as the user
name, need to be encoded. This type of data is prescribed as follows:
When the data is in Chinese, encode it with the GB2312 character set.
When the data is in other languages, encode it with the UTF-8 character set.
4 About HTTP
The PUSH protocol is a data protocol defined on the basis of HTTP. The following describes what is HTTP
briefly. If you are familiar with HTTP, skip this section.
HTTP is a request/response protocol. The client sends to the server a request method, a URI, and a
protocol version number, and then sends a MIME-like message that contains request modifiers, client
information, and possible message body immediately. The server sends a status line to the client and
then a MIME-like message that contains the server information, the entity metadata, and possible entity
body immediately. The status line contains the protocol version number of the request and a success or
failure error code. The following is an example:
Client request:
GET http://113.108.97.187:8081/iclock/accounts/login/?next=/iclock/data/iclock/ HTTP/1.1
User-Agent: Fiddler
Host: 113.108.97.187:8081
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Date: Fri, 10 Jul 2015 03:53:16 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: close
Content-Language: en
Expires: Fri, 10 Jul 2015 03:53:16 GMT
Vary: Cookie, Accept-Language
Last-Modified: Fri, 10 Jul 2015 03:53:16 GMT
ETag: "c487be9e924810a8c2e293dd7f5b0ab4"
Pragma: no-cache
Cache-Control: no-store
Set-Cookie: csrftoken=60fb55cedf203c197765688ca2d7bf9e; Max-Age=31449600; Path=/
Set-Cookie: sessionid=06d37fdc8f36490c701af2253af79f4a; Path=/
0
HTTP communication usually occurs over TCP/IP connections. The default port is TCP 80, but other ports
can also be used. However, HTTP communication can also be implemented over other protocols. HTTP
communication only expects a reliable transmission and generally is established on the transmission layer
protocol. Therefore, any protocol providing such a guarantee can be used.
5 Definition
The definition referred to in the document is in the format of ${ServerIP}.
ServerIP is the IP address of the server.
ServerPort is the port of the server.
XXX is an unknown value.
Value1\Value2\Value3……\Valuen means value 1\value 2\value 3……\value n.
Required means a required value.
Optional means an optional value.
SerialNumber is the serial number which can be letters, numbers, or a combination of letters and
numbers.
NUL: null (\0).
SP means a space.
LF means a line feeder (\n).
6 Functions
The following describes functions supported by the PUSH protocol for the client.
Initialize information interaction
Upload
Download
Server command details
Appendixes
In order to simplify the development process, the specifications for biological template/ photo issue/
1) The device pushes the following 5 parameters to the server through registration interface:
2) The server issues the following two parameters to the device through the [Download Configuration
3) Both the device and the server will determine the finally supported hybrid identification template/
photo type based on the MultiBioDataSupport and MultiBioPhotoSupport parameters pushed by each
other.
For example:
The device supports fingerprint templates, visible light face templates, and visible light face photos. The
software supports face templates and visible light face photos. Because the software does not support
fingerprint templates, finally after the device docking with the software, it only support visible light face
After successfully connecting to the hybrid identification protocol, a unified template format can be used
1) For devices that support hybrid identification protocol, the maximum number of templates/ photos
supported by the current device will be pushed to the server at the registration interface:
MaxMultiBioDataCount, MaxMultiBioPhotoCount.
2) The server can get the number of photos/templates saved by the current device by [Get comparison
Hybrid identification protocol specification real-time upload of unified templates and photos:
1) The bio-templates/ comparison photos registered by the device will be uploaded to the server in real
time.
Upload interface refer to [upload unified templates] and [upload comparison photos].
2) You can use PostBackTmpFlag to specify whether you want the device to return the unified templates
For devices that support both templates and photos issuing, the server can determine the device
template version number based on the MultiBioVersion parameter uploaded by the device. If the server
has saved the template of the current version number, the template can be issued first instead of
comparison photos.
Note: To issue the comparison photos, the device needs to extract photos into templates, which is less
7 Process
In PUSH mode, the client must first initiate a request to initialize information interaction and can use
other functions only after the request is successful, such as uploading data, obtaining server commands,
uploading update information, and replying to the server commands. These functions can be used in any
sequence, specifically depending on the development of the client applications, as shown in the
following figure:
registration code and its configuration parameters and completes the connection. If the device is not
registered, the client needs to initiate a registration request and send device parameters to the server.
After the device is registered, the server returns the registration code. Then, the client sends a request to
download the server configuration parameters.
The interaction is successful after the client obtains the configurations. The details are as follows:
Connection request of the client.
Application scenario:
If the device has not connected to the software, it needs to send a connection request to create a
connection.
Format of the client's connection request message: (compatible with the old protocol):
Host: ${ServerIP}:${ServerPort}
Note:
If the device is not registered, the format of the normal server response is as follows:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: ${XXX}
Date: ${XXX}
OK
If the device has been registered, the format of the normal server response is as follows:
HTTP/1.1 200 OK
Server: ${XXX}
Content-Length: ${XXX}
Date: ${XXX}
…
registry=ok
RegistryCode=${XXX}
ServerVersion=${XXX}
ServerName=${XXX}
PushProtVer=${XXX}
ErrorDelay=${XXX}
RequestDelay=${XXX}
TransTimes=${XXX}
TransInterval=${XXX}
TransTables=${XXX}
Realtime=${XXX}
SessionID=${XXX}
TimeoutSec=${XXX}
Note:
Realtime: Specifies whether the client transmits new records in real time. 1 means that any new data is
transmitted to the server. 0 means that the data is transmitted according to the values of TransTimes and
TransInterval. If no value is configured at the client, the default value 1 is used.
SessionID: The ID of the PUSH communication session. This field is used to calculate the new Token for all
subsequent requests from the device.
TimeoutSec: The network timeout time. If no value is configured at the client, the default value 10s is
used.
If the device has been registered, the software will and must return the registry and RegistryCode;
otherwise, the software does not return the registry and RegistryCode.
HTTP status line: It is defined by the standard HTTP.
HTTP response header:
Date header: ${Required} This header is used to synchronize the server time in the GMT format. For
example, Date: Fri, 03 Jul 2015 06:53:01 GMT
Content-Length header: According to HTTP 1.1, this header is generally used to specify the length of the
response entity. If you do not know the length, you can also set Transfer-Encoding to chunked. Both
Content-Length and Transfer-Encoding are headers defined by standard HTTP, which are not described in
detail here.
Example:
The device pushes its public key to the server and receives the server's public key from the server.
POST /iclock/exchange?SN=$(SerialNumber)&type=publickey
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
…
PublicKey=${XXX}
Note:
HTTP/1.1 200 OK
Server: ${XXX}
Set-Cookie: ${XXX}; Path=/; HttpOnly
Content-Type: application/push;charset=UTF-8
Content-Length: ${XXX}
Date: ${XXX}
PublicKey=${XXX}
Note:
Example:
Accept: application/push
Accept-Charset: UTF-8
Accept-Language: zh-CN
Content-Type: application/push;charset=UTF-8
Content-Language: zh-CN
Content-Length: 3580
PublicKey=DMCtR13RwiGI4M9TRn/3xEmkddz2lqoZR7zUrOMhOc3FLvhLtpIWs3REOSaKT4A9WO0ONt3V+
mVb0W3Ka3NeCTWLjf9LplV1EyJIoZwXspGroPMTEWitLE+LLsrO1r47OQRr62j5YSViUDKgzLVCvEek2iJ+3D
181Z3qxV7a7WIoQ9DUGiPaU8gml4cmiyqQimxIQ1wwMcMpcIFOIsSx7UjCG+D41dM/vh5UZxrQwn7IiMO
mNdFXlB+TOjaJ+4K/n3TDjubrbebqx6H2+nErH1mBuCCSNIKfwc5earkNfXPuqgBNGqCFJojgcQiOySquaq2
DFXdUwYBLIURDnBLf+TtoSh4=
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 590
Date: Mon, 10 Sep 2018 10:10:55 GMT
PublicKey=DMCvFlzRwiGI4M9TRn/3xEmkddz2lqoZR7zUrOMhOc3FLvhLtpIYu3ZMNSeKVLcZUv4iHNnxzl9
B8SfuVSxXAwyijYAj6Wg4YyxTj4stv4K7q54sUCikb1CbQ/H0m9QZGyhM1WjrHhppXT/CsOAquEy/2gxfrSt3
nai38Hb/8QoTHvnXJR2EVpcY6u47jBeGiXM3ZUQgCtcdB7JBXsOr71XWEsLX1fIC3GofGCy0g0bUkumWJfN
KwBWfWzb95o6klDi8uP/wU+DS1uLs1VcCN0WNtX+DCajyzcYvecR8cgbs0F1QfMmiRr/dYAOkwF/bSMyuL
kd+o6FmLBAh9keFtgkFa+PC5RlFGrmxpJx4lMoLfaNqUNwyAuRdKezvYBDUrRhGwgtwo/BRGUoWCeOB4Y
P/gHHGro0M8f3/HlSqliuT55Xks/Btp1tpfO/OeJjELUA9Yu0o4TQlnM19PuOGsYhipM9NeGGexKjtotHotLT4C
cso04nAf7TltDavoPvVGJGiDbnN7l8wsUCsqcCRsiKhpmON2waLjdFa8PNJ62N6Dl6QRPKn9XLnIDFdtKSq5V
gn
The device pushes its factors to the server and receives the server's factors from the server.
POST /iclock/exchange?SN=$(SerialNumber)&type=factors
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
…
Factors=${XXX}
Note:
HTTP/1.1 200 OK
Server: ${XXX}
Set-Cookie: ${XXX}; Path=/; HttpOnly
Content-Type: application/push;charset=UTF-8
Content-Length: ${XXX}
Date: ${XXX}
Factors=${XXX}
Note:
Example:
Server: Apache-Coyote/1.1
Content-Length: 180
Date: Mon, 10 Sep 2018 10:10:55 GMT
Factors=XQ10e0WiFtslJW5ob221T/WCK42GXGP6mmiBB9yB93rD3CxlKZo3mavyqfTKFxtCn8AtkxL7MH4U
eRvRnFTrv3Q4kKaYndiiphuvxOGQxrzcGGjH0sRzgPcTtAQu0U7A8vg2sMzZOxokqLuDVE5nlsx1/1V46wTK+
oNU9q8fgKM=
7.4 Registration
Application scenario:
After the client sends a connection request, if no registration code is returned (which means that the
device is not registered), the client needs to send a registration request to register the device.
Note: HTTP request method: POST URI: /iclock/registry HTTP version: 1.1
reader)
33 0: not supported; 1: supported. Whether Wiegand data processing, byte swap, and bit
reversal are supported
34 0: not supported; 1: supported. Whether desfire control card is supported
35 0: not supported; 1: supported. Whether the two-dimensional code command can be
delivered
36 0: not supported; 1: supported. Whether zksq200 can be added to the advertisement
delivery command
37 0: not supported; 1: supported. Whether zksq200 can be added to the indoor device
38 0: not supported; 1: supported. Whether comparison photos can be uploaded
39 0: not supported; 1: supported. Whether the integrated visible light face template can be
uploaded
40 0: not supported; 1: supported. Whether the device can be remote registered
41 0: not supported; 1: supported. Whether the device supports setting the verification result
format
42 0: not supported; 1: supported. Whether the device supports setting the verification server
43 0: not supported; 1: supported. Whether the device supports delivering the resource files,
such as voice files, boot screen, welcome page, and screensaver page
44 0: not supported; 1: supported. Whether the device can connect to an AI device (for
non-inbio5-series devices that do not support the reader property table, such as inbioPro)
HTTP/1.1 200 OK
Server: ${XXX}
Set-Cookie: ${XXX}; Path=/; HttpOnly
Content-Type: application/push;charset=UTF-8
Content-Length: ${XXX}
Date: ${XXX}
RegistryCode=${XXX}
Note:
Example:
Accept: application/push
Accept-Charset: UTF-8
Accept-Language: zh-CN
Content-Type: application/push;charset=UTF-8
Content-Language: zh-CN
Content-Length: 855
DeviceType=acc,~DeviceName=F20/M,FirmVer=Ver 8.0.1.3-20151229,PushVersion=Ver
2.0.22-20161201,CommType=ethernet,MaxPackageSize=2048000,LockCount=1,ReaderCount=2,AuxInCo
unt=0,AuxOutCount=0,MachineType=101,~IsOnlyRFMachine=0,~MaxUserCount=50,~MaxAttLogCount=
10,~MaxUserFingerCount=10,MThreshold=60,IPAddress=192.168.213.221,NetMask=255.255.255.0,GATEI
PAddress=192.168.213.1,~ZKFPVersion=10,IclockSvrFun=1,OverallAntiFunOn=0,~REXInputFunOn=0,~Ca
rdFormatFunOn=0,~SupAuthrizeFunOn=0,~ReaderCFGFunOn=0,~ReaderLinkageFunOn=0,~RelayStateF
unOn=1,~Ext485ReaderFunOn=0,~TimeAPBFunOn=0,~CtlAllRelayFunOn=0,~LossCardFunOn=0,SimpleE
ventType=1,VerifyStyles=ff7f0000,EventTypes=BF0FE03D300001000000000070000000000000000000000
00077002001000000,DisableUserFunOn=0,DeleteAndFunOn=0,LogIDFunOn=0,DateFmtFunOn=0,DelAll
LossCardFunOn=0,AutoClearDay=0,FirstDelayDay=0,DelayDay=0,StopAllVerify=0,FvFunOn=0,FaceFunO
n=0,FingerFunOn=1,CameraOpen=1,AccSupportFunList=0101010000111000000111010100011010,Auto
ServerFunOn=1,DelayOpenDoorFunOn=1,UserOpenDoorDelayFunOn=1,MultiCardInterTimeFunOn=1,O
utRelaySetFunOn=1,MachineTZFunOn=1,DSTFunOn=1,CardSiteCodeFunOn=1,MulCardUserFunOn=1,Us
erNameFunOn=1,StringPinFunOn=1,MaxLockCount=4,MaxZigbeeCount=3,MaxMCUCardBits=37,Suppor
tReaderType=1,authKey=dassas
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=30BFB04B2C8AECC72C01C03BFD549D15; Path=/; HttpOnly
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 23
Date: Mon, 09 Jan 2017 01:31:59 GMT
RegistryCode=Uy47fxftP3
After the registration code is returned after the registration request is successful in the previous step, the
device needs to actively obtain the server configuration parameters and then the whole initialization
process is finished.
HTTP/1.1 200 OK
Server: ${XXX}
Content-Type: application/push;charset=UTF-8
Content-Length: ${XXX}
Date: ${XXX}
…
ServerVersion=${XXX}
ServerName=${XXX}
ErrorDelay=${XXX}
RequestDelay=${XXX}
TransTimes=${XXX}
TransInterval=${XXX}
TransTables=${XXX
Realtime=${XXX}
SessionID=${XXX}
TimeoutSec=${XXX}
Note:
RequestDelay: The interval (in seconds) at which the client sends the command acquiring request. If no
value is configured at the client, the default value 30s are used.
TransTimes: The time point in which the newly transmitted data is regularly checked. If no value is
configured, the default value 12:30;14:30 is used.
TransInterval: The interval (in minutes) at which the system checks whether any new data needs to be
transmitted. If no value is configured at the client, the default value 2 min is used.
TransTables: The new data that needs to be checked and uploaded. The default value is User Transaction,
which means the user and access control records need to be automatically uploaded.
Realtime: Specifies whether the client transmits new records in real time. 1 means that any new data is
transmitted to the server. 0 means that the data is transmitted according to the values of TransTimes and
TransInterval. If no value is configured at the client, the default value 1 is used.
SessionID: The ID of the PUSH communication session. This field is used to calculate the new Token for all
subsequent requests from the device.
TimeoutSec: The network timeout time. If no value is configured at the client, the default value 10s is
used.
BioPhotoFun: Specify whether to support the comparison photo parameter.
BioDataFun: Specify whether to support the visible light face template parameter.
MultiBioDataSupport: Supports multi-modal bio-template parameters. The type is defined bit by bit.
Different types are separated by colons, 0 means not supported, 1 means supported. The supported
version number, such as: 0: 1: 1: 0: 0: 0: 0: 0: 0: 0, indicating support for fingerprint template and
near-infrared face template.
MultiBioPhotoSupport: Supports multi-modal biometric photo parameters. The type is defined bit by bit.
Different types are separated by colons, 0 means not supported, 1 means supported. The supported
version number, such as: 0: 1: 1: 0: 0: 0: 0: 0: 0: 0, indicating support for fingerprint photo and near-infrared
face photo.
Note:
The token calculation method: The client encrypts the values of RegistryCode, SerialNumber, and
SessionID with the MD5 algorithm and then converts the calculated value to a hexadecimal string. The
hexadecimal string is the token.
Example:
Accept-Language: zh-CN
Content-Type: application/push;charset=UTF-8
Content-Language: zh-CN
Content-Length: 0
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 218
Date: Mon, 09 Jan 2017 01:31:59 GMT
ServerVersion=3.0.1
ServerName=ADMS
PushVersion=3.0.1
ErrorDelay=60
RequestDelay=2
TransTimes=00:0014:00
TransInterval=1
TransTables=User Transaction
Realtime=1
SessionID=30BFB04B2C8AECC72C01C03BFD549D15
TimeoutSec=10
HTTP/1.1 200 OK
Server: ${XXX}
Content-Length: ${XXX}
Date: ${XXX}
OK
Note:
Example:
8 Authorization
Only requests of the master control device are authorized. For the definition of the master control
device, see Appendix 15.
The master control device actively pushes the sub-control authorization table to the software.
• When the device is started, the authorization table is pushed to the software.
• Any change to the authorization table is pushed to the software.
• Protocol:
• POST
/iclock/cdata?SN=123456789&type=registry&table=tabledata&tablename=DeviceAuthorize&count=1
• Host: 113.108.97.187:8081
• DeviceAuthorize SN=%?\tOnline=%?\tIsAuthorize=%?\tAuthorizeInfo=%?\tRegisterInfo=%?
• Note
• SN: The serial number of the secondary controller
• Online: Indicate whether the secondary controller is online
• IsAuthorize: Indicate whether it is authorized. 0 means Unauthorized, 1 means Authorization in Progress,
and 2 means Authorized.
• AuthorizeInfo: The simple device information pushed by the secondary controller when it is not
authorized
• RegisterInfo: The device registration information pushed by the secondary controller after it is
authorized
The software authorizes the secondary controller based on the pushed authorization table.
After receiving the registration information of the secondary controller, the software delivers the
final authorization command.
• After receiving the registration information of the secondary controller, the software delivers the final
authorization command.
• Based on the authorization delivered by the software, BioIR9000 allows access from the specified
secondary controller.
• Authorization is completed.
• Protocol:
• C:296:DATA UPDATE DeviceAuthorize SN=%?\tIsAuthorize=2
• Protocol:
• C:295:DATA DELETE DeviceAuthorize SN=%?
9 Heartbeat
Application scenario:
It is used to retain the heartbeat with the server. During the upload of massive data, the ping command is
used to retain the heartbeat. After the massive data is processed, the getrequest command is used to
retain the heartbeat.
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: ${XXX}
Date: ${XXX}
OK
Note:
Example:
Server: Apache-Coyote/1.1
Content-Length: 2
Date: Tue, 10 Jan 2017 07:42:41 GMT
OK
10 Upload
Messages are uploaded immediately. The device supports this mode by default and you can control the
upload mode on the server. For details, see the parameter Realtime in Initialize Information Interaction.
Messages are uploaded at an interval. You can set the specific interval on the server. For details, see the
parameter TransInterval in Initialize Information Interaction.
Messages are uploaded at a specific time point. You can set the specific time point on the server. For
details, see the parameter TransTimes in Initialize Information Interaction.
When a real-time event occurs, the device needs to immediately upload the real-time event information
to the software.
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: ${XXX}
Date: ${XXX}
OK
Note:
URI: /iclock/cdata
HTTP version: 1.1
Table name: rtlog
Request entity: ${DataRecord}, the real-time event data in the format of:
time=${Time}${HT}pin=${Pin}${HT}cardno=${XXX}${HT}eventaddr=${XXX}${HT}event=${XXX}${HT}inoutst
atus=${XXX}${HT}verifytype=${XXX}${HT}index=$(xxx)
time: The time, in the format of XXXX-XX-XX XX:XX:XX
pin: The user ID
cardno: The card number
eventaddr: The event point. The default value is doorid.
event: The event code. See Appendix 2.
inoutstatus: The in/out status. 0 indicates In, and 1 indicates Out.
verifytype: The current verification mode
index: The access control record ID. Each access control record has a unique ID in the device.
Example:
It is used to regularly upload the access control status to change to the access control status of the
current device to the software.
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: ${XXX}
Date: ${XXX}
OK
Note:
defined as follows:
First bit: Accidental door opening event
Second bit: Tamper alarm
Third bit: Duress password alarm
Fourth bit: Duress fingerprint alarm
Fifth bit: Door sensor timeout alarm
Sixth to eighth bits: reserved
Example:
It is used to return the execution result to the server after the command delivered by the server is
executed.
Client request:
…
${DataRecord}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: ${XXX}
Date: ${XXX}
OK
Note:
Example:
Client request:
POST /iclock/devicecmd?SN=3383154200002 HTTP/1.1
Cookie: token=1637f0b091af92b0cc66b8eede0ae48e
Host: 192.168.213.17:8088
User-Agent: iClock Proxy/1.09
Connection: starting
Accept: application/push
Accept-Charset: UTF-8
Accept-Language: zh-CN
Content-Type: application/push;charset=UTF-8
Content-Language: zh-CN
Content-Length: 35
ID=1&Return=0&CMD=DATA UPDATE
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 2
Date: Wed, 11 Jan 2017 01:30:08 GMT
OK
The device actively uploads the user information. Generally after a user is registered, the device
automatically uploads the user information to the server.
Note:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: ${XXX}
Date: ${XXX}
user=${XXX}
Note:
user: The number of users received by the server this time
Example:
Connection: starting
Accept: application/push
Accept-Charset: UTF-8
Accept-Language: zh-CN
Content-Type: application/push;charset=UTF-8
Content-Language: zh-CN
Content-Length: 104
user uid=5 cardno= pin=4 password= group=1 starttime=0 endtime=0 name= privilege=0
disable=0 verify=0
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 6
Date: Thu, 12 Jan 2017 00:49:31 GMT
user=1
The device actively uploads the identity card information. Generally after an identity card is registered,
the device automatically uploads the identity card to the server.
POST /iclock/cdata?SN=${SerialNumber}&table=tabledata&tablename=identitycard&count=${XXX}
HTTP/1.1
Cookie: token=${XXX}
Host: {ServerIP}:${ServerPort}
Content-Length: ${XXX}
${DataRecord}
Note:
ender=${XXX}$(HT)Nation=${XXX}$(HT)Birthday=${XXX}$(HT)Valid_Info=${XXX}$(HT)Address=${XXX}$(H
T)Additional_Info=${XXX}$(HT)Issuer=${XXX}$(HT)Photo=${XXX}$(HT)PhotoJPG=${XXX}$(HT)FP_Templat
e1=${XXX}$(HT)FP_Template2=${XXX}$(HT)Reserve=${XXX}$(HT)Notice=${XXX}
Note:
Pin: The user ID
SN_Num: The physical number of the identity card
ID_Num: The number of the citizen identity card
DN_Num: The SN of the resident identity card (the card management number)
Name: The name, UTF-8-encoded
Gender: The gender code
1: Male
2: Female
Nation: The nationality code
0: Decoding Error
1: Han
2: Mongol
3: Hui
4: Tibetan
5: Uyghur
6: Miao
7: Yi
8: Zhuang
9: Buyi
10: Korean
11: Manchu
12: Dong
13: Yao
14: Bai
15: Tujia
16: Hani
17: Kazak
18: Dai
19: Li
20: Lisu
21: Va
22: She
23: Gaoshan
24: Lahu
25: Shui
26: Dongxiang
27: Naxi
28: Jingpo
29: Kirgiz
30: Tu
31: Daur
32: Mulao
33: Qiang
34: Blang
35: Salar
36: Maonan
37: Kelao
38: Xibe
39: Achang
40: Pumi
41: Tajik
42: Nu
43: Ozbek
44: Russian
45: Ewenki
46: De'ang
47: Baoan
48: Yugu
49: Jing
50: Tatar
51: Drung
52: Oroqen
53: Hezhe
54: Monba
55: Lhoba
56: Jino
57: Encoding Error
97: Other
98: Foreign Origin
Birthday: The date of birth, in the format of yyyyMMdd
Valid_Info: The validity period, start time and end time, in the format of yyyyMMddyyyyMMdd
Address: The address, UTF-8-encoded
Additional_Info: The additional information read by the machine, UTF-8-encoded
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: ${XXX}
Date: ${XXX}
identitycard=${XXX}
Note:
identitycard: The number of identity cards received by the server this time
Example:
FPTemplate2=QwGIEgEQUAAAAAAAAAAAAAAAADIBmkbyAP///////3UYCPxXQs38qEVW/rpLovwyUBv8W
V8 Reserve= Notice=
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 6
Date: Thu, 12 Jan 2017 00:49:31 GMT
identitycard=1
The device actively uploads the fingerprint template. Generally after a user fingerprint is registered, the
device automatically uploads the fingerprint to the server.
POST /iclock/cdata?SN=${SerialNumber}&table=tabledata&tablename=templatev10&count=${XXX}
HTTP/1.1
Cookie: token=${XXX}
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
…
${DataRecord}
Note:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: ${XXX}
Date: ${XXX}
templatev10=${XXX}
Note:
templatev10: The number of fingerprint templates using the 10.0 algorithm received by the server
Example:
gC9AKwPWUrBAGcPLAAPAFpFjQDNAHYPEADIShoPagDRAKcPf0riAFcPLQAtAFxElADtAGEPpwDqSkoP3A
DxAOMP/krzACMPmgA8ABRFHgD8ANkO+AAFS00PLAACAZUOx0oDAZgOdADPATdFvAAOAY8OnAAKSz
oPyAAVAU8NT0oWAT8PowDkAQNF3wAhAYENUQApSxIPQQAwAfsPBUs5AYIOUAD4AS5FEAE9AYwO8QB
ES0AOewBHAd8PR0pRATIPGwCWAV9FahcnAzN/9wRDQT+H/+9bh+JrUMtkBbIAFH4s/XNDXH1GAPr51YZ
Qy/ePqYVZhap9qDfHAOf5oYvaCB7Ep/zegJt8RIE7Q5aEgYEmBCORoDUjdV8bLQ8ngAM0PAbG+bJ+fPtnQ
vN1aSNCFEMVE8ef9Yf5wf6EDm9SzPaZDwXjRIJsQVAPUFOtDxPsIL0D6F4YXgQDkBNH4/z/Cbem5bMP9Ie
GuYiBgmuMtLZgD933wXjoBPSxOQsdEdJ0DPv/ohfewPsIB5+ItLY8C9rwjP9s9QhALATt95EDJPVnMm9+lfq
W9t8CUEfP+RPgYRVY/RRJCPmaApf7MO20sNDvgQ2LD25rZFsYBTkbRgk3805c8PEpCg70yxgjYAodP0PuHt
gjJQQAAvIoUg3FOQVahMBKQ/8FxYoHQz4IAHoHCY5TCkokD/04wMAF/m2KYAsAKhYDllFJRAELK/TBMTp
Hx30TAAky/cP1/lYRwP/AcQYAlzKGi8NpCwBaNsNCxQF2BgBSOH29wQFKtjsTfQ0A0VDxHUDAVf8LAO1U9
XE8WwQAuVvJQQlKn16Mc8GAB2QCSqdhAzZMDMWYZ8xThHfACQC8Y4PKaMEKAIFmw0/EBsEHAKtnCTv
B+hMIAHloff9GcQlKdHQGXsH/BDb6QgF2gobCwUbBAEp/hQA2CgC3h4U0wsE/BAAsSWdeWQESjun//4L+
bbVC/0wGAL9XDPiLWwYAv5cTgcEQSguc58AvwPZgXYr8ZBEAwatWwnfBw8H/wsCF1QC25o1xg3HB/lEJB
f+sDP9DSxbFGr+jaf5MNv7/OlVitxcABb7i/pP/NwtHRMBNBQCdwWzOEwDRypeEBcKDtMOTZwQAKQ5gak
QBkMwDLv8FMsSKmgcA2cwW8jwASmfQacKICMWJ1T3AxMHBkwTF19RQQw0AaNVkB8GBFsBbDwB35KX
FicLEUMHCEgBU6nKNxcbBwcN8VsI5RwFm6977wDr8K3L+BACZ7QPnDgXY8WfFyMLCAcDGi8P/wP8DADr
yG7UKAF7zU8M6w8fCgwsAZPNMBMRsw8MGAN3zJJDBH0sU9KBqc2+vw8QuxXLB/8EExfzzbW4FAJ33DD
h2AUqU+S3GwgPFnPhZwQUQHABWBIwBWogBMKEIEPwDVTFZBxA/BEy2TgJaKgVWgyYF1ZIDasKUGRDT
Clv+xInDxP+ywcIBgvqIw//DwH8Q1XQIfonBwYh+weMJFRMTQMPAloHCEEJQQnDEwQMQiRo4igQQpx8D
wAb8GlsUIaTB/nSuwoUliIPA/8HCr/sCWqYlDJAzCdWYK13DjF4gERXrpMR9d8CIhMKGBmLHi/7Bwf39+cEQ
Sgo2nQQQVEDogwBaf0oewnME1f9hN0tSQgALQ8QABUFEUg== resverd= endtag=
templatev10 size=1928 uid=3 pin=4 fingerid=6 valid=1
template=TOVTUzIxAAAFpqkECAUHCc7QAAAdp2kBAAAAhUs1zKYXAPUPzgD2AP+pCgE6AAYOFgBDpg
EPtQBSAL0Pk6ZVAPYP8ACRAAOpmABoAPQPDABopgcPNgCCACsO2KaHAIYPqQBNAPiprACTAHYPMQCR
phMPrwCeAMcPN6alAOoOEQBvAOetQQCqAGoO2wC3pmQLpACyALMPI6a4AOoLZgAEAPWpvwDJAA0P
xAHRphwOqADWAM4PEqbcAOIPuQAnAISpowDlAAMPjwDjpukPYQDqACsPq6buABEP/wA6ACapaAAAAf
MP1AADp2UPkQALAbIPqqYPASAPbgDRAfGplQAVARYPvAAZp/8PFQAgAaIOaKYmAf8P9wDiASiplQAqAS
8O3AA2p+IOpgAzAf0OZ6Y0Af4P3ADyATGpbAA4AXgO9gBMp+UPZQBMAa8Ps6ZUAS4NoACZAUKowQB
dASMNAP/CUtp/vf1BByeG26fyCgMPNQlT/Pcuh4T6eDJ1AAWPJr76DgheASIATKdzfbr5ooDnkUOs2wXKhu
eK1HenJnIRtIu5/vcJQdG9e1YABY/KDyqpOY81BtWObIDopPyGtXy5+1/5rCaDgI4FOH90hADY4HbWACpp8
YdopDAL1gYqiyoIuCjcBxKZpv/aD+61xAiRjWEDt/rjJGd/XXCZebyCnFJM+HmGof5z9nJeGArF/loCyBBINiQL
pvoiC3LzwKdABrr0Vf8jhlImPWNxew5YEA/jDiMQpfjR9YABJQWs6WH7HQwgAHxNUIXVB0OFoADELtwBvv
geDiYPYF8QGeYwVX1/AVIm3An2JXoOSYtYp7yWOginEHYIkdnIeFkSOgFmfULb5PbRbuJuqQ/ATAP6LRo+
JMcS/VHj3DvwsHjtYw+9ASBQAQMF4k4Apr8BdML/wMAAx6Fq/0sLAOfCgMFk/GvAbwMAKgxyZgwA8BR3
wKNWbmcQAQQeg34HUsVZcVQSAQsmRXFh+8P/a2UGAdcsf1llEgEMNICv/4FYxUPBVAUAEkYFZysKARVH
kwbAjP4GALlQ9y+CCAU0VHBq/1cNxbFQ1v/CwGvB/zjGx6UB9FUJwgrFnWZSwcH9//5RyACQz3DBWsDB/
gD+N6wBnWr0wP86wPlmSgcAzW0A9EYWpxR+l4WWwQXAxWRkbQQArYQ/MAimpIl6wsBpl8BloAGtigBK
/sgArDZ2c37AwMC+AwVekxDBAwAZUlf7rwGxk/r+//BUHacNk5NtecM7wcRma2vA/cXDBBYEsJWew/+Hw
FxqbviYDgCpl3cEa3bPbgkAs5r97jf7qQGrn3p+agXBxlhdCACzoAaRNgCmobB6wsDBzwCtFPw1//7AV8YAk
B92wg8Aabw1wDiJ/v82wAQA08BnYP4KAGLDab1kUqoBdMV0icI7wcVn/vwJAMHKzP5E8AcAPNBkcwYLB
QrSBv7/OP+GBgUC13qEwAwAadkMWP7/wDZCDcW25CCIc8NnwBLFTeFBVf9GwP7+OjtRtwFk5uvAODr9
+1lH/8IxCwBy5wxb/j7/VQgAmO1oZHFXBwCy7cz9+ljB/xAAqu5JxMdZw39w/sIjyQC0VBI4NcBGGsQS8gRr
wnnAfsKx/4P8NREAbf7w8P34Z/81wEDBA9QCBIT/EBCrC4xUwYJkT/0/CRCzyBf4Zv8ywggQsdceNllzBxCXF
gzkOQ22fxv9/f78O/3FoxFwIv3/Ks0QdI4B/xUfCBCsKmFZwET/BRD77yk4oxH2Ky1VBdWYKYv8HwQQZTQy/
/+iEaU2OjkE1aozlikGEGk5bQdRAraCOYDHQ//BENicMEwGEH8/rMLFlAcQjkN6xzrA/rcRNUfnwVs5wvhm/fz
+/jYD1Y9O6vwDEINMXgQFFcVPaf/A/RrVAVxPwYH/wUb9jv74mv5LX1JCAM5DBKYBC0VS
resverd= endtag=
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 13
Date: Thu, 12 Jan 2017 00:49:32 GMT
templatev10=2
The visible light device automatically uploads the registered user comparison photos to the server.
POST /iclock/cdata?SN=${SerialNumber}&table=tabledata&tablename=biophoto&count=${XXX}
HTTP/1.1
Cookie: token=${XXX}
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
…
${DataRecord}
Note:
HTTP/1.1 200 OK
Content-Length: ${XXX}
…
biophoto=${XXX}
Note:
Example:
Client request:
POST /iclock/cdata?SN=0316144680030&table=tabledata&tablename=biophoto&count=1 HTTP/1.1
Host: 58.250.50.81:8011
POST /iclock/cdata?SN=${SerialNumber}&table=tabledata&tablename=ATTPHOTO&count=${XXX}
HTTP/1.1
Cookie: token=${XXX}
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
…
${DataRecord}
Note:
Note:
pin=${XXX}: The name of the attendance photo.
sn=${XXX}: The device SN.
size=${XXX}: The original size of the snapshot.
photo=${XXX}: The original binary biometric photo must be base64-encoded before transmission.
Multiple records are connected by ${LF}.
HTTP/1.1 200 OK
Content-Length: ${XXX}
…
ATTPHOTO=${XXX}
Note:
Example:
Client request:
POST /iclock/cdata?SN=1809140006&table=tabledata&tablename=ATTPHOTO&count=1 HTTP/1.1
Host: 58.250.50.81:8011
User-Agent: iClock Proxy/1.09
Connection: close
Accept: */*
Content-Length: 30327
pin=20181003143617-22.jpg sn=1809140006 size=22701
photo=/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABsSFBcUERsXFhceHBsgKEIrKCUlKFE6PTBCY
FVlZF9VXVtqeJmBanGQc1tdhbWGkJ6jq62rZ4C8ybqmx5moq6T/2wBDARweHigjKE4rK06kbl1upKSkpKSk
pKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKT/wAARCAUAAtADASIAAhEBAxE
B/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQI
DAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUp
TVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDx
MXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAw
QFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUv
AVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goO
EhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6On
q8vP09fb3+Pn6/9oADAMBAAIRAxEAPwBXXIPFVpI+fbHWrn1pjJnOKgZ
Response from the server:
HTTP/1.1 200 OK
Server: nginx/1.6.0
Date: Thu, 30 Jul 2015 07:25:38 GMT
Content-Type: text/plain
Content-Length: 10
Connection: close
Pragma: no-cache
Cache-Control: no-store
ATTPHOTO=1
Note:
filename=${XXX}: The file name of the user photo. Currently, only photos in JPG format are supported.
size=${XXX}: The length of the base64-encoded user photo.
content=${XXX}: The original binary user photo must be base64-encoded before transmission.
Multiple records are connected by ${LF}.
HTTP/1.1 200 OK
Content-Length: ${XXX}
…
userpic=${XXX}
Note:
Example:
Client request:
POST /iclock/cdata?SN=1809140006&table=tabledata&tablename=userpic&count=1 HTTP/1.1
Host: 58.250.50.81:8011
User-Agent: iClock Proxy/1.09
Connection: close
Accept: */*
Content-Length: 29848
userpic pin=1 filename=1.jpg size=22320
content=/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABsSFBcUERsXFhceHBsgKEIrKCUlKFE6PTBC
YFVlZF9VXVtqeJmBanGQc1tdhbWGkJ6jq62rZ4C8ybqmx5moq6T/2wBDARweHigjKE4rK06kbl1upKSkpKSk
pKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKT/wAARCAOoAnQDASIAAhEBAx
EB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9A
QIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdIS
UpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usL
DxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAEC
AwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMz
UvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g
oOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6
Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDUoooqQCiiigAooooAK
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=utf-8
Connection: close
Content-Length: 24
Date: Thu, 08 Nov 2018 06:16:41 GMT
userpic=1
New biometric templates, such as integrated palm templates, will be uploaded and downloaded in a
unified format and distinguished by the data type.
Note:
finger, index finger, and thumb of the left hand, and thumb, index finger, middle finger, ring
finger, and little finger of the right hand respectively.
[Finger Vein] Same to the fingerprints.
[Face] All is 0.
[Iris] 0 is the iris of the left eye and 1 is the iris of the right eye.
[Palm] 0 is the palm of the left hand and 1 is the palm of the right hand.
index=${XXX}: The number of the specific biont template. Multiple templates may be stored for one
finger. It is calculated from 0.
valid=${XXX}: Whether it is valid. 0: Invalid; 1: Valid. The default value is 1.
duress=${XXX}: Whether it is duress. 0: Not Duress; 1: Duress. The default value is 0.
type=${XXX}: The biometric type
Value Meaning
0 General
1 Fingerprint
2 Face
3 VoicePrint
4 Iris
5 Retina
6 Palm Print
7 Finger Vein
8 Palm
9 Visible Light Face
majorver=${XXX}: The major version number. For example, for the fingerprint algorithm 10.3, the major
version number is 10 and the minor version number is 3.
[Fingerprint] 9.0, 10.3, and 12.0
[Finger Vein] 3.0
[Face] 5.0, 7.0, and 8.0
[Palm] 1.0
minorver=${XXX}: The minor version number. For example, for the fingerprint algorithm 10.3, the major
version number is 10 and the minor version number is 3.
[Fingerprint] 9.0, 10.3, and 12.0
[Finger Vein] 3.0
[Face] 5.0, 7.0, and 8.0
[Palm] 1.0 pin=${XXX}: The name of the attendance photo.
format=${XXX}: The template format. The fingerprint template formats include ZK, ISO, and ANSI.
[Fingerprint]
Value Format
0 ZK
1 ISO
2 ANSI
[Finger Vein]
Value Format
0 ZK
[Face]
Value Format
0 ZK
[Palm]
Value Format
0 ZK
tmp=${XXX}: The template data. The original binary fingerprint template must be base64-encoded.
Multiple records are connected by ${LF}.
HTTP/1.1 200 OK
Content-Length: ${XXX}
…
biodata=${XXX}
Note:
Example:
Client request:
POST /iclock/cdata?SN=5165181600015&table=tabledata&tablename=biodata&count=1 HTTP/1.1
Host: 58.250.50.81:8011
User-Agent: iClock Proxy/1.09
Connection: starting
Accept: application/push
Accept-Charset: UTF-8
Accept-Language: zh-CN
Content-Type: application/push;charset=UTF-8
Content-Language: zh-CN
Content-Length: 3564
biodata pin=1 no=0 index=0 valid=1 duress=0 type=8 majorver=5 minorver=0
format=0
tmp=apUBD+cAC44IAAEAAJfKWlBWAQQFAAAAAAAAEAcHAcQAAAA3PJc4PO4W/AxrTnYNXQ7cJ0+ObT
0vBE81KyGPkzSHuh7ul+wP647kWNnMTDA8WMwlanRcNTpzTjc2hzUGZ488FweSBlaN0kY2GdZeNHlVXCs
x81nI5M0kZ2YzJD2kMxaWrBIWM9hWXEt4VzlLNP4JzMdLF6OUY5Kn8GPepNRjUp+0Z2BPOkd5STsfeZuXa
xaKzU0WvnUk06a2L1PrIu1jzwLvYf3U6wBrBG80yLbMc+g0DPL9MClyPTCNk50Fzws8xBsN
Response from the server:
HTTP/1.1 200 OK
Server Apache-Coyote/1.1 is not blacklisted
Server: Apache-Coyote/1.1
Content-Length: 9
Date: Fri, 19 Oct 2018 06:55:30 GMT
biodata=1
The device automatically uploads error logs to the server. The value of PushProtVer delivered by the
server is greater to or equal to 3.1.2.
Note:
errorlog
errcode=${XXX}$(HT)errmsg=${XXX}$(HT)dataorigin=${XXX}$(HT)cmdid=${XXX}$(HT)additional=${XXX}
Note:
errcode=${XXX}: The error code. See Appendix 17.
errmsg=${XXX}: The error message
dataorigin=${XXX}: The data source. Dev indicates that the data is sourced from the device, and cmd
indicates that the data is delivered by the device through a command.
cmdid=${XXX}: The number of the command delivered by the software
additional=${XXX}: The base64-encoded additional information. The native data is in JSON format.
Multiple records are connected by ${LF}.
HTTP/1.1 200 OK
Content-Length: ${XXX}
…
errorlog=${XXX}
Note:
Example:
Client request:
POST /iclock/cdata?SN=5165181600015&table=tabledata&tablename=errorlog&count=1 HTTP/1.1
Host: 58.250.50.81:8011
User-Agent: iClock Proxy/1.09
Connection: starting
Accept: application/push
Accept-Charset: UTF-8
Accept-Language: zh-CN
Content-Type: application/push;charset=UTF-8
Content-Language: zh-CN
Content-Length: 3564
errorlog errcode=D01E0001 errmsg= dataorigin=cmd cmdid=123 additional=
Response from the server:
HTTP/1.1 200 OK
Server Apache-Coyote/1.1 is not blacklisted
Server: Apache-Coyote/1.1
Content-Length: 9
Date: Fri, 19 Oct 2018 06:55:30 GMT
errorlog=1
11 Download
Note:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Content-Length: ${XXX}
Date: ${XXX}
${CmdRecord}
Note:
Example:
Host: 192.168.213.17:8088
User-Agent: iClock Proxy/1.09
Connection: starting
Accept: application/push
Accept-Charset: UTF-8
Accept-Language: zh-CN
Response from the server:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Content-Length: 99
Date: Wed, 11 Jan 2017 01:30:03 GMT
C:223:SET OPTIONS IPAddress=192.168.213.222,GATEIPAddress=192.168.213.1,NetMask=255.255.255
12.1 Data
It is used to operate on the device data.
12.1.1 Update
It is used to add or update data to the device. If the device does not have the primary key data, you can
run this command to add the data to the device; otherwise, you can run this command to update the data
to the device.
Format:
Application scenario:
The server delivers the user information to the client. It is generally used to synchronize the user
information edited on the server to the client.
Note:
Example:
The software delivers the information about a user, of which the user ID is 1 and the password is
234. The user has no card, belongs to the default group, and has the privilege of a common user.
No validity period is set for the user:
Application scenario:
The server delivers the extended user information to the client. It is generally used to synchronize the
user information edited on the server to the client.
Note:
Example:
ID=500&Return=0&CMD=DATA
Application scenario:
The server delivers MulCardUser information to the client. It is generally used to synchronize the
MulCardUser information edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the identity card information to the client. It is generally used to synchronize the
identity card information edited on the server to the client.
Note:
21: Va
22: She
23: Gaoshan
24: Lahu
25: Shui
26: Dongxiang
27: Naxi
28: Jingpo
29: Kirgiz
30: Tu
31: Daur
32: Mulao
33: Qiang
34: Blang
35: Salar
36: Maonan
37: Kelao
38: Xibe
39: Achang
40: Pumi
41: Tajik
42: Nu
43: Ozbek
44: Russian
45: Ewenki
46: De'ang
47: Baoan
48: Yugu
49: Jing
50: Tatar
51: Drung
52: Oroqen
53: Hezhe
54: Monba
55: Lhoba
56: Jino
57: Encoding Error
97: Other
Example:
Application scenario:
The server delivers the user's access control privilege to the client. Generally, the privilege is delivered
C:${CmdID}:DATA$(SP)UPDATE$(SP)userauthorize$(SP)Pin=${XXX}$(HT)AuthorizeTimezoneId=${XXX}$(H
T)AuthorizeDoorId=${XXX}$(HT)DevID=${XXX}
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
userauthorize: The table name, which is the user's access control privilege
It indicates to which doors of the device the privilege can be applied. The value is encoded in binary.
Each door is represented by a binary bit. If the bit value is 1, the user has the privilege of this door. For
1 indicates LOCK1.
2 indicates LOCK2.
4 indicates LOCK3.
8 indicates LOCK4.
If the four doors are numbered as 1, 2, 3, and 4 respectively, the value 15 obtained according to the
1<<(1-1)+1<<(2-1)+1<<(3-1)+1<<(4-1)=15
DevID: The device ID. The value of AccSupportFunList counts from 0, and the value of the 26th bit is used
Example:
The server delivers the information of a user of which user ID is 1, the time rule ID is 1, and the door
ID is 1:
DevID=1
ID=296&Return=0&CMD=DATA
Application scenario:
The server delivers the holiday data to the client. It is generally used to synchronize the holiday data
edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers a time rule to the client. Generally, it is used to automatically deliver the time rule
Format:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
Example:
The server delivers a time rule, in which the time rule ID is 2, the time period 1 on Monday is
ID=307&Return=0&CMD=DATA
Application scenario:
The server delivers a fingerprint template, if any, to the client when delivering the user information.
Format:
Note:
templatev10: Indicate that the data type is fingerprint template. The supported fingerprint algorithm
version is no latter than 10.0.
Pin: The user ID
FingerID: The finger number. The value ranges from 0 to 9.
Valid: Describe whether the template is valid and is duress. The value meanings are described below:
Value Description
0 Invalid
1 Valid
3 Duress
Template: Before a fingerprint template is transmitted, the original binary fingerprint template must be
base64-encoded.
Multiple records are connected by ${LF}.
Example:
The server delivers a common fingerprint of which the user ID is 1 and the fingerprint ID is 6:
C:333:DATA UPDATE templatev10 Pin=1 FingerID=6 Valid=1
Template=Si9TUzIxAAADbG8ECAUHCc7QAAAbbWkBAAAAg5Eac2wNAG4PmwDZAAVjrQAiAIIPWwAzbAI
PsgCOAMgOWmyOAFgPwwBWAI5i2wCUAJsPTACUbF0PrwCqAKIPgGy8AFAPwwAHAINjZADMANQPPAD
dbKgPjgDhAIAOoGzmADAOlQApADJiqwD5ALIOYwAEbasM/wAJAWcPn2wVAYoNhADfAfJhbQAlAdYPCg
AkbZ0PbAA2ASAP0Gw4AZQPI2jqbyCDiIW1BQuYSH1i7Y4XXYE5/d6Xgu24q3p2M/ymh0hngIH19lIorBJt/lI
0bg4eU//33jP73D7onn2jDvmapxjD9F9QX4XA/ManEgtvK04TZ3tIFlqVxQBEgd6C+e9BAGWC3AiC6WSCofg
xIEd4mZdKCj8T0eComsm0hGr9H+4NKPCai55NHQmD9bIWXnx79YNfpfkK94RjfiCZAiAvxAIRcMoEAHYBdL
kEA88FhpMEAKvNAzBmAaQLgIhitQQDAhFtXAYAn9z9/icPANEZjMAEmcOuZ3sKAJcdsn53AQQAsCIJ/48L
A8QkfcLAwmavBwPOLf3+/cFGzQCZXHuDwHIHAGcyAJP/UxMA91pbw8MUw//EaVzCOsMQbPpmmmnBw
UHCwq3Bb2wVAQe4oHfohcT/eMHBtREDMYrgRjExK44QA8KPfcPF/8IEwPyvwcBg/xcBwoykG32MwYNneK
8HAzmRXsJrwRTF2JPwkMLEwv/CQcDBk8HB/sEIAJ+TVAtZBwDHlxz9VQZshplgfhkBwpyorsHBfpPCg6pna6
sKAKqqcMUGwVVQCwCCwFDABFtPYAG/wJPJxwfDwqjAw0cJAKsD/fiXWFQZAQe+dIdq+sPDgMDCwLvA
WmUBr8sQInYHCwPE0UPF/8N2BXsJbKzQHP3AwjrBaGUBrtktfMCuGwJj26lSwUWXB8LArXZvZFkYADDcpA
jBw8LCw8UGwv2uecH+wEQJxY3lKsD9KXYPAFHnw0b99/z//sEFwFBwAAvpsG3CBcDBrKHDw3rAizrAWJM
GAJLvPcUAVRl9DQinZMDABcDBrsPExsOJUDv/wV4EEKAXF8GOBBO/Khf/xAkQqjLhkvz7/sBmBdWTS+zCV
wgQaUoi//+S/0QNEONMSlfCrKDBaVJCAM5DAmwBC0VS
The client returns the execution result:
ID=333&Return=0&CMD=DATA
Application scenario:
The server delivers the first-card opening data to the client. It is generally used to synchronize the
first-card opening data edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the multi-card opening data to the client. It is generally used to synchronize the
C:${CmdID}:DATA$(SP)UPDATE$(SP)multimcard$(SP)Index=${XXX}$(HT)DoorId=${XXX}$(HT)Group1=${X
XX}$(HT)Group2=${XXX}$(HT)Group3=${XXX}$(HT)Group4=${XXX}$(HT)Group5=${XXX}$(HT)DevID=${XX
X}
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
Example:
Application scenario:
The server delivers the linkage details to the client. It is generally used to synchronize the linkage details
edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the scheduled output information to the client. It is generally used to synchronize the
scheduled output information edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the DLST information to the client. It is generally used to synchronize the DLST
information edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the device properties to the client. It is generally used to synchronize the device
properties edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the device parameters to the client. It is generally used to synchronize the device
parameters edited on the server to the client.
C:${CmdID}:DATA$(SP)UPDATE$(SP)DevParameters$(SP)ID=${XXX}$(HT)Name=${XXX}$(HT)Value=${XXX}
The client uploads the execution result:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
Example:
Application scenario:
The server delivers the door properties to the client. It is generally used to synchronize the door
properties edited on the server to the client.
Note:
DoorProperty: The table name, which is the door property table
ID: The door ID
DevID: The slave ID
Address: The lock relay. 1: LOCK1, 2: LOCK2, 3: LOCK3, and 4: LOCK4
Disable: Enable or disable. 0: Enable. 1: Disable
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the door parameters to the client. It is generally used to synchronize the door
parameters edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the reader properties to the client. It is generally used to synchronize the reader
properties edited on the server to the client.
Note:
Type: The reader type, which is calculated by binary bits. 0: Disable. 1: 485 Reader. 2: Wiegand Reader. 3:
485 Reader or Wiegand Reader. 4: Network Reader. 8: Zigbee Reader
Address: The reader address, applicable for the Wiegand reader and 485 reader
IPAddress: The reader IP address
Port: The reader port
MAC: The reader MAC address
InOut: The input or output reader. 0: input and 1: Output
Disable: Enable or disable. 0: Enable. 1: Disable
VerifyType: The reader verification mode
Multicast: The multicast address
DevID: The device ID
OfflineRefuse: Whether offline access is supported. 0: Accept and 1: Refuse
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the reader parameters to the client. It is generally used to synchronize the reader
parameters edited on the server to the client.
Note:
Example:
The server delivers:
C:514:DATA UPDATE ReaderParameters ID=1 DevID=1 Name=MaskFlag Value=1
The client uploads the successful execution result:
ID=514&Return=0&CMD=DATA
Application scenario:
The server delivers the auxiliary input properties to the client. It is generally used to synchronize the
auxiliary input properties edited on the server to the client.
Note:
AuxIn: The table name, which is the auxiliary input property table
ID: The auxiliary input ID
DevID: The device ID
Address: Auxiliary input. 1: AuxIn1 and 2: AuxIn2
Disable: Enable or disable. 0: Enable. 1: Disable
Multiple records are connected by ${LF}.
Example:
The server delivers:
C:515:DATA UPDATE AuxIn ID=1 DevID=14 Address=1 Disable=0
The client uploads the successful execution result:
ID=515&Return=0&CMD=DATA
Application scenario:
The server delivers the auxiliary output properties to the client. It is generally used to synchronize the
auxiliary output properties edited on the server to the client.
Note:
AuxOut: The table name, which is the auxiliary output property table
ID: The auxiliary output ID
DevID: The device ID
Address: The auxiliary output relay. 1: AuxOut1
Disable: Enable or disable. 0: Enable. 1: Disable
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the default Wiegand format to the client. It is generally used to synchronize the
default Wiegand format edited on the server to the client.
Note:
DefaultWGFormat: The table name, which is the default Wiegand format table
ID: The index
CardBit: The number of bits
SiteCode: The site code
FormatName: The user-defined Wiegand name
CardFormat: The Wiegand format
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the Wiegand format to the client. It is generally used to synchronize the Wiegand
format edited on the server to the client.
Note:
Example:
Application scenario:
The server delivers the Wiegand format of the Wiegand reader to the client. It is generally used to
synchronize the Wiegand format of the Wiegand reader edited on the server to the client.
Note:
ReaderWGFormat: The table name, which is the table of the Wiegand format of the Wiegand reader
ReaderID: The reader ID
DevID: The device ID. The value of AccSupportFunList counts from 0, and the value of the 26th bit is used
to control the function.
WGFormatID: The index of the Wiegand format table
ParityVerifyDisable: Whether to disable the parity check. 1: Disable and 0: Enable
ReversalType: 1: Invert all bits. 2: Invert 0 and 1. 3: Exchange low bits with high bits. 4: Exchange a low bit
with a high bit.
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the input control (by time period) information to the client. It is generally used to
synchronize the input control (by time period) information edited on the server to the client.
Note:
InputIOSetting: The table name, which is the table of input control by time period
Number: The input ID, which is the door ID in the door property table or the ID in the auxiliary input
property table
InType: 0: Exit button. 1: Auxiliary input
TimeZoneId: The ID of the time zone
DevID: The device ID. The value of AccSupportFunList counts from 0, and the value of the 26th bit is used
to control the function.
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the verification modes in different time periods to the client. It is generally used to
synchronize the verification modes edited on the server to the client.
${XXX}$(HT)SunTime2VSDoor=${XXX}$(HT)SunTime3=${XXX}$(HT)SunTime3VSUser=${XXX}$(HT)SunTim
e3VSDoor=${XXX}$(HT)MonTime1=${XXX}$(HT)MonTime1VSUser=${XXX}$(HT)MonTime1VSDoor=${XXX
}$(HT)MonTime2=${XXX}$(HT)MonTime2VSUser=${XXX}$(HT)MonTime2VSDoor=${XXX}$(HT)MonTime3
=${XXX}$(HT)MonTime3VSUser=${XXX}$(HT)MonTime3VSDoor=${XXX}$(HT)TueTime1=${XXX}$(HT)TueT
ime1VSUser=${XXX}$(HT)TueTime1VSDoor=${XXX}$(HT)TueTime2=${XXX}$(HT)TueTime2VSUser=${XXX}
$(HT)TueTime2VSDoor=${XXX}$(HT)TueTime3=${XXX}$(HT)TueTime3VSUser=${XXX}$(HT)TueTime3VSD
oor=${XXX}$(HT)WedTime1=${XXX}$(HT)WedTime1VSUser=${XXX}$(HT)WedTime1VSDoor=${XXX}$(HT)
WedTime2=${XXX}$(HT)WedTime2VSUser=${XXX}$(HT)WedTime2VSDoor=${XXX}$(HT)WedTime3=${XX
X}$(HT)WedTime3VSUser=${XXX}$(HT)WedTime3VSDoor=${XXX}$(HT)ThuTime1=${XXX}$(HT)ThuTime1V
SUser=${XXX}$(HT)ThuTime1VSDoor=${XXX}$(HT)ThuTime2=${XXX}$(HT)ThuTime2VSUser=${XXX}$(HT)
ThuTime2VSDoor=${XXX}$(HT)ThuTime3=${XXX}$(HT)ThuTime3VSUser=${XXX}$(HT)ThuTime3VSDoor=$
{XXX}$(HT)FriTime1=${XXX}$(HT)FriTime1VSUser=${XXX}$(HT)FriTime1VSDoor=${XXX}$(HT)FriTime2=${X
XX}$(HT)FriTime2VSUser=${XXX}$(HT)FriTime2VSDoor=${XXX}$(HT)FriTime3=${XXX}$(HT)FriTime3VSUse
r=${XXX}$(HT)FriTime3VSDoor=${XXX}$(HT)SatTime1=${XXX}$(HT)SatTime1VSUser=${XXX}$(HT)SatTime
1VSDoor=${XXX}$(HT)SatTime2=${XXX}$(HT)SatTime2VSUser=${XXX}$(HT)SatTime2VSDoor=${XXX}$(HT)
SatTime3=${XXX}$(HT)SatTime3VSUser=${XXX}$(HT)SatTime3VSDoor=${XXX}$(HT)Hol1Time1=${XXX}$(
HT)Hol1Time1VSUser=${XXX}$(HT)Hol1Time1VSDoor=${XXX}$(HT)Hol1Time2=${XXX}$(HT)Hol1Time2VS
User=${XXX}$(HT)Hol1Time2VSDoor=${XXX}$(HT)Hol1Time3=${XXX}$(HT)Hol1Time3VSUser=${XXX}$(HT
)Hol1Time3VSDoor=${XXX}$(HT)Hol2Time1=${XXX}$(HT)Hol2Time1VSUser=${XXX}$(HT)Hol2Time1VSDo
or=${XXX}$(HT)Hol2Time2=${XXX}$(HT)Hol2Time2VSUser=${XXX}$(HT)Hol2Time2VSDoor=${XXX}$(HT)H
ol2Time3=${XXX}$(HT)Hol2Time3VSUser=${XXX}$(HT)Hol2Time3VSDoor=${XXX}$(HT)Hol3Time1=${XXX}
$(HT)Hol3Time1VSUser=${XXX}$(HT)Hol3Time1VSDoor=${XXX}$(HT)Hol3Time2=${XXX}$(HT)Hol3Time2V
SUser=${XXX}$(HT)Hol3Time2VSDoor=${XXX}$(HT)Hol3Time3=${XXX}$(HT)Hol3Time3VSUser=${XXX}$(H
T)Hol3Time3VSDoor=${XXX}
The client uploads the execution result:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
DiffTimezoneVS: The table name, which is the table of verification modes in different time periods
TimezoneID: The index ID
SunTime1-SatTime3: From Sunday to Saturday, three time periods each day
Hol1Time1-Hol3Time3: Three holidays, three time periods each holiday
SunTime1VSUser-SatTime3VSUser: From Sunday to Saturday, three time periods each day, the verification
modes in different time periods when the user is different
Hol1Time1VSUser-Hol3Time3VSUser: Three holidays, three time periods each holiday, the verification
modes in different time periods when the user is different
SunTime1VSDoor-SatTime3VSDoor: From Sunday to Saturday, three time periods each day, the
verification modes in different time periods when the door is different
Hol1Time1VSDoor-Hol3Time3VSDoor: Three holidays, three time periods each holiday, the verification
modes in different time periods when the door is different
Note: Each time period lasts from StartTime to EndTime on the software. Before the time rule is delivered
to the device, the software converts the time rule to an integer based on the convention
StartTime<<16+EndTime. For example, the converted value of 8:30-12:00 is 830 << 16 + 1200, that is,
0x33e04b0.
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the verification modes for different doors in different time periods to the client. It is
generally used to synchronize the verification modes edited on the server to the client.
Note:
DoorVSTimezone: The table name, which is the table of verification modes for different doors in different
time periods
DoorID: The door ID
TimezoneID: Correspond to DiffTimezoneVS
DevID: The device ID. The value of AccSupportFunList counts from 0, and the value of the 26th bit is used
to control the function.
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the verification modes for different users in different time periods to the client. It is
generally used to synchronize the verification modes edited on the server to the client.
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
PersonalVSTimezone: The table name, which is the table of verification modes for different users in
different time periods
PIN: The user ID
DoorID: The door ID
TimezoneID: Correspond to DiffTimezoneVS
DevID: The device ID. The value of AccSupportFunList counts from 0, and the value of the 26th bit is used
to control the function.
Multiple records are connected by ${LF}.
Example:
Application scenario:
The server delivers the super user privilege to the client. It is generally used to synchronize the super user
privilege edited on the server to the client.
C:${CmdID}:DATA$(SP)UPDATE$(SP)SuperAuthorize$(SP)Pin=${XXX}$(HT)DoorID=${XXX}$(HT)DevID
=${XXX}
The client uploads the execution result:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
SuperAuthorize: The table name, which is the super user privilege table
Pin: The user ID
DoorID: The door ID
DevID: The device ID. The value of AccSupportFunList counts from 0, and the value of the 26th bit is used
to control the function.
Multiple records are connected by ${LF}.
Example:
Application scenario:
Note:
PostBackTmpFlag=${XXX}: Whether to return the template data after image conversion (0: not required,
1: required). No PostBackTmpFlag parameter, it is not required to return by default.
Multiple records are connected by ${LF}.
Note:
When URL is a relative path, use the relative path directly.
Application scenario:
Note:
Example:
Application scenario:
Note:
majorver=${XXX}: The major version number. For example, for the fingerprint algorithm 10.3, the major
version number is 10 and the minor version number is 3.
[Fingerprint]: 9.0, 10.3 and 12.0
[Finger Vein]: 3.0
[Face]: 5.0, 7.0 and 8.0
[Palm]: 1.0
minorver=${XXX}: The minor version number. For example, for the fingerprint algorithm 10.3, the major
version number is 10 and the minor version number is 3.
[Fingerprint]: 9.0, 10.3 and 12.0
[Finger Vein]: 3.0
[Face]: 5.0, 7.0 and 8.0
[Palm]: 1.0
pin =${XXX} : Name of attendance photo.
format=${XXX}: The template format. The fingerprint template formats include ZK, ISO, and ANSI.
[Fingerprint]
Value Format
0 ZK
1 ISO
2 ANSI
[Finger Vein]
Value Format
0 ZK
[Face]
Value Format
0 ZK
[Palm]
Value Format
0 ZK
tmp=${XXX}: The template data. The original binary fingerprint template must be base64-encoded.
Multiple records are connected by ${LF}.
Example:
ID=524&return=0&CMD=DATA
12.1.2 Delete
Application scenario:
This command is used to control the deletion of device data on the software, for example, the user and
fingerprint template.
Format:
C:$(CmdID):DATA$(SP)DELETE$(SP)$(TableName)$(SP)$(Cond)
Note:
Application scenario:
Format:
Note:
Example:
Delete the user of which ID is 1 (can delete the user data together):
C:335:DATA DELETE userauthorize Pin=1
C:336:DATA DELETE templatev10 Pin=1
C:337:DATA DELETE user Pin=1
Wherein, commands 1 and 2 are used to delete the access control privilege and the fingerprint template
respectively. Command 3 is used to delete the user.
The client returns the execution result:
ID=335&Return=0&CMD=DATA
ID=336&Return=0&CMD=DATA
ID=337&Return=0&CMD=DATA
Application scenario:
Format:
The server delivers the command:
C:$(CmdID):DATA$(SP)DELETE$(SP)extuser$(SP)$(Cond)
The client uploads the execution result:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
extuser: The table name, which is the extended user information
$(Cond): Generally, Pin=x means deleting the extended user of which ID is x, and * means deleting all
extended users.
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
After deleting a user, the server also deletes the user's access control privilege.
Format:
Note:
userauthorize: The table name, which is the user's access control privilege
$(Cond): Generally, Pin=x means deleting the access control privilege of the user of which ID is x, and *
means deleting the access control privilege of all users.
Example:
Application scenario:
It is generally used to delete all the access control records of the device.
Format:
Note:
Example:
Application scenario:
Generally, it is used to delete a specified fingerprint template of a device used on the server or delete a
user as well as the user's fingerprint template.
Format:
Note:
Example:
Application scenario:
Format:
Note:
holiday: The table name, which is the holiday
$(Cond): * means deleting all the holidays.
Example:
Application scenario:
It is generally used to delete the data in a time period or the data in all time periods.
Format:
Note:
holiday: The table name, which is the time period
$(Cond): TimezoneId=x means deleting the time period of which TimezoneId is x.
* means deleting all the time periods.
Example:
Delete a time period of which TimezoneId is 1:
C:342:DATA DELETE timezone TimezoneId=1
The client uploads the execution result:
ID=342&Return=0&CMD=DATA
Application scenario:
It is generally used to delete a first-card opening record or all the first-card opening records.
Format:
Note:
Example:
Application scenario:
It is generally used to delete a multi-card opening record or all the multi-card opening records.
Format:
Note:
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
Format:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
Example:
Application scenario:
Format:
Note:
DoorProperty: The table name, which is the door property table
$(Cond): * means deleting all the door properties.
Example:
Delete all the door properties:
C:342:DATA DELETE DoorProperty *
The client uploads the execution result:
ID=342&Return=0&CMD=DATA
Application scenario:
Format:
Note:
DoorParameters: The table name, which is the door parameter table
$(Cond): * means deleting all the door parameters.
Example:
Application scenario:
Format:
The server delivers the command:
C:${CmdID}:DATA$(SP)DELETE$(SP)ReaderProperty$(SP)$(Cond)
The client uploads the execution result:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
It is generally used to delete a default Wiegand format or all the default Wiegand formats.
Format:
Note:
DefaultWGFormat: The table name, which is the default Wiegand format table
$(Cond): ID=x means deleting the default Wiegand format of which ID is x.
CardBit=x means deleting the default Wiegand format of which CardBit is x.
Example:
Application scenario:
Format:
Note:
Example:
Application scenario:
It is generally used to delete the Wiegand format of a reader or the Wiegand formats of all readers.
Format:
Note:
WGFormat: The table name, which is the reader Wiegand format table
$(Cond): ReaderID=x means deleting the Wiegand format of the reader of which ReaderID is x.
DevID=x means deleting the Wiegand format of the reader of which DevID is x.
* means deleting the Wiegand formats of all the readers.
Example:
Delete the Wiegand format of the reader of which ReaderID is 1 or DevID is 24:
C:342:DATA DELETE WGFormat ReaderID=1
C:343:DATA DELETE WGFormat DevID=24
The client uploads the execution result:
ID=342&Return=0&CMD=DATA
ID=343&Return=0&CMD=DATA
Application scenario:
It is generally used to delete all the input control (by time period) data.
Format:
Note:
InputIOSetting: The table name, which is the table of input control by time period
$(Cond): * means deleting all the input control (by time period) data.
Example:
Application scenario:
It is generally used to delete a verification mode in different time periods or all the verification modes in
different time periods.
Format:
Note:
DiffTimezoneVS: The table name, which is the table of verification modes in different time periods
$(Cond): TimezoneID=x means deleting the verification mode in different time periods of which
TimezoneID is x.
* means deleting all the verification modes in different time periods.
Example:
Application scenario:
It is generally used to delete a door's verification modes in different time periods or all the doors'
verification modes in different time periods.
Format:
C:${CmdID}:DATA$(SP)DELETE$(SP)DoorVSTimezone$(SP)$(Cond)
The client uploads the execution result:
ID=${CmdID}&Return=${XXX}&CMD=DATA
Note:
DoorVSTimezone: The table name, which is the table of the door's verification modes in different time
periods
$(Cond): DoorID=x means deleting the verification modes in different time periods of the door of which
DoorID is x.
* means deleting all the doors' verification modes in different time periods.
Example:
Delete the verification modes in different time periods of the door of which DoorID is 1:
C:342:DATA DELETE DoorVSTimezone DoorID=1
The client uploads the execution result:
ID=342&Return=0&CMD=DATA
Application scenario:
It is generally used to delete a user's verification modes in different time periods or all the users'
verification modes in different time periods.
Format:
Note:
PersonalVSTimezone: The table name, which is the table of the user's verification modes in different time
periods
$(Cond): PIN=x means deleting the verification mode in different time periods of a user of which PIN is x.
PIN=x and DoorID=x mean deleting the verification mode in different time periods of a user of
which PIN is x and DoorID is x.
* means deleting all the users' verification modes in different time periods.
Example:
Delete the verification modes in different time periods of the user of which PIN is 1 or PIN and
DoorID are 1:
C:342:DATA DELETE PersonalVSTimezone PIN=1
C:343:DATA DELETE PersonalVSTimezone PIN=1 DoorID=1
The client uploads the execution result:
ID=342&Return=0&CMD=DATA
ID=343&Return=0&CMD=DATA
Application scenario:
It is generally used to delete the privilege of a super user or all the super users.
Format:
Note:
SuperAuthorize: The table name, which is the super user privilege table
$(Cond): Pin=x means deleting the privilege of the super user of which Pin is x.
* means deleting the privilege of all the super users.
Example:
Application scenario:
Format:
C:${CmdID}:DATA${SP}DELETE${SP}biophoto${SP}PIN=${XXX}
The client uploads the execution result:
ID=${XXX}&Return=${XXX}&CMD=DATA
Note:
Application scenario:
Note:
Application scenario:
Note:
3 VoicePrint
4 Iris
5 Retina
6 Palm Print
7 Finger Vein
8 Palm
9 Visible Light Face
pin=${XXX}: The user ID.
no=${XXX}: The number of specific biont. The default value is 0.
[Fingerprint] The number ranges from 0 to 9, corresponding to the little finger, ring finger, middle
finger, index finger, and thumb of the left hand, and thumb, index finger, middle finger, ring finger, and
little finger of the right hand respectively.
[Finger Vein] Same to the fingerprints.
[Face] All is 0.
[Iris] 0 is the iris of the left eye and 1 is the iris of the right eye.
[Palm] 0 is the palm of the left hand and 1 is the palm of the right hand.
12.1.3 Count
Application scenario:
It is used to count the number of records in a specified table or the number of records that meet the
specified condition in a specified table.
Format:
Note:
$(Cond): The filter condition list. Condition field name1=value1\t condition field name2=value2\t
Condition field name3=value3. When the filter condition list is x, the whole table is counted. When the list
contains multiple filter conditions, the conditions are in AND relationship.
/iclock/querydata: The URI of the data that is uploaded by the client and meets the condition
type=count: The type of data to be uploaded by the client is statistics.
count: The number of data entries returned.
packcnt: The total number of packages. When there is a great amount of data, the data needs to be
divided into different packages. This value indicates how many packages the data is divided into.
packidx: The package ID, which indicates which of all packages is currently being sent.
$(TableName)=${XXX}: The left parameter indicates the table name, and the right value indicates the
number of data entries in the table that meet the condition.
The sub-command COUNT contains three interaction processes: The client gets the command, the server
returns the COUNT command, the client returns the statistical result, the server returns OK, the client
returns the command execution result, and then the server returns OK. The details are not repeated
below, and only the key points will be listed.
Application scenario:
Format:
Note:
user: The table name, which is the number of obtained user information tables
$(Cond): Generally no condition is set, which means getting the number of all users.
Example:
user=5
The client uploads the execution result:
ID=288&Return=0&CMD=DATA COUNT
Application scenario:
It is used to get the number of access control records from the client.
Note:
The interaction process and command format are the same as those of the command to get the user
count. You only need to replace the table name with "transaction".
Application scenario:
Note:
The interaction process and command format are the same as those of the command to get the user
count. You only need to replace the table name with "template10".
Application scenario:
It is generally used to get the number of comparison photos from the device.
Format:
Note:
biophoto: The table name, which is the number of obtained comparison photos
Type=${XXX}: The biometric type
Value Meaning
0 General
1 Fingerprint
2 Face
3 VoicePrint
4 Iris
5 Retina
6 Palm Print
7 Finger Vein
8 Palm
9 Visible Light Face
$(Cond): Generally no condition is set, which means getting the number of all comparison photos.
Example:
Application scenario:
It is generally used to get the number of device unified templates of the specified type.
Format:
Note:
biophoto: The table name, which is the number of obtained comparison photos
Type=${XXX}: The biometric type
Value Meaning
0 General
1 Fingerprint
2 Face
3 VoicePrint
4 Iris
5 Retina
6 Palm Print
7 Finger Vein
8 Palm
9 Visible Light Face
$(Cond): Generally no condition is set, which means getting the number of all comparison photos.
Example:
12.1.4 Query
The server actively requires the client to upload data that meets the query condition.
Format:
Note:
Application scenario:
The server actively requires the client to upload the specified user. It is generally used to get all the users
from the device.
Format:
Note:
tablename: When it is set to user, it means the user table and the data processed is the user data.
$(DataRecord): When the table name is user, the data format is the user data format. For details, see
Upload User Information.
Example:
user=3
The client uploads the successful execution result:
ID=415&Return=3&CMD=DATA QUERY
Application scenario:
The server actively requires the client to upload the specified fingerprint template. It is generally used to
get all the fingerprint templates after getting all the users.
Note:
The command is the same as the command to query users, except that you need to replace the table
name with templatev10. The $(DataRecord) format is the fingerprint template format. For details, see
Upload Fingerprint Template.
Application scenario:
The server actively requires the client to upload the specified access control record. It is generally used to
get all access control records or the access control record in the specified range after the ACCOUNT
command failed.
Format:
Note:
The command format is same to the format of the command used to query users. You need to replace the
table name with transaction.
$(DataRecord): Its format is same to the format of the access control record, which is:
transaction$(SP)cardno=$(XXX)$(HT)pin=$(XXX)$(HT)verified=$(XXX)$(HT)doorid=$(XXX)$(HT)eventtype
=$(XXX)$(HT)inoutstate=$(XXX)$(HT)time_second=$(XXX)$(HT)index=$(XXX)$(HT)sitecode=$(XXX)$(HT)
devid=$(XXX)$(HT)
transaction: The table name, which means that the data type is access control record
cardno: The card number
pin: The user ID
verified: The verification mode code. For details, see Appendix 3 Description of Verification Mode Code.
doorid: The door ID
eventtype: The event type
inoutstate: The in/out status. 0 indicates In, and 1 indicates Out.
time_second: The time stamp of the record, for example, time_second=583512660, in which time_second
is calculated according to the algorithm in Appendix 5, and the specific time yyyy-mm-dd-hh-mm-ss is
calculated according to the method in Appendix 6.
index: The ID of the access control record
sitecode: The site code
devid: The device ID
Multiple records are connected by ${LF}.
Note:
When the filter is set to NewRecord, new records that are not uploaded are queried.
Example:
The server delivers the command:
C:415:DATA QUERY tablename=user,fielddesc=*,filter=*
The client uploads the access control record:
POST
/iclock/querydata?SN=3383154200002&type=tabledata&cmdid=415&tablename=transaction&count=1&
packcnt=1&packidx=1 HTTP/1.1
…
transaction cardno=0 pin=0 verified=200 doorid=1 eventtype=100 inoutstate=2
time_second=548003688 index=92 sitecode=0 devid=1 sn=3383154200002
Response from the server:
transaction=1
The client uploads the successful execution result:
ID=415&Return=1&CMD=DATA
Application scenario:
The software delivers a command to query the Wi-Fi list. After searching for surrounding Wi-Fis, the deice
uploads the SSIDs and other information to the software.
Format:
$(DataRecord)
Response from the server:
APList=$(XXX)
The client uploads the successful execution result:
ID=${CmdID}&Return=$(XXX)&CMD=DATA
Note:
Example:
POST
/iclock/querydata?SN=$(SerialNumber)&type=vmtable&cmdid=415&tablename=APList&count=%d&pac
kcnt=%d&packidx=%d HTTP/1.1
Cookie: token=${XXX}
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
APList ecn=%?\tssid=%?\trssi=%?\tmac=%?
APList ecn=%?\tssid=%?\trssi=%?\tmac=%?
APList ecn=%?\tssid=%?\trssi=%?\tmac=%?
APList=3
ID=415&Return=3&CMD=DATA
Application scenario:
The server actively requires the client to upload the specified comparison photo. It is generally used to
get all the comparison photos from the device.
Format:
5 Retina
6 Palm Print
7 Finger Vein
8 Palm
9 Visible Light Face
The client uploads the data:
POST
/iclock/querydata?SN=$(SerialNumber)&type=tabledata&cmdid={CmdID}&tablename=biophoto&count=
$(XXX)&packcnt=$(XXX)&packidx=$(XXX) HTTP/1.1
…
$(DataRecord)
Response from the server:
biophoto=$(XXX)
The client uploads the successful execution result:
ID=${CmdID}&Return=$(XXX)&CMD=DATA QUERY
Note:
tablename: When it is set to biophoto, it means the comparison photo table and the data processed is the
comparison photo data.
$(DataRecord): When the table name is biophoto, the data format is the format of the comparison photo
data. For details, see Upload Comparison Photo.
Example:
biophoto=1
After the client uploads all the comparison photos, the result is returned.
ID=99&Return=2&CMD=DATA QUERY
Application scenario:
The server actively requires the client to upload the specified unified template data. It is generally used to
get the unified template data of the device specified type.
Format:
ID=${CmdID}&return=$(XXX)&CMD=DATA QUERY
Note:
tablename: When it is set to biodata, it means the unified template table and the data processed is the
unified template data.
$(DataRecord): When the table name is biodata, the data format is the format of the unified template
data. For details, see Upload Unified Template.
Example:
12.2 Account
This command is currently used to upload the access control records for software account checking only
on the server. Account checking means that the software compares its access control records with those
uploaded by the device, to check whether any access control record is missing.
Format:
Note:
MaxIndex: Access control records of which the ID is greater than this value need to be uploaded. When
the value is 0, all access control records need to be uploaded.
/iclock/querydata: The URI of the access control record that is uploaded by the client and meets the
condition
type: The type of the data to upload. If it is set to tabledata in the ACCOUNT command, it means the data
in the table.
tablename: The table name. Currently, the ACCOUNT command is used only for the access control
records, and therefore all the table names in the ACCOUNT command is transaction.
datafmt: The format of the data to upload. Currently, it is fixed to 3 in this command, which means a
compressed package.
name: The name of the compressed package. transaction.tgz means a compressed package of access
control records.
datacode: The data format used when the compressed package is uploaded. base64 means that the
compressed package is base64-encoded before upload.
$(DataRecord): Multiple access control records need to be packaged into a compressed package and then
base64-encoded before upload. For the format details, see Upload Access Control Record.
transaction=${XXX}: ${XXX} is the number of access control records uploaded by the client.
return: The number of access control records that meet the condition
StartTime: The start time of the access control record. It is reserved currently and left blank during upload.
EndTime: The end time of the access control record. It is reserved currently and left blank during upload.
RecordSum: The number of access control records that meet the condition
Example:
POST
/iclock/querydata?SN=$(SerialNumber)&type=tabledata&cmdid=291&tablename=transaction&count=41
&datafmt=3&Stamp=9999
name=transaction.tgz
size=636
datacode=base64
transaction=41
ID=291&Return=41&CMD=ACCOUNT&transaction&StartTime=&EndTime=&RecordSum=41
12.2.2 Controller
Format:
(1) C:${CmdID}:ACCOUNT$(SP)transaction$(SP)MaxIndex=${XXX}
(2) C:${CmdID}:ACCOUNT$(SP)transaction$(SP)StartIndex=${XXX}$(HT)EndIndex=${XXX}
(3) C:${CmdID}:ACCOUNT$(SP)transaction$(SP)StartTime=${XXX}$(HT)EndTime=${XXX}
URL:
Content:
SumCount=${XXX}
FileName=${XXX}
ContentType=${XXX}
FileCount=${XXX}
OK
URL:
POST
/iclock/file?SN=$(SerialNumber)&cmdid=${CmdID}&fileseq=${XXX}&contenttype=tgz&table=transaction
&count=$(XXX) HTTP/1.1
Content:
a. Convert the count number of access control records into those in the push upload format and
OK
ID=${CmdID}&Return=${XXX}&CMD=ACCOUNT
Note:
MaxIndex: Access control records of which the ID is greater than this value need to be uploaded. When
the value is 0, all access control records need to be uploaded.
StartIndex: Need to upload access control records of which the ID is greater than or equal to this value.
EndIndex: Need to upload access control records of which the ID is smaller than or equal to this value.
StartTime: Need to upload access control records of which the record time is greater than or equal to this
value. The time format is XXXX-XX-XX XX:XX:XX, for example, 2018-02-22 16:19:20.
EndTime: Need to upload access control records of which the record time is smaller than or equal to this
value. The time format is XXXX-XX-XX XX:XX:XX, for example, 2018-02-22 16:19:20.
FileCount: The number of access control record sub-packages that meet the condition
fileseq: The index of the file sub-packages to upload, which starts from 1
The software delivers a network test command. After receiving the command, the device test the
connectivity based on the IP address and port provided and returns the test result.
Format:
ID=${CmdID}&Return=${XXX}&CMD=Test(SP)Host
Note:
The control commands are used to control device startup, remote door opening, remote door closing,
alarm canceling, enabling or disabling of Normal Open, and auxiliary outputs.
Format:
C:$(CmdID):CONTROL$(SP)DEVICE$(SP)AABBCCDDEE
ID=${CmdID}&Return=${XXX}&CMD=CONTROL$(SP)DEVICE
Note:
AA, BB, CC, and DD are four groups of two-byte strings. Each group of strings is the converted result of a
one-byte integer after %02X conversion. Wherein, AA indicates control commands, which are described
as follows:
| AA | BB | CC | DD | EE |
|------|
| 01: Control the output | 00: Open all the doors. 01-10: The door ID | 01: Control the lock. 02: Control the
auxiliary output. | 00: Off. FF: Normal open. 01-FF: The opening duration. | Operator |
| 02: Cancel the alarm. | 00: Cancel the alarms. 01-10: The door ID | | | Operator |
| 03: Restart the device. | 00: Restart the current device. 01-10: The slave device ID. | | | Operator |
| 04: Control Normal Open. | 00: All the doors. 01-10: The door ID | 00: Disable. 01: Enable. | | Operator |
| 05: Deliver the administrator to the door. | 00: All the doors. 01-10: The door ID | | | Operator |
| 06: Lock/unlock the door. | 00: Open all the doors. 01-10: The door ID | 00: Unlock. 01: Lock. | | Operator |
| 07: Control emergency dual-on or dual-off. | 01: Emergency dual-on. 02: Emergency dual-off. | | |
Operator |
| 08: The Zigbee command | 01: Re-networking. 02: Stop re-networking. 03: Allow access. 04: Stop access. |
| | Operator |
| 09: The Wiegand test command | 01: Start the Wiegand test. 02: Stop the Wiegand test. | | | Operator |
| 10 485: The lighting command | | | | Operator |
| 11: The network switchover command | 01: Switch from wired network to the 4G network. 02: Switch
from the wired network to Wi-Fi. 03: Switch from 4G network to wired network. 04: Switch from Wi-Fi to
wired network. | | | Operator |
| 12: The command of registering by identity card | 01: Enable the mode of registering by identity card. 00:
Disable the mode of registering by identity card. | 00: Open all the doors. 01-10: The door ID | Timeout
time | Operator |
| 13: The command of querying the sub-device connection status | | | | Operator |
Example:
(1) The server delivers the command of opening Door 1 for 5s:
(2) The server delivers the command of canceling the alarm of Door 1:
(3) The server delivers the command of restarting the current device:
After receiving the command, the client uploads the request protocol:
Cookie: token=${XXX}
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
type=wg\tbitscount=%?\tbits=%?\tsn=%?
OK
(5) The server delivers the command of querying the sub-device connection status:
ID=224&Return=0&CMD=CONTROL DEVICE
12.4.1 Upgrade
It is used to remotely upgrade the firmware of the client device from the server software.
Method 1:
Application scenario:
To remotely upgrade the client firmware, the client needs to be compatible with the controller and the
new-architecture PULL SDK Device. The files to upgrade must be converted by the server to the specified
format and then delivered to the client.
Format:
C:${CmdID}:UPGRADE$(SP)checksum=${XXX},url=$(URL),size=${XXX}
The client downloads the upgrade package from the URL carried in the command:
ID=${CmdID}&Return=${XXX}&CMD=UPGRADE
Note:
Note:
In this method, the firmware upgrade file is base64-encoded by the server before delivery. After
receiving the file, the client needs to convert it into a binary file and name it as emfw.cfg.
Example:
Method 2:
Application scenario:
The client directly obtains the upgrade file to upgrade the firmware remotely, without converting the file
format.
Format:
C:${CmdID}:UPGRADE$(SP)type=1,checksum=${XXX},size=${XXX},url=$(URL)
Cookie: token=af65a75608cf5b80fbb3b48f0b4df95a
Host: 192.168.213.17:8088
ID=${CmdID}&Return=${XXX}&CMD=UPGRADE
Note:
type: 1 means obtaining the upgrade file from the URL. Currently, only 1 is supported.
Checksum: The MD5 checksum
url: The address to download the upgrade file named emfw.cfg
size: The size of the upgrade package
Note:
In this method, the client directly obtains the firmware upgrade file, without the need of converting
its format.
Example:
C:123:UPGRADE
type=1,checksum=oqoier9883kjankdefi894eu,size=6558,url=http://192.168.0.13:89/data/emfw.cfg
Cookie: token=af65a75608cf5b80fbb3b48f0b4df95a
Host: 192.168.0.13:89
ID=384&Return=0&CMD=UPGRADE
Application scenario:
It is used to set the client configuration parameters, such as the IP address, gateway, and lock driver time
length.
Format:
C:$(CmdID):SET$(SP)OPTIONS$(SP)parameter-value list
ID=$(CmdID)&Return=0&CMD=SET OPTIONS
Note:
The parameter list is in the form of parameter name=parameter value. Multiple parameters are separated
by commas, but the last parameter is not followed by a comma.
Example:
C:403:SET OPTIONS
IPAddress=192.168.213.221,GATEIPAddress=192.168.213.1,NetMask=255.255.255.0
Note:
DateTime: The value means the current time of the server and is in seconds converted by using the
method in Appendix 5.
Some devices stop time synchronization after receiving this command, while some devices
immediately trigger the following request after executing this command. Compatibility should be
considered.
Request:
Cookie: token=af65a75608cf5b80fbb3b48f0b4df95a
Host: 192.168.213.17:8088
Response:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Content-Length: 33
DateTime=583050990,ServerTZ=+0800
Note:
DateTime: The value means a Greenwich mean time and is in seconds converted by using the
method in Appendix 5.
C:405:SET OPTIONS
Door1Drivertime=5,Door1KeepOpenTimeZone=0,Door1ValidTZ=1,Door1SupperPassWord=,Door1Interti
me=0,Door1VerifyType=0,Door1SensorType=1,Door1Detectortime=15,Door1CloseAndLock=0,Door1For
cePassWord=,Reader1IOState=0,WiegandIDIn=1,WiegandID=1
Door1SensorType: Door sensor type of Door 1. 0: none. 1: Normal open. 2: Normal close.
WiegandIDIn:
WiegandID:
ID=405&Return=0&CMD=SET OPTIONS
Application scenario:
Format:
POST
/iclock/querydata?SN=$(SerialNumber)&type=options&cmdid=$(CmdID)&tablename=options&count=1
&packcnt=1&packidx=1 HTTP/1.1
Parameter-value list
ID=$(CmdID)&Return=0&CMD=GET OPTIONS
Note:
/iclock/querydata: The URI of the data that is uploaded by the client and meets the condition
type: "options" means the type of the data to be uploaded by the client is the parameter.
packcnt: The total number of packages. When there is a great amount of data, the data needs to be
divided into different packages. This value indicates how many packages the data is divided into.
packidx: The package ID, which indicates which of all packages is currently being sent.
Multiple parameters are separated by commas, but the last parameter is not followed by a comma.
Example:
C:408:GET OPTIONS
~SerialNumber,FirmVer,~DeviceName,LockCount,ReaderCount,AuxInCount,AuxOutCount,MachineType,
~IsOnlyRFMachine,~MaxUserCount,~MaxAttLogCount,~MaxFingerCount,~MaxUserFingerCount,MThres
hold,NetMask,GATEIPAddress,~ZKFPVersion,SimpleEventType,VerifyStyles,EventTypes,ComPwd
~SerialNumber: The SN
~IsOnlyRFMachine: Specify whether only the enable/disable parameter of the RF card is supported.
VerifyStyles: The supported verification mode. It contains 32 bits in total. Each of the first 16 bits
corresponds to a different combination of verification modes. For details, see Appendix 3 Description of
Verification Mode Code. 1 indicates that the verification mode is supported, and 0 indicates that the
verification is not supported. 200 indicates an access control event.
EventTypes: The supported event type, which contains 32 bytes (0 to 31) in total. Each byte contains 8
bits, represented by 2 hexadecimal numbers, a total of 256 bites (0 to 255). For the function represented
by each bit, see Appendix 2 Description of Real-time Events. 1 indicates that the event is supported and 0
indicates that the event is not supported.
C:409:GET OPTIONS
IclockSvrFun,OverallAntiFunOn,~REXInputFunOn,~CardFormatFunOn,~SupAuthrizeFunOn,~ReaderCFGF
unOn,~ReaderLinkageFunOn,~RelayStateFunOn,~Ext485ReaderFunOn,~TimeAPBFunOn,~CtlAllRelayFun
On,~LossCardFunOn,DisableUserFunOn,DeleteAndFunOn,LogIDFunOn,DateFmtFunOn,DelAllLossCardFu
nOn,DelayOpenDoorFunOn,UserOpenDoorDelayFunOn,MultiCardInterTimeFunOn,DSTFunOn,OutRelayS
etFunOn,MachineTZFunOn,AutoServerFunOn,PC485AsInbio485,MasterInbio485,RS232BaudRate,AutoSer
verMode,IPCLinkFunOn,IPCLinkServerIP
OverallAntiFunOn: Specify whether to enable the regional APB function. It is not used.
~CardFormatFunOn: Specify whether the Wiegand reader supports the user-defined card format.
~ReaderCFGFunOn: Specify whether to enable the reader configuration function. It is not used.
DelayOpenDoorFunOn: Specify whether to enable the delay open door function. This function is not
supported.
UserOpenDoorDelayFunOn: Specify whether to enable the function of delaying the door open time for a
user. This function is not supported.
MultiCardInterTimeFunOn: Specify whether to enable the function of setting the interval for multiple
cards. This function is not supported.
DSTFunOn: Specify whether to enable the DLST function. This function is not supported.
OutRelaySetFunOn: Specify whether to enable the configuration output function. This function is not
supported.
MachineTZFunOn: Specify whether to enable the function of setting a time zone for the machine. This
IPCLinkFunOn: Specify whether to enable the soft linkage with IPC. This function is not supported.
13 Remote Identification
The device sends the data that passes identification to the server. After identification, the server returns
the result, the data that passes identification, and the control command, as shown below:
Client request message:
Host: ${ServerIP}:${ServerPort}
Content-Length: ${XXX}
time=${XXX}${HT}pin=${XXX}${HT}cardno=${XXX}${HT}addrtype=${XXX}${HT}eventaddr=${XXX}${HT}eve
nt=${XXX}${HT}inoutstatus=${XXX}${HT}verifytype=${XXX}
Note:
URI: /iclock/cdata
Client configurations:
addrtype: The event point type, that is, by whom the event is generated
Value Meaning
1 Device
2 Door
3 Reader
4 Auxiliary input
5 Auxiliary output
eventaddr: The event address. If the event is generated by the device, this value can be the device
address. If the event is generated by the reader, this value can be the reader address. Currently, the door
is the only option.
inoutstatus: The in or out the status, that is, entering or exiting the door.
HTTP/1.1 200 OK
Date: ${XXX}
Content-Length: ${XXX}
AUTH=${XXX}${CR}${LF}time=${XXX}${HT}pin=${XXX}${HT}cardno=${XXX}${HT}addrtype=${XXX}${HT}ev
entaddr=${XXX}${HT}event=${XXX}${HT}inoutstatus=${XXX}${HT}verifytype=${XXX}${CR}${LF}CONTROL$
(SP)DEVICE$(SP)AABBCCDDEE
Note:
Value Meaning
The controller command after successful verification. For details, see CONTROL DEVICE.
Appendixes
| -101 | The conditional field in the table structure does not exist |
| -102 | The total field count is inconsistent |
| -103 | The field sequence is inconsistent |
| -104 | Incorrect real-time event data |
| -105 | Incorrect data for resolution |
| -106 | The size of the delivered data exceeds 4 MB |
| -107 | Failed to get the table structure |
| -108 | Invalid OPTIONS |
| -201 | LoadLibrary failed |
| -202 | Failed to call the interface |
| -203 | Communication initialization failed |
| -206 | Failed to start the serial port agent program. A general cause is that the serial port does not exist
or has been occupied |
| -301 | Failed to get the TCP/IP version |
| [*,-600] is a returned value exclusive to push communication [Returned value already mentioned above
cannot be defined repeatedly] | |
| -601 | Reserved. For firmware internal use only |
| -603 | Internal error: invalid handle |
| -604 | Insufficient memory |
| -609 | Internal error: invalid handle |
| -612 | The device failed to save the parameter |
| -614 | Failed to remotely cancel the alarm |
| -615 | Remote restart failed |
| -616 | Remotely enabling or canceling normal open failed |
| -618 | Incorrect URL format |
| -619 | Firmware internal error: blank input parameter |
| -620 | The format of the data delivered by the server is incorrect |
| -621 | The table structure does not support this field |
| -628 | Main failed to load the fingerprint to the memory |
| -629 | Incorrect table name |
| -630 | Failed to execute the shell command |
| -631 | Incorrect base64 length |
| -632 | Incorrect file name |
|||
| -701 | Reserved. For firmware internal use only |
| -702 | Reserved. For firmware internal use only |
| -703 | Reserved. For firmware internal use only |
| -704 | Reserved. For firmware internal use only |
| -705 | Reserved. For firmware internal use only |
| 7 | Card or password |
| 8 | User ID and fingerprint |
| 9 | Fingerprint and password |
| 10 | Card and fingerprint |
| 11 | Card and password |
| 12 | Fingerprint, password, and card |
| 13 | User ID, fingerprint, and password |
| 14 | User ID and fingerprint, or card and fingerprint |
| 15 | Face |
| 16 | Face and fingerprint |
| 17 | Face and password |
| 18 | Face and card |
| 19 | Face, fingerprint, and card |
| 20 | Face, fingerprint, and password |
| 21 | Finger vein|
| 22 | Finger vein and password|
| 23 | Finger vein and card |
| 24 | Finger vein, password, and card |
| 200 | Other |
| 90 | Czech |
| 68 | Dutch |
| 105 | Italian |
| 89 | Slovak |
| 103 | Greek |
| 112 | Polish |
| 84 | Traditional Chinese |
unsigned int OldEncodeTime(int year, int mon, int day, int hour, int min, int sec)
return tt;
void OldDecodeTime(unsigned int tt, int *year, int *mon, int *day, int *hour, int *min, int *sec)
*sec = tt % 60;
tt /= 60;
*min = tt % 60;
tt /= 60;
*hour = tt % 24;
tt /= 24;
*day = tt % 31 + 1;
tt /= 31;
*mon = tt % 12 + 1;
tt /= 12;
*year = tt + 2000;
| DoorDetectortime | Door sensor delay in seconds. 0: No alarm for the delay. >0: Alarm for delay |
| DoorCloseAndLock | Lock at door closing. 1: Enable. 0: Disable. Default: 1 |
| DoorReaderType | Reader type |
| DoorForcePassWord | Duress password, up to 6 bits |
| DoorInTimeAPB | APB duration in seconds |
| DoorREXInput | Exit button status. 1: Do not lock (default). 0: Lock |
| DoorREXTimeOut | Exit button delay in seconds. The delay after the button switch event occurs when
the door is locked |
| WiegandIDIn | Wiegand input type |
| WiegandID | Wiegand output type |
| DoorDelayOpenTime | Door open delay. The delay time after verification |
| ExtDoorDelayDrivertime | Extended pass time in seconds for the disabled |
| DoorMultiCardInterTime | Multi-user door opening interval in seconds |
| DoorFirstCardOpenDoor | First-card normal open. 0: Disable. 1: First-card normal open. 2: First-card
activation |
| DoorMultiCardOpenDoor | Multi-card door opening. 0: Disable. 1: Enable |
| DoorDisable | Enable or disable the door. 1: Enable. 0: Disable. |
| DoorInOutAntiPassback | In/out APB for a single door. 0: No APB. 1: In APB. 2: Out APB. 3: In and out APB |
| DoorMaskFlag | Lock the door. 1: Lock |
3.0.1
3.1.1
3.1.2
• Device:
The device pushes the current PUSH version to the server according to the following protocol:
GET /iclock/cdata?SN=${SerialNumber}&options=all&pushver=${XXX}
Based on the request, the server returns the version of the published protocol that is used by the server
for development to the device.
PushProtVer=xxx: If this parameter is not returned, the device thinks that the protocol version of the
server is 3.0.1 by default.
The device compares its current PUSH version with the protocol version returned by the server and uses
the earlier version for interaction.
• Server:
The server sends the following request to get the version of PUSH used by the client. If no pushver field is
returned, the server thinks that the device's PUSH version is 3.0.1 by default.
GET /iclock/cdata?SN=${SerialNumber}&options=all&pushver=${XXX}
The server needs to return the version of the publish protocol used by the software:
PushProtVer=xxx
The server compares the software's protocol version with the protocol version uploaded by the device
and uses the earlier version for interaction.
C:XXX:COMMAND……
DataType=1,SN=%s,Priority=%d,CmdID=%s,CmdDesc=%s
Note:
For example
DataType=1,SN=DDG7012017010600049,CmdID=295,CmdDesc=C:295:DATA UPDATE
DoorParameters ID=1 Name=DoorAutoMatch Value=1 DevID=1
As for CmdFormat=1, the following prefix must be added to all C:XXX:COMMAND commands:
DataType=1,SN=%s,Priority=%d,CmdID=%s,CmdDesc=
MultiStageControlFunOn //=1: Enable =0: Disable. Specify whether to enable the multi-level control
function. The default value is 0.
MasterControlOn //=1: Enable the main controller. =0: Disable the main controller. The default value
is 0.
SubControlOn //=1: Enable the sub-controller. =0: Disable the sub-controller. The default value is 0.
Application scenario configurations
Non-multi-level device. See Appendix 7.
• When MultiStageControlFunOn, SubControlOn, and MasterControlOn do not exist or their values equal
to the following values
• MultiStageControlFunOn=1 or MultiStageControlFunOn=0
• SubControlOn=0
• MasterControlOn=0
Sub-controller
• MultiStageControlFunOn=1
• SubControlOn=1
• MasterControlOn=0
• Main controller
• MultiStageControlFunOn=1
• MasterControlOn=1
• SubControlOn=0
Algorithm: The encryption algorithm libraries are encapsulated in a centralized manner. The device
uses static algorithm libraries.
Scheme:
(a) Initialize asymmetric encrypted public and private keys when the device and server are reconnected.
(b) The device and the server exchange the public keys.
The device sends its public key P1 to the server.
The server returns its public key P2 to the device.
The public keys are exchanged. Both the device and the server own the public keys P1 and P2.
(c) The device and the server exchange the factors:
The device generates a factor R1 and encrypts it and then sends it to the server by using the
server's public key.
The server decrypts the device factor R1 by using the server's private key.
The server generates a factor R2 and encrypts it and then sends it to the device by using the
Case 2
Note:
(a) The device judges whether the transmission protocol is HTTPS or HTTP based on the set server
address.
(b) The pushver field added in the existing first request protocol header of the device means the version
of the current communication protocol of the device. The PushProtVer field added in the data returned
by the server means the version of the protocol based on which the software is developed. The two
protocol versions are compared and the device and the server use the earlier version for communication.
Case 1: When neither the protocol versions of the server and the device is supported, the data
communication is transmitted in plain text.
Case 2: If one version protocol supports data encryption and the protocol versions of both the server and
the device are supported, the data is encrypted for transmission.
The interaction sequence is as follows:
The server and the device exchange their public keys P1 and P2 based on the new protocol.
The server and the device exchange their factors R1 and R2 based on the new protocol.
CRC32 check is performed for the communication data signature. When both the device and the
server own the factors R1 and R2, the device and the server use the same obfuscation algorithm
to generate a sessionKey. All the data transmitted later uses this value as the private key for
symmetric encryption.
00000000 Successful
Define based on the error source, module, type, and error value.
Error source (first bit)
D: Error code returned from the device
S: Error code returned from the software
Integer
Type Commo Fingerprin Near-infrare Voiceprin Iri Retin Palmprin Finge Pal Visibl
n t d face t s a t r vein m e
vein light
face
belongs to
2-Near-infrared face
near-infrared;
3-Voiceprint
Type 9
belongs to 4-Iris
visible light.
5-Retina
6-Palmprint
7-Finger vein
8-Palm vein
MultiBioPhotoSupport Supports The type is defined bit by bit. Different types are
photos supported.
MultiBioDataSupport Supports The type is defined bit by bit. Different types are
supported.
MultiBioVersion Supported The type is defined bit by bit. Different types are
algorithm7.0.
MaxMultiBioDataCount Supports The type is defined bit by bit. Different types are
bio-templates.
Such as: 0: 10000: 3000: 0: 0: 0: 0: 0: 0: 0, indicating
MaxMultiBioPhotoCount Supports The type is defined bit by bit. Different types are
biometric
Such as: 0: 10000: 3000: 0: 0: 0: 0: 0: 0: 0, indicating
photos.
support for the maximum number of fingerprint
MultiBioDataCount The current The type is defined bit by bit. Different types are
bio-templates
Such as: 0: 10000: 3000: 0: 0: 0: 0: 0: 0: 0, indicating the
3000.
MultiBioPhotoCount The current The type is defined bit by bit. Different types are
biometric
Such as: 0: 10000: 3000: 0: 0: 0: 0: 0: 0: 0, indicating the
photos
current number of fingerprint photos is 10000 and the
www.zkteco.com