Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
nesslab-reader-api
Advanced tools
Node module to rfid reader nesslab.
Módulo desenvolvido para facilitar a comunicação do node.js com o leitor rfid da NESSLAB, que é um dos mais acessíveis no mercado. Foi testado apenas no modelo NL_RF1000.
npm install nesslab-reader-api
require
como no exemplo a seguir
var reader = require('nesslab-reader-api');
//Connecting reader.connect('192.168.0.100',5578);
//On connect reader.on('connect', function(res){ console.log(res); //Starting reading reader.init(); });
//On tag reader.on('tag',function(res){ //Nmber of tag console.log(res.tag); //Antenna console.log(res.antenna); //Antena+tag console.log(res.tagId); });
reader.disableAntenna(1);
reader.setPowerAntenna(1,200);
stateport1, stateport2, stateport3 e stateport4
que veremos mais a frente.
antennapower
que veremos mais a baixo.
connect
reader.on('tag',function(res){
console.log(res.tag);
});
reader.on('tag',function(res){
console.log(res.tagId); //Mostra 4T3000000000000000000000000295
console.log(res.tag); //Mostra 3000000000000000000000000295
console.log(res.antenna); //Mostra 4
});
var reader = require('nesslab-reader-api');
//Connecting reader.connect('192.168.0.100',5578);
//On connect reader.on('connect', function(res){ console.log(res); //Connected });
var reader = require('nesslab-reader-api');
//Connecting reader.connect('192.168.0.100',5578);
//On disconnect reader.on('disconnected', function(res){ console.log(res); //Connection error });
getPower()
é chamado. Veja um exemplo
var reader = require('nesslab-reader-api');
//Connecting
reader.connect('192.168.0.100',5578);
reader.getPower();
reader.on('antennapower', function(power){
console.log(power);
});
getAntennaState
for chamado os eventos referente ao estado de cada antena será chamado, retornando verdadeiro para as ativas e falsos para as inativas, veja a baixo:
var reader = require('nesslab-reader-api');
//Connecting reader.connect('192.168.0.100',5578);
//Getting states reader.getAntennaState();
//Antenna 1 reader.on('stateport1', function(state){ console.log(state); });
//Antenna 2 reader.on('stateport1', function(state){ console.log(state); });
//Antenna 3 reader.on('stateport1', function(state){ console.log(state); });
//Antenna 4 reader.on('stateport1', function(state){ console.log(state); });
FAQs
Node module to rfid reader nesslab
The npm package nesslab-reader-api receives a total of 0 weekly downloads. As such, nesslab-reader-api popularity was classified as not popular.
We found that nesslab-reader-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.