Created
February 15, 2016 10:35
-
-
Save jploh/0a946b5e0604cef4bbe8 to your computer and use it in GitHub Desktop.
Test RFID Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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