Hanvon SDKManual
Hanvon SDKManual
Hanvon SDKManual
API Specification
Hanwang Technology Co., Ltd is the most important intelligent recognition solution provider in the
world, and was founded in 1998. Nowadays, we have over 600 employees, and more than 300 R&D
members. We have hosted in a 23,000m2 building called Hanwang Building which locates at
Zhongguancun Software Park in Beijing.
Vision: Enrich people’s life with good taste and efficiency by digital technology
Mission: Make customers/partners/shareholders/employees live easier and happier
Core Competence: Intelligence Interaction technologies & products, which used Pattern
Recognition as the core
Page 2 of 49
Statement
Thanks for your interest and cooperation with Hanwang Technology Co., Ltd. Please note below
terms of use this Software Development Kits:
Follow up all instruction during your development, we do not be responsible for any data destroyed
or lost which caused by human element or program you are developing or developed.
Copyright © Hanwang Technology Co., Ltd. All right reserved Specifications are subject to change
without notice. Hanvon and Face ID is a registered trademark of Hanwang Technology Co., Ltd. All
other brands or products may be trademarks, service marks or registered trademarks of their
respective owners.
Page 3 of 49
Table of Contents
Page 4 of 49
1 SDK Overview
This Software Development Kits (SDK) is targeted to provide flexible solution for Software or
Solution integrators based on Hanwang Facial Recognition technology. This SDK is composed of
development documentation, development Demo, development tools. Following functions could be
realized:
z Employee Management
z Record Management
z Device Management
z Image Management
Page 5 of 49
2 SDK Installation
z Please copy this SDK to local disk, open Demo folder then find related folder;
z Copy HwDevComm.dll and Hdcp_Utils.dll to the related folder;
z Start related program tools to run.
Related parameter, such as connection method, device type, and IP address, could be defined with
the interface of the Demo
4 kinds of demo source codes, C#, VC, DELPI and VB, are provided and kept in each separated
folders in DEMO Directory.
The aim of this guide is to describe how to use dynamic link library HwDevComm.dll. Users can
achieve different functions with different parameters via calling the interface.
Hdcp_Utils.dll is an accessory library file which used for the switch of JPG file and BASE64 code
that help programmer to handle the image data.
It is no need to understand the details of the communication protocol as the protocol have been
sealed in the SDK. The address of the API will be gained after loading the HwDevComm.dll, and
then sends the parameters to related functions.
2.3 API
HwDevComm.dll provides 2 working mode: client side and server side. In client side mode, PCs
with running dll regards as client to send request to FaceID devices, and wait for the responding; in
server side mode, PCs with running dll regards as server to receive data from devices
In client side mode, HwDevComm.dll provides 2 interfaces, as the following frames shown:
Page 6 of 49
Declaration Definition:
Int HwDev_Execute(char * pDevInfoBuf, unsigned long nDevInfoLen,
char * pSendBuf, unsigned long nSendLen,
char ** pRecvBuf, unsigned long * pRecvLen,
FuncTotalDoneTp pFuncTotalDone)
Parameter Definition:
pDevInfoBuf The information pointer of facial recognition device. The device
information described as below:
Page 7 of 49
Client Side API 2 Definition:
HwDev_Finish Release data storage memory.
Declaration Definition:
void HwDev_Finish ( char ** pRecvBuf)
Parameter Definition:
pRecvBuf The pointer of the receiving buffer. It places execution results from
various commands; This buffer is applied by HwDev_Execute interface,
and is released by HwDev_Finished interface.
In server side mode, HwDevComm.dll provides 1 interface, as the following frames shown:
Declaration Definition:
int HwDev_Server(int nSwith, char *pServerInfoBuf,
unsigned long nServerInfoLen,
FuncProcessData pFuncProcessData)
Parameter Definition:
nSwith It is to indicate functionality of executing function:
1 - to start a port monitoring service;
0 - to close a running monitoring service;
Others - remain value.
pServerInfoBuf String address of information for starting service in local server. The
format is: ServerInfo( comm_type = "ip" ip_address = "173.16.4.253"
ip_port = "9923")
Page 9 of 49
3 Overview of Communication Protocol
Figure 3.1
The grammar of this protocol will be shown in Figure 3.1, it is comprised with 4 types of key word,
as described in Frame 3.1:
Frame 3.1
Except the separator, the other key words are combined with number, letters and underline, they are
32 letters in maximum and case sensitive. Space, Tab, CR can be inserted between each key word,
and ignore the procedure.
Page 10 of 49
3.3 Naming Principles of Key Word
Page 11 of 49
4 Key Word List and Definition
Name Definition
Employee management
command
GetEmployeeID Return all employees ID from the device.
GetEmployee Return specified employee information from the device according to
employee ID, only one employee each time.
SetEmployee Set employee information to the device, only one employee each time.
DeleteEmployee Delete a specified employee from the device according to employee ID,
many employees can be deleted once.
DeleteAllEmployee Delete all employees from the device.
SetNameTable This command updates the “id-name” list in the device.
AddNameTable Add “id-name” list
DetectEmployeeData Detect the device whether contains user data.
GetTimeZone Get time zone from device
SetTimeZone Set the information for the device
DeleteTimeZone Delete a time zone from the device
Record management
command
GetRecord Return records from the device according to given time range.
DeleteAllRecord Delete all records stored in the device.
Device management
command
InitDevice Initialize device to default setting.
InitDeviceAdmin Initialize administrator setting to default setting.
GetDeviceInfo Return configuration and status information from the device.
Page 12 of 49
SetDeviceInfo Set configuration and status information to the device.
UpdateFirmware Upgrade firmware
GetNetInfo Get device network parameter
SetNetInfo Set device network parameter
GetMAC_SN Get MAC address and SN
DetectDevice Detect device whether exist
RestartDevice Restart device
SetDayLight Set Daylight Saving Time (DST)
GetDayLight Get Daylight Saving Time (DST) setting
SetWorkCode Set work code information.
GetWorkCode Return work code information.
ClearWorkCode Clear work code information.
DeleteWorkCode Delete specific work code information.
SetWorkStatus Set work status information.
GetWorkStatus Return work status information.
ClearWorkStatus Clears work status information.
DeleteWorkStatus Delete specific work status information.
GetManagerID Get all admin. IDs
GetManager Get all admin. information by admin. IDs
SetManager Set admin. information
DeleteManager Delete specific admin.
GetAttendanceInterval Get device interval period
SetAttendanceInterval Set device interval period
OpenDoor Remote to open door
ConfirmPassword Comfirm password
SetRelayTime Set relay delay time
GetRemoveAlarm Get status for removal alarm
SetRemoveAlarm Set status for removal alarm
GetFRAlarm Get status for false recognition alarm
SetFRAlarm Set status for false recognition alarm
Page 13 of 49
GetMagneAlarm Get status for door magnet sensor
SetMagneAlarm Set status for door magnet sensor
GetDateTime Get device date
SetDateTime Set device date
GetVolume Get device volume status
SetVolume Set device volume status
GetWiegandOut Get Wiegand output parameter
SetWiegandOut Set Wiegand output parameter
GetBell Get time alarm bell status
SetBell Set time alarm bell status
GetOnOffSchedule Get power on/off schedule status
SetOnOffSchedule Set power on/off schedule status
GetClientStatus Get records auto uploading status
SetClientStatus Set records auto uploading status
SetAutoResetTime Reset the device at the certain time
SDFormat() Format the SD card
Image management
command
GetPictureName Return image file name list according to time of this file and whether the
images were recognized successfully.
GetPicture Return image files according to the name of image file. These image files
are encoded by base-64, and uses JPG format.
Result command
Return Return value mark. It’s an executing result of a command. The structure
is:
Return( result="success / failed" [ Ctrl_Word = "Parameter /
Value" ] ... )
Wait Wait mark. It means the device is running a command, and need to wait a
moment (the time is given by the control word “wait_time”, and uses
“second” as a unit),to return the result. The structure is:
Page 14 of 49
Wait(wait_time = "10") //this means that need to wait for 10
seconds
Usually, if the executing command can return the result within 5 seconds,
then it is not necessary to use “Wait”.
Caution: the default time of receiving data for this protocol is 5 seconds. If
a command does not return any value within 5 seconds, and it does not
indicate a waiting time by using “Wait” command as well, then the
command will get an overtime exception and exit.
Name Definition
The description of the
command executive result
result Mark the executive result of a command, the possible constant
values will be:
Name Definition
success Successful
failed Failed
Name Definition
unknown command Unrecognized command
bad parameter Wrong parameter
Page 15 of 49
device busy Device is busy
employee overflow For command SetEmployee, the
number of employee exceeds the
maximum number.
unknown id For command DeleteEmployee, the
certain employee ID doesn’t exist.
notify The notice message for the executive result, it’s usually caused
by the unknown parameter in the command. The possible
constant value will be:
Name Definition
unknown parameter Unrecognized parameter
Public constant
Check method constant To definite the value of control word for time attendance and
access control, the possible constant values will be:
Name Definition
face Face recognition
num&face Pin and Face recognition
card Card only recognition
card&photo Card with photo taking recognition
card&face Card and Face recognition
Logic operation constant To combine several check methods constant, the possible
constant values will be:
Name Definition
Page 16 of 49
& AND
| OR
Page 17 of 49
Use ““ to bracket data
Note: For card user, it does not include face_data and head_photo
items.
Name Definition
from_door Valid logs for opening door
from_check Valid logs for attendance
Note: if valid logs for both opening
door and attendance, then:
card_src=”from_door&from_check”
card_type Attribute of clock time, the possible constant values will be:
Name Definition
cardtype_normal Normal card
cardtype_on On duty
cardtype_off Off duty
cardtype_addon Work overtime sign in
cardtype_addoff Work overtime sign off
Page 18 of 49
cardtype_out leave office
cardtype_back back to office
Name Definition
chs Simplified Chinese
cht Traditional Chinese
enu American English
jpn Japanese
kor Korean
volume Volume of the device, the possible constant values will be:
Name Definition
0 Mute
1 Low
2 Middle
3 High
dev_id Device ID
edition The software version of device
wiegen Wiegend protocol.
ip\gateway\netmask\mac\hostip\ Network information
commukey
mac MAC address
sn Serial number
Page 19 of 49
erasepage Flash erasing scope
writepage Flash writing scope
holdpage Flash remain scope
md5check MD5 secret key
style Date format, constant values are:
Name Definition
1 YYYY-MM-DD
2 YYYY/MM/DD
3 YYYY.MM.DD
4 MM-DD-YYYY
5 MM/DD/YYYY
6 MM.DD.YYYY
7 DD-MM-YYYY
8 DD/MM/YYYY
9 DD.MM.YYYY
Name Definition
w26 26-bit without site code
w26_site 26-bit with site code
w34 34-bit without site code
w34_site 34-bit with site code
customize Customized Wiegand format
Name Definition
id Output content is User ID
card Output content is Card Number
Page 20 of 49
site_code Site code
oem_bit OEM bit
oem_value OEM value
area_bit Site code bit
area_value Site code value
card_bit Card number bit
even_start Start value of domain for even parity bit
even_end End value of domain for even parity bit
odd_start Start value of domain for odd parity bit
odd_end End value of domain for odd parity bit
bell_numbe Bell number
bell_sound Bell sound
alarm_time Bell duration
bell_times Bell times
turn_on_status Device power on status
turn_on_time Device power on time
turn_off_status Device power off status
turn_off_time Device power off time
fr_times Times of false recognition
fr_period Alarm period of false recognition
magne_delay Delay time for door sensor alarm
magne _period Alarm period for door sensor
Page 21 of 49
real_cardregist Current number of card users
max_photorecord Maximum number of photos
real_photorecord Current number of photos
format Daylight Saving Time format, constant values are:
Name Definition
month_date Month-Date format
month_week Month-Week-Day format
If there are not mentioned field names appear in data transmission, they are for internal
use only, and user can ignore these field names.
Page 22 of 49
5 Description of Command Word
Command GetEmployeeID()
Successful reply Return(result="success" total="100" id="11" id="109" ...)
Failed reply Return(result="failed")
Caution For S7150A model, the return result of this function contains
register_type, like:
Return(result="success" total="100" id="11" register_type="face"
id="109" register_type="face"...)
Command GetEmployee(id="120")
Successful reply Return(result="success"
id="120"
name=“John”
calid=""
card_num=“ 0X4c2c3801”
authority="0X0"
check_type="face&card"
opendoor_type="face&card"
face_data="ADFASERQERERTYSDFGHSDFGADSF..."
......
face_data="HASRTTYHRTAEFASDFQEQAFf...")
There are total 18 sets of BASE64 encoding face templates data
(face_data); “face_data” contains 876 characters.
Failed reply Return(result="failed" reason="unknown id")
Caution Can only get one ID each time. The value of string “calid” is calculated
according to some rules, user can ignore it. The same explanation uses for
the following cases.
Page 23 of 49
For S7150A model, the return result of this function contains
register_type and enterType
Command SetEmployee(id="1009"
name=“John”
calid=""
card_num=“ 0X4c2c3801”
authority="0X0"
check_type="face"
opendoor_type="face"
face_data="ADFASERQERERTYSDFGHSDFGADSF..."
......
face_data="HASRTTYHRTAEFASDFQEQAFf...")
(base-64 encode)
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="employee overflow")
Caution For S7150A model, this function needs to set “register_type” and “photo”
parameters;
For FK628 model, this function needs to set “photo” parameter;
For F810 model, this function needs to set “enter_type” and parameter.
Values “face”, “card&face”, “card” and “card&photo” in “enter_type”
parameter are not interchangeable to each other.
Command DeleteEmployee(id="100")
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="unknown id")
Command DeleteAllEmployee()
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Page 24 of 49
Command SetNameTable(120="John" 88="Tom" 192="Mary" 1290="Alice"...)
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON" )
Caution This command will update the “id-name” user list, and will overwrite the
existing names in the list.
The old list will be overwritten by the new list.
Note: this command will not modify id and name in employee data.
Command DetectEmployeeData ()
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution If return “success”, then represents the device contains users’ data; if
return “failed”, then represents the device does not contain users’ data,
and return failed reason.
Command GetTimeZone( )
Successful Return(result="success"
Sat.:= "00:00-23:59"
Sat.:= "00:00-23:59"
...
Page 25 of 49
id="50" name=" Time Zone" Sun.="00:00-23:59" Mon.="00:00-23:59" ...
Sat.:= "00:00-23:59"
reply
not be modified.
00:00:beginning time
23:59:ending time
Sat …
Caution When the id=1,the time zone items could not be modified, from
Mon.="02:00-17:00" Tues.="02:00-17:00"...)
Successful Return(result="success")
reply
instruction meZone()’
Caution When the id=1,the time zone items could not be modified, from Monday
Page 26 of 49
"Return(result=\"failed\" reason=\"bad parameter\");
Comma DeleteTimeZone(id="2")
nd
Successf Return(result="success")
ul reply
reply
Command DeleteAllRecord()
Successful reply Return(result="success")
Failed reply Return(result="failed")
Caution This function will delete all records.
For S7150A model, the format of this function is:
DeleteAllRecord(time="2008-08-01 0:0:0"), it allows to delete all records
before indicated date.
Command InitDevice()
Successful reply Return(result="success")
Failed reply Return(result="failed")
Caution It will clear all user data and record data, and device will recover to
factory default setting status (include: users, administrators, records, and
user setting data)
Page 28 of 49
After all data are deleted, the device will reset.
Command InitDeviceAdmin()
Successful reply Return(result="success")
Failed reply Return(result="failed")
Caution It will delete all administrators’ data from device.
Command SDFormat()
Successful reply Return(result="success")
Failed reply Return(result="failed")
Caution It will format the SD card from device.
Command GetDeviceInfo()
Successful reply Return(result="success"
dev_id="1"
time="2006-1-10 10:12:20"
volume="1"
edition="2.031.001"
weigen= 0
ip="172.16.2.209"
gateway="172.16.1.251"
netmask="255.255.252.0"
mac= ""
Page 29 of 49
)
Failed reply Return(result="failed")
Caution For S7150 model, the return value also includes:
max_managernum, managernum, max_faceregist, real_faceregist,
max_facerecord, real_facerecord, max_cardregist, real_cardregist,
max_photorecord, real_photorecord.
For C220, C230, E350 and E350A model, the return value also includes:
max_managernum, managernum, max_faceregist, real_faceregist,
max_facerecord, real_facerecord.
Command GetNetInfo()
Successful reply Return(result="success" ip="172.16.2.209" netmask="255.255.252.0"
gateway="172.16.1.251" commukey=”123456”)
Page 30 of 49
Failed reply Return(result="failed" reason="FAILED REASON")
Caution Device default value are:
IP: 192.168.0.2; MASK: 255.255.255.0; Gateway IP: 192.168.0.1
Command GetMAC_SN()
Successful reply Return(result="success" mac="90-EA-BA-DC-E9-F0" sn="31233")
Failed reply Return(result="failed" reason="FAILED REASON")
Command DetectDevice()
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution Return value is “success”, represents the device exists; Return value is
“failed”, represents device does not exist, and return failed reason in
return value.
Command RestartDevice()
Successful reply Return(result="success")
Failed reply Return(result="failed")
Page 31 of 49
Command SetDayLight(support="1" start_time="5-10 0" end_time="11-10 0")
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution Parameter support=“1” means Daylight Saving Time (DST) function is
open, and support=“0” means DST function is closed. The format of
“start_time” and “end_time” is “Month-Day hour”.
Besides this type of DST format, F810 support another DST format:
SetDayLight(status="enable" start_time="5-10 0" end_time="11-10 0"
format="month_date”)
Month: 1-12;
Week:1-4 or L (Last week);
Day: 1-Monday; 2- Tuesday; 3- Wednesday; 4- Thursday; 5- Friday;
6-Saturday; 7-Sunday
Hour: 0-23
Command GetDayLight()
Successful reply Return(result="success" start_time=“5-10 0” end_time=“11-10 0”)
Failed reply Return(result="failed" reason="FAILED REASON")
Caution Return(result="failed" reason="FAILED REASON").
Page 32 of 49
For F810 model, the return value of this function also contains “status”
and “format” parameters. Parameter “status” is to indicate status of DST,
“enable” is turn on the DST, “disable” is to turn off DST. Parameter
“format” is to choose different DST formats, if the value is “month_date”,
which means it uses “Month-Date hour” format; if the value is
“month_week”, which means it uses “Month-Week-Day hour” format.
The result value shown as below:
0" format="month_date")
Month: 1-12;
Week:1-4 or L (Last week);
Day: 1-Monday; 2- Tuesday; 3- Wednesday; 4- Thursday; 5- Friday;
6-Saturday; 7-Sunday
Hour: 0-23
Command GetWorkCode()
Successful reply Return(result="success" id=“1” name=“manager”)
Failed reply Return(result="failed" reason="FAILED REASON")
Caution This function has two formats:
z GetWorkCode(), returns all work codes and the corresponding
contents of these work codes, when the command runs successfully.
z GetWorkCode(id=“1”), returns specific work code and its
corresponding content, when the command runs successfully.
For F810 model, the return value of this function contains parameter
“status”. If status is “enable”, it means “Work Code” function turns on; if
Page 33 of 49
status is “enable”, it means “Work Code” function turns off.
When this function runs successfully, but status is “disable”, then return
value will be: Return(result="failed" reason="WorkCode Close");
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
If return value is “success”, then succeed to set work code; if return value
is “failed”, then fail to set work code, and the failed reason will be return;
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
For F810 model, it needs to set parameter “status” in this function.
Command ClearWorkCode()
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Command DeleteWorkCode(id="1")
Successful reply Return(result="success")。
Failed reply Return(result="failed" reason="unknown id")
Page 34 of 49
Caution Valid ID range of work code is 1-9999. If return “success”, then it means
the specified work code has been deleted; if return “failed”, then it means
the specified work word does not exist.
Command GetWorkStatus()
Successful reply Return(result="success" id=“1” name=“on duty”)
Failed reply Return(result="failed" reason="FAILED REASON")
Caution This command has two formats:
z GetWorkStatus(), returns all work status and the corresponding
contents of these work status, when the command runs successfully.
z GetWorkStatus(id=“1”), returns specific work status and its
corresponding content, when the command runs successfully.
For F810 model, the return value of this function contains parameters
“status”, “autostatus”, “ondutytime” and “offdutytime”. If parameter
“workstatus” is “enable”, it means work status function turns on; if
“workstatus” is “disable”, it means work status function turns off. If
parameter “autostatus” is “enable”, it means status auto switch function
turns on; If “autostatus” is “disable”, it means status auto switch function
turns off. Parameter “ondutytime” represents on duty time; parameter
“offdutytime” represents off duty time.
If the device does not support this function, then "FAILED REASON"
will be "unknown command”.
Page 35 of 49
Caution Assume id=“3”, its corresponding content is “on weekend duty”; id=“4”,
its corresponding content is “off weekend duty”. User can define work
status and contents according the needs. ID is 1 and 2 are two system
default status, which the corresponding contents are “on duty” and “off
duty”. The default status cannot be modified or deleted.
If return “success”, it means succeed to set work status; if return “failed”,
then return failed reason.
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
SetWorkStatus(workstatus="enable" autostatus="enable"
ondutytime="09:00" offdutytime="18:00" 3="on weekend duty"
4="off weekend duty")
Command ClearWorkStatus()
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Command DeleteWorkStatus(id="3")
Successful reply Return(result="success")。
Failed reply Return(result="failed" reason="unknown id")
Caution Range of ID for work status is 1-255. ID 1 and ID 2 is used by system,
they can not be deleted.
Command GetManagerID()
Successful reply Return(result="success" total="100" id="11" id="109" ...)。
Failed reply Return(result="failed")。
Command GetManager(id="120")
Successful reply Return(result="success"
id="120"
name="Bob"
card_num=“0Xffffffff”
pass_word=”123456”
face_data="ADFASERQERERTYSDFGHSDFGADSF..."
......
face_data="HASRTTYHRTAEFASDFQEQAFf...")
There are total 18 sets of BASE64 encoding face templates data
(face_data);
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution Can only get one ID each time. For C220, C230, F810 model, the return
value of this function also contains “enter_type”; For E350,E350A model,
the result value also contains “enter_type, manager_type”.
Command SetManager(id="1009"
name="Bob"
valid=""
card_num=“0Xffffffff”
pass_word="123456"
face_data="ADFASERQERERTYSDFGHSDFGADSF..."
......
face_data="HASRTTYHRTAEFASDFQEQAFf...")
Page 37 of 49
There are total 18 sets of BASE64 encoding face templates data
(face_data);
Successful reply Return(result="success")。
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution For C220, C230, E350 and E350A model, this function needs to set
enter_type parameter.
Command DeleteManager(id="100")
Successful reply Return(result="success")。
Failed reply Return(result="failed" reason="unknown id")
Caution If return “success”, it means succeed to delete the specified administrator;
if return “failed”, it means the specified administrator does not exist.
Command GetAttendanceInterval()
Successful reply Return(result="success" interval="2")。
Failed reply Return(result="failed")。
Caution Parameter “interval” means recording interval for each attendance record.
Default value is 1 minutes, the range is 0 – 255 mins
Command OpenDoor()
Successful reply Return(result="success")
Failed reply Return(result="failed")
Command ConfirmPassword()
Page 38 of 49
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution FAILED REASON will indicate the reason.
Command SetRelayTime(relay_time="20")
Successful reply Return(result="success")。
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution To set relay time. Its unit is second. The range is 1-99s
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Command GetRemoveAlarm()
Successful reply Return(result="success" status="enable")
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution If parameter “status” is “enable”, it means removal alarm function turns
on; if “status” is “disable”, it means removal alarm function turns off.
Command SetRemoveAlarm(status="enable")
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution If return “success”, it means succeed to removal alarm function; if return
“failed”, then return failed reason.
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Page 39 of 49
Command GetFRAlarm()
Successful reply Return(result="success" status="enable" fr_times="3" fr_period="10")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution If parameter “status” is “enable”, it means recognition rejection alarm
function turns on; if “status” is “disable”, it means recognition rejection
alarm function turns off. Parameter fr_times means rejection recognition
times, the range is 1-9 times; Parameter fr_period means alarm time for
rejection recognition, the range is 1-99 seconds.
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Command GetMagneAlarm()
Successful reply Return(result="success" status="enable" magne_delay="30"
magne _period="20")
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution If parameter “status” is “enable”, it means door sensor alarm function
turns on; if “status” is “disable”, it means door sensor alarm function
turns off. Parameter “magne_delay” means alarm delay time for door
sensor alarm, the range is 1-99 seconds; Parameter “magne_period”
means alarm period for door sensor alarm, the range is 1-99 seconds.
Page 40 of 49
magne _period="20")
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution If return “success”, it means succeed to set alarm of door sensor; if return
“failed”, then return failed reason.
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Command GetDateTime()
Successful reply Return(result="success" date="2000-08-31" time="23:59:59" style="1")
Failed reply Return(result="failed" reason="FAILED REASON")。
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Command GetVolume()
Successful reply Return(result="success" volume="1")
Failed reply Return(result="failed" reason="FAILED REASON")。
Command SetVolume(volume="1")
Successful reply Return(result="success")
Failed reply Return(result="failed" reason="FAILED REASON")
Caution If return “success”, it means succeed to set volume status; if return
Page 41 of 49
“failed”, then return failed reason.
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Command GetWiegandOut()
Successful reply If user selects Wiegand format is 26-bit with site code or 34-bit with site
code, the return result is:
Return(result="success" pattern="w26" pulse_width="100"
interval="1600" content="card" site_code="002")
If user selects customized Wiegand format, then return result will also
contain other parameters, the return result is:
Return(result="success" pattern="w26" pulse_width="100"
interval="1600" content="card" oem_bit="32" oem_value="4294927695"
area_bit="32" area_value="294927695" card_bit="32" even_start="1"
even_end="9" odd_start="16" odd_end="56")
Failed reply Return(result="failed" reason="FAILED REASON")。
Page 42 of 49
parameters, the function format is:
SetWiegandOut(pattern="customize" pulse_width="100"
interval="1600" content="card" oem_bit="32"
oem_value="4294927695" area_bit="32" area_value="294927695"
card_bit="32" even_start="1" even_end="9" odd_start="16"
odd_end="56")
Command GetBell()
Successful reply Return(result="success" bell_number="1" bell_sound="1"
alarm_time="09:00" bell_times= "3" status="enable" bell_number="2"
bell_sound="5" alarm_time="12:00" bell_times= "3" status="enable")
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution If parameter “status” is “enable”, it means bell function turns on; If
“status” is “disable”, it means bell function turns off;
Command GetOnOffSchedule()
Successful reply Return(result="success" turn_on_status="enable" turn_on_time="07:00"
Page 43 of 49
turn_off_status="enable" turn_off_time="23:00")
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution If parameter “turn_on_status” is “enable”, it means power on timer
function turns on; If “status” is “disable”, it means power on timer
function turns off;
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Command GetClientStatus()
Successful reply Return(result="success" status="enable" hostip="172016002201" )
Failed reply Return(result="failed" reason="FAILED REASON")。
Caution If parameter “status” is “enable”, it means device client side function
turns on; If “status” is “disable”, it means device client side function turns
off;
Page 44 of 49
Failed reply Return(result="failed" reason="FAILED REASON")
Caution If return “success”, it means succeed to set client side status; if return
“failed”, it means, fail to set client side status.
If the device does not support this function, then "FAILED REASON"
will be "unknown command".
Command GetPicture(name="/090729/OK/093617.JPG")
Successful reply Return(result="success"
photo="SDFQWERASDFAESRASDF..." ) (base-64 encoded)
Failed reply Return(result="failed")
Caution The value of parameter "name" is a unique mark which combines date,
type and photo name.
Thanks for your interest and cooperation with Hanwang Technology Co., Ltd. Please contact below
information if any question with this SDK.
Page 46 of 49
Appendix - Device Function List
Page 45 of 49
FK605 F710 FA007 F810
SetNetInfo ■ ■ ■ ■
GetManagerID ■
GetManager ■
SetManager ■
UpdateFirmware ■
SetAttendanceInterval ■ ■ ■ ■
SetVolume ■
GetVolume ■
GetWiegandOut ■
SetWiegandOut ■
GetAttendanceInterval ■
GetRemoveAlarm ■
SetRemoveAlarm ■
GetFRAlarm ■
SetFRAlarm ■
GetMagneAlarm ■
SetMagneAlarm ■
GetDateTime ■
SetDateTime ■
DetectEmployeeData ■
DeleteManager ■
GetNetInfo ■
DeleteWorkCode ■
DeleteWorkStatus ■
GetBell ■
SetBell ■
GetOnOffSchedule ■
SetOnOffSchedule ■
Page 46 of 49
FK605 F710 FA007 F810
SetRelayTime ■
GetClientStatus ■
SetClientStatus ■
GetMAC_SN ■
Server (Record Auto-Upload) ■
Page 47 of 49