Skip to content

c3-200 not working here #54

Description

@iojancode

Hi, im having troubles connecting, any help would be appreciated

this is the test

var ZKLib = require("zklib");

ZK = new ZKLib({
  ip: '192.168.86.21',
  port: 4370,
  inport: 5200,
  timeout: 5000,
  connectionType: 'tcp',
});
    
    // connect to access control device
    ZK.connect( function() {
    
      // read the time info from th device
      ZK.getTime( function(err, t) {
        console.log("Device clock's time is " + t.toString());
        
        // disconnect from the device
        ZK.disconnect();
      });
    });

this is the failure

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: write after end
    at writeAfterEnd (_stream_writable.js:195:12)
    at Socket.Writable.write (_stream_writable.js:242:5)
    at Socket.write (net.js:669:40)
    at ZKLib.writeTcpSocket (/Users/johann/node_modules/zklib/zklib/zklib.js:235:12)
    at ZKLib.send (/Users/johann/node_modules/zklib/zklib/zklib.js:181:12)
    at ZKLib.executeCmd (/Users/johann/node_modules/zklib/zklib/zklib.js:101:10)
    at ZKLib.getTime (/Users/johann/node_modules/zklib/zklib/zktime.js:13:10)
    at /Users/johann/Temp/zkteco/js_zklib/mytest.js:15:10
    at createSocket.err (/Users/johann/node_modules/zklib/zklib/zkconnect.js:13:9)
    at Socket.socket.once.err (/Users/johann/node_modules/zklib/zklib/zklib.js:151:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions