kamshory / ZKLibrary

ZKLibrary is PHP library for reading and writing data to attendance device using UDP protocol. This library useful to comunicate between web server and attendance device directly without addition program. This library is implemented in the form of class. So that you can create an object and use it functions.
GNU General Public License v2.0
193 stars 176 forks source link

Couldn't connect when device have Communication Password #103

Open juno-w opened 3 years ago

juno-w commented 3 years ago

Hi, the connection is failed when the device have communication password set. How to connect together with comm key?

juno-w commented 3 years ago

I found there's a method to connect using Comm Key in python but I don't know how to translate it.

This is the method to generate command_string: https://github.com/fananimi/pyzk/blob/master/zk/base.py#L23

This is the method called during connection: https://github.com/fananimi/pyzk/blob/master/zk/base.py#L359

juno-w commented 3 years ago

I added a feature to connect with communication key.

dushiboy commented 3 years ago

where should I put the communication key (device password)

$zk = new ZKLibrary('192.168.1.102', 4370);