Adding users to ZKTeco access door using Push SDK

3.1k Views Asked by At

I'm trying to add users to the Door Access Control Device: "inBio 260"

I'm told I need to use the Push/Pull SDK to do that.

public bool AddUser(User u) {
    return axCZKEM1.SSR_SetDeviceData(machineNumber, "user", u + "\r\n", "");
}

class User {
    ...
    public override string ToString()
    {
        return
            "CardNo=" + ID + "\t" +
            "Pin=" + Pin + "\t" +
            "Name=" + Name + "\t" +
            "Password=" + Password + "\t" +
            "StartTime=" + StartTime + "\t" +
            "EndTime=" + EndTime;
    }
}

public bool AddFingerprint(Fingerprint p)
{
    return
        IsPinValid(p.Pin) &&
        p.Template != null &&
        p.Template.Length > 100 &&
        axCZKEM1.SSR_SetDeviceData(machineNumber, "templatev10", p + "\r\n", "");
    }
}

class Fingerprint {
    ...
    public override string ToString()
    {
        int size = Convert.FromBase64String(Template).Length;
        return
            "Size=" + size +
            "\tPin=" + Pin +
            "\tFingerID=" + FingerID +
            "\tValid=1\tTemplate=" + Template +
            "\tEndTag=" + EndTag;
    }
}

I use "ZKAccess 3.5" to check and I find the users I added and everything seems fine. But suddenly the machine will report 0 valid fingerprints. And the doors won't open. Calling AddFingerprint to restore the lost fingerprint returns a false "true", i.e. nothing was added and the machine still has 0 fingerprints left.

Note: ZKAccess is limited to 2000 users, I added 2600+ users.

Update: ZKAccess has 2654 users in its database, clicking sync to device only restores the 900 users that where added using ZKAccess itself (foul play suspected).

Update: I confused push & pull sdk, they are not the same. PullSDK is free, push SDK is private to ZKTeco

1

There are 1 best solutions below

0
On BEST ANSWER

ZKAccess3.5 deleted all data because the limit of the free version was exceeded.

EDIT: Just for anyone looking for an answer, Push sdk is a private sdk used only by ZKteco. Pull sdk how ever is free but has no documentation. I wrote a wrapper in C#: code