1

I have 3 zktecho devices k40 series, i have register user on one at particular device and enroll the finger of such user then i acquire such fingers against this specific user and save it in mysql database as binary format(longblob) with finger index number, now i want this user and finger template to set on other zktecho k40 device, in this given library code, this is not setting finger template and there no exception through, Pls anyone assist me i'm using such Library (https://github.com/raihanafroz/zkteco) or tells me, in this library, is this creating a correct command_string for setting finger template.

    $db = UserFingerTemplate::where('uid',$uid)->get();
    $finger = array();
    foreach($db as $dt){
        $i = $dt->index;
        $finger[$i] = $dt->template; 
        $data['uid'] = $dt->uid;
        
    }
    $data['finger'] = $zk->setFingerprint($uid,$finger);
    $data['indb'] = $db;
    $zk->disconnect();
    dd($data);

library finger setting code

static public function set(ZKTeco $self, $uid, array $data)
{
    $self->_section = __METHOD__;


    $count = 0;
    foreach ($data as $finger => $item) {

        //dd($item);
        $allowSet = true;
        $fingerPrint = new Fingerprint();
        $chkFinger =  $fingerPrint->_checkFinger($self, $uid, $finger);
        if ($chkFinger === true) {
            $allowSet = $fingerPrint->_removeFinger($self, $uid, $finger);
        }
        dd($fingerPrint->_setFinger($self, $item));
        if ($allowSet === true && $fingerPrint->_setFinger($self, $item) === true) {
            $count++;
        }
    }

    return $count;
}

/**
 * @param ZKTeco $self
 * @param string $data Binary fingerprint data item
 * @return bool|mixed
 */
private function _setFinger(ZKTeco $self, $data)
{
    $command = Util::CMD_USER_TEMP_WRQ;
    $command_string = $data;

    return $self->_command($command, $command_string);
}
Mujahid
  • 35
  • 9
  • "not working" isn't a useful description of your problem. You'll need to be more specific. Read the How To Ask guide in the Help area if you need more guidance on making your question clear and useful for others. Thanks. – ADyson Jan 31 '21 at 18:37
  • @ADyson pls assist now – Mujahid Jan 31 '21 at 19:13
  • I'd like to but `then i want to re-upload on same and same serial other device for user synchronization` really doesn't make a lot of sense still. Can you explain that a bit better? It's hard to understand what you're trying to achieve. – ADyson Jan 31 '21 at 19:41
  • @ADyson now i have updated my whole scenario in description. now can you assist me.?? – Mujahid Jan 31 '21 at 20:23
  • Hi,did you find any solution? How I connect zkt f18 with laravel project? – Assad Yaqoob Mar 01 '21 at 18:10

0 Answers0