bulentv / js_zklib

Attendance Machine Library for NodeJS with a connection to the network using the UDP protocol and port 4370
GNU General Public License v2.0
56 stars 46 forks source link

setUser Error: Invalid request #75

Closed ChiKaLiO closed 3 years ago

ChiKaLiO commented 3 years ago

I was just running the test script 😢

Error: Invalid request�‼�l�⌂♦
    at Socket.handleOnData (....\zkteco\zklib\node_modules\zklib\zklib\zklib.js:95:45)
    at Object.onceWrapper (events.js:421:26)
    at Socket.emit (events.js:326:22)
    at UDP.onMessage [as onmessage] (dgram.js:921:8)
Rafiul585 commented 3 years ago
ZK.setUser(132, '', '8580', '132', (e) =>{
    ZK.disconnect();
    if (e) {
        console.log(e);
    } 
    else {
        console.log('Sucessfull!');  
    }
})

I'm trying to set users on ZKteco device using this library, but it gives an error. Will you help me out from this troubleshoot? Is there anything wrong in my code?