vodvud / php_zklib

GNU General Public License v2.0
23 stars 19 forks source link

RFID read #7

Closed tehceen closed 4 years ago

tehceen commented 5 years ago

Sir i want to read RFID and also write it to the device.

tehceen commented 5 years ago

If I Can i get the RFID value when card is punched on the device which is either registered or not registered on the device?that will be very helpful because i want to store all my data on mydatabase not on device.Because the memory of device is limited and i want to store all data on my server. thanks

vodvud commented 5 years ago

I think it's impossible. The device stores the data in itself, then you can get this data.

tehceen commented 5 years ago

sir i have about 25 zkteco device connected through LAN. i want to register users on one device and then will make the user able to punch his RFID on any other of 24 devices.IOne solution is that to get the data from one device and write it on all other 24 devices but i will need to register more users so i will face memory problem. Do you have any suggestion for this? Thanks

vodvud commented 5 years ago

Yes I understood. You can store users and devices data on DB, then you can push users to your devices in loop.

Example:

// $users - users array from db
// $devices - devices array from db

if (is_array($users) && is_array($devices)) {
    foreach ($devices as $device) {
        $zk = new ZKLib($device->ip, $device->port);
        if ($zk->connect()) {
            $zk->disableDevice();
            foreach ($users as $user) {
                $zk->setUser($user->uid, $user->userid, $user->name, $user->password, $user->role);
            }
            $zk->enableDevice();
            $zk->disconnect();
        }
        unset($zk);
    }
}

But fingerprint should register manually, then copy to another machines. Sorry, fingerprint class still incomplete.

tehceen commented 5 years ago

And sir what can i do for memory issue on the device?

On Fri, 8 Mar 2019, 12:47 pm Yaroslav Vodvud, notifications@github.com wrote:

Yes I understood. You can store users and devices data on DB, then you can push users to your devices in loop.

Example:

// $users - users array from db// $devices - devices array from dbif (is_array($users) && is_array($devices)) { foreach ($devices as $device) { $zk = new ZKLib($device->ip, $device->port); if ($zk->connect()) { $zk->disableDevice(); foreach ($users as $user) { $zk->setUser($user->uid, $user->userid, $user->name, $user->password, $user->role); } $zk->enableDevice(); $zk->disconnect(); } unset($zk); }}

But fingerprint should register manually, then copy to another machines. Sorry, fingerprint class still incomplete.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vodvud/php_zklib/issues/7#issuecomment-470837355, or mute the thread https://github.com/notifications/unsubscribe-auth/ApnPYPGfYQHtL80K6j69tuNMg-t2ZWnkks5vUhWTgaJpZM4bjBS8 .

vodvud commented 5 years ago

What do you mean about memory issue?

For example device version U260-C has limits like that Max users - 10000 Max fingerprints - 5000

Do you have more on one device?

tehceen commented 5 years ago

I need a RFID supportable device with 1 lakh users.

On Fri, 8 Mar 2019, 12:56 pm Yaroslav Vodvud, notifications@github.com wrote:

What do you mean about memory issue?

For example device version U260-C has limits like that Max users - 10000 Max fingerprints - 5000

Do you have more on one device?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vodvud/php_zklib/issues/7#issuecomment-470839330, or mute the thread https://github.com/notifications/unsubscribe-auth/ApnPYOdW9PBTnRHqgcCD2KFo0KdVXty7ks5vUhfBgaJpZM4bjBS8 .

vodvud commented 5 years ago

I see two ways: 1) You should looking for devices which can support it is. 2) Don't push users more then maximum limit on one device. For example first department 1000 users on first device, second department 2000 users on second device. Then use devices separate for each departments.

tehceen commented 5 years ago

thank you sir but i am making park automation system where same users will registered on all the devices because a person can go any entertainment spot in the park such as riding,racing and carnival zone etc.I am using RFID as a debit card for this system. Therefore in my 2nd question i asked for getting RFID value directly on my web application without storing on the device. thanks

vodvud commented 5 years ago

Each devices I know doesn't support getting card number directly from server. Maybe you should looking another devices for your project.

tehceen commented 5 years ago

Ok sir thank you so much for your precious time.