nfc-pcsc | Easy reading and writing NFC tags and cards in Node.js | Runtime Evironment library
kandi X-RAY | nfc-pcsc Summary
kandi X-RAY | nfc-pcsc Summary
Easy reading and writing NFC tags and cards in Node.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Decrypt RSA key
- Encrypt data .
- coloured console log
nfc-pcsc Key Features
nfc-pcsc Examples and Code Snippets
Community Discussions
Trending Discussions on nfc-pcsc
QUESTION
I have downloaded this library (https://github.com/pokusew/nfc-pcsc) and now i'm trying to run an Electron project in it, but is giving me everytime problems when i try to run it as an Electron project. So my question is: How can I implement this library on my Electron project and make it work not as node.js
I tried to npm install --save electron@latest
in the library and change on the json the script "example": "node -r @babel/register examples/read-write.js"
to "example": "electron -r @babel/register examples/read-write.js"
also i have tried to uninstall and install, i have done electron-rebuild
ANSWER
Answered 2019-Nov-29 at 06:04Electron as of v5.0.0 is using Node.js v12.0.0. This native module (nfc-pcsc) is not building correctly for that version.
Downgrade Electron to v4, rebuild via "electron-rebuild" and it should build properly.
QUESTION
I'm trying to execute an Electron app on my raspberry but i got an error.
i have tried to change the version of electron to the 3.0.13 (i had search on internet and said that this was the solution, but didnt work)
...ANSWER
Answered 2019-Jul-06 at 10:46You will need a version of the Electron application built for your GNU/Linux distribution. But if you cannot get that, something built for an older version of another distribution (such as Debian jessie or Red Hat Enterprise Linux 7) might help. Unfortunately, you do not say which distribution and version you are using, so it is difficult to make proper recommendations.
Another alternative is building Electron yourself from source, on your system, but given the size of Electron's dependencies, that can be quite an effort.
QUESTION
I'm trying to run a electron Project with 10.16.0 node js version but an error ocurred. I'm using this library https://github.com/pokusew/nfc-pcsc
I have tried to take another Electron version that works correctly with 10.16.0 node.js but did not work.
...ANSWER
Answered 2019-Jun-17 at 11:33You need to include the electron-rebuild package which rebuilds native Node.js modules against the version of Node.js that your Electron project is using. This allows you to use native Node.js modules in Electron apps without your system version of Node.js matching exactly.
You can install this package using the below command,
QUESTION
I use nfc-pcsc to read a MIFARE Classic 1K card with the ACR122U reader (USB connection). But I often get a 0x6800 error:
- Sometimes when I read 1st sector (blocks 4-5-6)
- Always when I read 2nd sector and more (blocks 8-9-10, 12-13-14, etc.)
But a native software like NFC-GUI can read/write all data with no difficulties.
The keys A/B are default keys (000000.... and FFFFFF....). The access bits have default values of an empty card.
Why this error? How can I read the card without error?
Note that I can read a MIFARE Ultralight card without difficulties.
NodeJS code (same as example of NFC-PCSC):
...ANSWER
Answered 2019-Apr-23 at 11:30It seems that you first authenticate to all sectors and then try to read some data from these sectors. However, this is not how MIFARE Classic authentication works. Instead, will need to authenticate to a sector (e.g. use reader.authenticate(4, keyTypeB, key_b)
to authenticate with key B for the whole sector 1). You can then read data from any block of that sector (where key B is granted read access). After you finished reading from that sector, you can authenticate to the next sector (e.g. reader.authenticate(8, keyTypeB, key_b)
to authenticate with key B for the whole sector 2). You can then read data from any block of that sector (where key B is granted read access).
Also note that the default configuration for "empty" MIFARE Classic cards is Key A = FFFFFFFFFFFF, Key B = not used, read/write with Key A only. Since, the areas containing the keys are not readable (unless a key is not used), reading "000000000000" from those memory regions usually just means that no data could be read, the actual key could still be some other value. Thus, if you are sure that the cards a empty and have default permissions set, I would suggest to try to authenticate using "FFFFFFFFFFFF" as key A:
QUESTION
I am pretty new to node.js. I am working on an app able to display NFC content on a webpage. I am using nfc-pcsp package (https://github.com/pokusew/nfc-pcsc), I can easily read data on server side. Now I just would like to display the data in the webpage, but I am stuck on the logic. Here is a part of my server code:
...ANSWER
Answered 2018-Feb-03 at 00:03I suggest you to use the express API command with npm CLI : npm install --save express at your root project folder in your terminal Then, you will be able to create a route in Get, Post, Put or Delete. Next, In your client side you will be able to call this route by a get, post or whatever with a promise, ajax request whatever you want :) Just understand that in order to receive or send data to your server, you need an url and with Express, you can create your own url.
https://www.npmjs.com/package/express
Don't hesitate to have a look on this API, and i'm pretty sure you will find the answer to your question on your own :)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nfc-pcsc
Node Native Modules build tools Because this library (via pokusew/node-pcsclite under the hood) uses Node Native Modules (C++ Addons), which are automatically built (using node-gyp) when installing via npm or yarn, you need to have installed C/C++ compiler toolchain and some other tools depending on your OS. Please refer to the node-gyp > Installation for the list of required tools depending on your OS and steps how to install them.
PC/SC API in your OS On macOS and Windows you don't have to install anything, pcsclite API is provided by the OS. On Linux/UNIX you'd probably need to install pcsclite library and daemon**. For example, in Debian/Ubuntu: apt-get install libpcsclite1 libpcsclite-dev To run any code you will also need to have installed the pcsc daemon: apt-get install pcscd
Once you have all needed libraries, you can install nfc-pcsc using npm: npm install nfc-pcsc --save or using Yarn: yarn add nfc-pcsc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page