Simple rfidgeek adaptor to Node.js
This adaptor is primarily made for the Univelop 500 RFID reader/writer made by Texas Instruments.
This reader supports the following tags:
- ISO15693
- ISO14443A
- ISO14443B
- TAGIT
Using
Uses event emitters for passing tag and content, which can be captured by
instantiating an Rfidgeek object thus:
var Rfidgeek = require('rfidgeek');
var rfid = new Rfidgeek();
To initialize reader:
rfid.init();
Then to activate the scan loop:
rfid.start();
And to deactivate:
rfid.stop();
Alternatively, the controller can be passed to an included websocket server, which in turn broadcasts to any websocket client connected at port 8080.
var Rfidgeek = require('rfidgeek');
var rfid = new Rfidgeek({
websocket: true
});
For now uses the tagfound
and rfiddata
events.
The full range of options (including defaults in parantheses) are:
debug: ('none') // show debug information, possible values: 'none', 'error', 'debug'
websocket: (false) // activate websocket server at port 8080
portname: ('/dev/ttyUSB0') // device path to reader
tagtype: ('ISO15693') // type rfid ['ISO15693', 'ISO14443A', 'ISO14443B', 'TAGIT']
scaninterval: (1000) // interval between each scan, tested down to 100ms
readerconfig: ('./univelop_500b.json') // path to json config for rfid commands
length_to_read: (8) // total length to read from ISO15693
bytes_per_read: (1) // chunk length to read from ISO15693
For more options check the rfid.js
file
Note, there is work on the reader in Python:
https://github.com/scriptotek/pyrfidgeek
and in Ruby:
https://github.com/digibib/rfidgeek
License is MIT