fananimi / pyzk

Unofficial library of zkteco fingerprint attendance machine
GNU General Public License v2.0
489 stars 319 forks source link

Download Finger Print data error #172

Open nguyenthao1988 opened 1 year ago

nguyenthao1988 commented 1 year ago

I'm using device zkteco details: SerialNumber: A7K2204560009 FirmwareVer: Ver 6.60 Oct 8 2019 Mac: 00:17:61:12:f5:13 PlatForm: ZMM200_TFT DeviceName: G2 FPAlg: 10 FaceAlg: 7 Manufacturer: ZKTeco Co., Ltd. ManufactureTime: 2020-11-13 16:17:40

If my device upload less 1000 users in device, this lib get data Success, and then i upload more than 1000 users in this device status device: ZK tcp://192.168.24.15:4370 users[72]:1686/20000 fingers:3359/50000, records:0/200000 faces:0/0 this lib return error => Process terminate : RWB Not supported This code using:

`import sys import os sys.path.insert(1,os.path.abspath("./pyzk")) from zk import ZK, const conn = None

create ZK instance

zk = ZK('192.168.24.15', port=4370)

zk = ZK('192.168.24.15', port=4370)

try: conn = zk.connect()
conn.read_sizes() print(conn)
users = conn.get_users() i = 0 for user in users:
i = i +1 print ('- UID #{}'.format(user.uid)) print (' Name : {} {}'.format(user.name, i))

except Exception as e: print ("Process terminate : {}".format(e)) finally: if conn: conn.disconnect()`

How to fix it, Thanks sir.

kurenai-ryu commented 1 year ago

please include a pcap file, and enable verbose mode

nguyenthao1988 commented 1 year ago

dear @kurenai-ryu pcap file using app Wireshark for capture http request ?

Thanks you sir!

nguyenthao1988 commented 1 year ago

Dear @kurenai-ryu Data.pcap at link: https://drive.google.com/file/d/1iMSZtm_oqJcQAtHKT-TQO_VBBrNcNWPR/view?usp=sharing In wireshark i'm filter package ip.addr == 192.168.24.15 and tcp.port in {4370}

PS D:\Documents\Downloads\sitemap-generator-master\sitemap-generator-master> & C:/Python311/python.exe d:/Documents/Downloads/test_zk.py ZK tcp://192.168.24.15:4370 users[72]:946/20000 fingers:1912/50000, records:0/200000 faces:0/0 Process terminate : RWB Not supported

=> when upload account user: 930/20000 => ERROR RWB Not supported. And in wireshark i not capture package return list user.

https://laptrinhvb.net/error2.png

and enable Verbose show this image: https://laptrinhvb.net/error3.png

Can you help me, Thanks you so much,

kurenai-ryu commented 1 year ago

add verbose mode and also the code used for test. ~~that error seems unrelated to pyzk. reopen if needed~~ (check comment below)

kurenai-ryu commented 1 year ago

ok, after reviewing some of the info, It seems your device is too old, maybe you can try with an older version of this library, way before implementing the ReadWriteBuffer (probably tag 0.9 or 0.6)

as it seems, I didn't found a device that didn't have the RWB feature until today - that's why I replace the older mechanism with the RWB (that uses command _CMD_PREPARE_BUFFER to build a bulk request)

in the mean time try using the get_user_template to read each template one by one, and please test the get_attendance if the same error rises. if not, that workaround could help you. if yes, sorry, the current version can't help you.

sadly I don't have the time nor devices to re-implement the older method, so that's on you.

nguyenthao1988 commented 1 year ago

Dear sir, i try this solution of you.

Thank you for support so much.

On Tue, Mar 28, 2023, 04:09 kurenai-ryu @.***> wrote:

ok, after reviewing some of the info, It seems your device is too old, maybe you can try with an older version of this library, way before implementing the ReadWriteBuffer (probably tag 0.9 or 0.6)

as it seems, I didn't found a device that didn't have the RWB feature until today - that's why I replace the older mechanism with the RWB (that uses command _CMD_PREPARE_BUFFER to build a bulk request)

in the mean time try using the get_user_template to read each template one by one, and please test the get_attendance if the same error rises. if not, that workaround could help you. if yes, sorry, the current version can't help you.

sadly I don't have the time nor devices to re-implement the older method, so that's on you.

— Reply to this email directly, view it on GitHub https://github.com/fananimi/pyzk/issues/172#issuecomment-1485865516, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2W4HAGOPSPTWPALAVAEILW6H6YNANCNFSM6AAAAAAWGCTXHU . You are receiving this because you authored the thread.Message ID: @.***>