ZKLibrary icon indicating copy to clipboard operation
ZKLibrary copied to clipboard

Connect function return false

Open aa-ahmed-aa opened this issue 6 years ago • 7 comments

I have my zk-k14 fingerprint device accessible via local network and when i tried to connect using this library i get false connection things i checked and still getting false connection :- -the fingerprint device is accessible throw this ip : 192.168.1.201 AND port : 4370. -i make sure that the device is accessible without any pin code or passwords. when i try to connect to the device using the official SDK it connect successfully so using wireshark i compared the packet sent from the official sdk with the one using this library and i noticed. -the packet sent using this library is an empty UDP packet. -the one sent from the official sdk is a TCP packet with this content

PP.}............PP.}.......vw...PP.}....L.;zw...PP.}......3#w...Ver 6.60 Jun 16 2015.PP.}........w...~OS.PP.}........w...~OS=1.PP.}......L.w...~ExtendFmt.PP.}......Jcw...~ExtendFmt=0.PP.}......N|w...ExtendOPLog.PP.}.......vw...PP.}.......tw...ExtendOPLog.PP.}.......~w...PP.}......W|w...ExtendOPLog.PP.}.......~w...PP.}......V|w...ExtendOPLog.PP.}.......~w...PP.}......U|w...ExtendOPLog.PP.}.......~w...PP.}......8.w.	.~Platform.PP.}.......?w.	.~Platform=JZ4725_TFT.PP.}.......=w.
.~ZKFPVersion.PP.}........w.
.~ZKFPVersion=10.PP.}
...E.`Uw....(PP.}	......vw...	PP.}........w...WorkCode.PP.}........w...WorkCode=1.PP.}
.......w.
.~SSR.PP.}........w.
.~SSR=1.PP.}........w...~PIN2Width.PP.}.......zw...~PIN2Width=9.PP.}........w...FaceFunOn.PP.}.......vw...PP.}........w...~UserExtFmt.PP.}.......Vw...~UserExtFmt=0.PP.}....L.+zw...PP.}......##w...Ver 6.60 Jun 16 2015.PP.}......	=w...~ZKFPVersion.PP.}........w...~ZKFPVersion=10.PP.}........w...~IsOnlyRFMachine.PP.}.......ow...~IsOnlyRFMachine=0.PP.}........w...~OS.PP.}........w...~OS=1.PP.}.......|w.......PP.}.......vw...PP.}......[yw...,...PP.}.......vw...PP.}....2.?~w...PP.}X.......w...........................&.......................................P...............PP.}....2.>~w...PP.}X.......w...........................&.......................................P...............PP.}....2.=~w...PP.}X.......w...........................&.......................................P...............PP.}....2.<~w...PP.}X.......w...........................&.......................................P...............PP.}....2.;~w...PP.}X.......w...........................&.......................................P...............PP.}........w...~UserExtFmt.PP.}.......Vw...~UserExtFmt=0.PP.}.......zw...PP.}.......vw...PP.}......\5w...~SerialNumber.PP.}*.....m.w...~SerialNumber=OEG6060486051400346.PP.}........w...~DeviceName.PP.}.......-w...~DeviceName=K14.

aa-ahmed-aa avatar May 01 '18 13:05 aa-ahmed-aa

Same problem, can't connect to the device, though using sdk is working normal. Firmware version: Ver 6.60 Jun 16 2015 return: bool(false)

khandilist avatar May 03 '18 03:05 khandilist

I am so sorry. I have never tried with these devices...

kamshory avatar Jun 01 '18 07:06 kamshory

@aa-ahmed-aa facing the same issue with zkteco-k14. do you find any solution yet???

syedJunaidd avatar Jul 06 '18 07:07 syedJunaidd

no not yet

aa-ahmed-aa avatar Jul 06 '18 15:07 aa-ahmed-aa

Hi. I am using zk 40 but I can´t conect to the device, someone has a solution?

javidu avatar Dec 28 '18 16:12 javidu

define( 'CMD_ACK_OK', 2000 ); I have a question in checkValid() function for variable $command that receive the packet which return more then 2000 that's okay or not ? I tested with this model https://www.zkteco.com/en/product_detail/G4.html I wonder why this $zk->connect() always return false but actually it connected and I can get the user and attendant data from that device. I did debug in checkValid() and the return packet is 2005. Because in checkValid() return true unless $command == CMD_ACK_OK.

noeurphireak avatar Apr 01 '19 08:04 noeurphireak

Hi Dears, i am facing same issue . would you please help if anyone of you have found any solution. include "zklibrary.php"; $zk = new ZKLibrary('192.168.1.201', 4370); $zk->connect(); // this line always return false. by the way my device details is : Device Name : K40/ID Serial No : A8N5190360022 MAC: 00:17:61:10:55:6D ALG.VER : ZKFINGER VX10.0 FIRMAWARE VER : VER 4.0.4 (BUILD 13) VENDOR: ZKTECO INC

omer-jan avatar Sep 29 '19 18:09 omer-jan