我目前正在与公园自动化公司合作一个项目,使用连接在局域网上的考勤设备,我拥有ZKTeco公司的K40模型。不幸的是,该设备不是通过web服务器实现的,因此交互的唯一方式是使用TCP端口4370。
该项目是自定义的,用PHP语言编写,我使用了来自GitHub (https://github.com/carlosang2/ZKLibrary)的carlosang2库来与设备交互。到目前为止,一切都很好,除了SetUser功能。我可以通过我的应用程序为设备设置id、名称、密码、角色的新用户,但不能设置卡的RFID
发布于 2019-09-12 20:00:24
添加附加行以使用您的卡号,
$cardno = hex2bin(Util::reverseHex(dechex("1254107"))); //add this line
$command_string = $byte1.$byte2.chr($role).str_pad($password, 8, chr(0)).str_pad($name, 24, chr(0)).str_pad($cardno, 4, chr(0)).str_pad(chr(1), 9, chr(0)).str_pad($userid, 8, chr(0)).str_repeat(chr(0),16);注:我正在使用这个https://github.com/vodvud/php_zklib库。但我必须在set()函数中添加额外的行。它位于zklib->scr->User.php中
https://stackoverflow.com/questions/55023178
复制相似问题