Skip to content

Instantly share code, notes, and snippets.

@jploh
Created February 15, 2016 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jploh/0a946b5e0604cef4bbe8 to your computer and use it in GitHub Desktop.
Save jploh/0a946b5e0604cef4bbe8 to your computer and use it in GitHub Desktop.
Test RFID Client
var net = require('net');
var b = new Buffer(6);
var client = new net.Socket();
client.on('data', function(data) {
console.log(new Buffer(data, 'binary').toString('hex') + "\n");
});
client.connect(6000, '192.168.1.190', function() {
b[0] = 0x04;
b[1] = 0xff;
b[2] = 0x21;
b[3] = 0x19;
b[5] = 0x95;
client.write(b);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment