roopehakulinen / cordova-plugin-mifare-ultralight Goto Github PK
View Code? Open in Web Editor NEWCordova plugin for interacting with Mifare Ultralight NFC tags.
License: MIT License
Cordova plugin for interacting with Mifare Ultralight NFC tags.
License: MIT License
It would be useful to get the tag GUID on the mifare.connect() callback.
Found that getId() could be used on the discovered the java Tag object. (see https://developer.android.com/reference/android/nfc/Tag.html)
Hi, when I use window.mifare.read(4, (response) => alert(response.data), err => alert(Reading failed because ${err}
));
Is show me this error
Error: java.lang.exeption
Hi !
As long as, in Java, a int has a limited size, the function "intToByteArray" can't handle pin code higher than 2147483647.
I'm a newbie in Java, but is there a way to easily fix it ?
Thank you !
Hello,
You implemented unlockWithPin
, and I was wondering if you were opened to a lockWithPin
method.
Some good links for it:
https://stackoverflow.com/questions/44395283/how-to-set-and-unset-password-on-a-mifare-ultralight-ev1-tag
https://stackoverflow.com/questions/22719465/ntag212-mifare-ultralight-with-authentication
Unlock
send: Ox1B 0xPIN1 0xPIN2 0xPIN3 0xPIN4
receive: 0xPACK1 0xPACK2
compare PACK1 and PACK2 with values given in lock (or don't compare)
Lock
PAGE:
NTAG212 = page 39
MF0UL11 = page 12
MF0UL21 = page 27
send: 0xA2 0xPAGE 0xPIN1 0xPIN2 0xPIN3 0xPIN4
PAGE:
NTAG212 = page 40
MF0UL11 = page 13
MF0UL21 = page 28
send: 0xA2 0xPAGE 0xPACK1 0xPACK2 0x00 0x00
Protection can be set to 0 (PIN needed for write operations) or 1 (PIN needed for read or write operations)
PAGE:
NTAG212 = page 38, byte 0, bit 7
MF0UL11 = page 11, byte 0, bit 7
MF0UL21 = page 26, byte 0, bit 7
send: 0x30 0xPAGE
(get the complete page to only modify wanted bits)
recieve: 0xRES1 0xRES2 0xRES3 0xRES4
ACCESS = 0xRES1 & 0x07F
# PIN needed for write
ACCESS = ACCESS | 0x80
# PIN needed for read
send: 0xA2 0xPAGE 0xACCESS 0xRES2 0xRES3 0xRES4
PAGE:
NTAG212 = page 37, byte 3
MF0UL11 = page 10, byte 3
MF0UL21 = page 25, byte 3
send: 0x30 0xPAGE
(get the complete page to only modify wanted bits)
receive: 0xRES1 0xRES2 0xRES3 0xRES4 ...
send: 0xA2 0xPAGE 0xRES1 0xRES2 0xRES3 0xAUTH0
Hi,
My NFC Card has id : 04416DF27D5780
If I do:
document.addEventListener('mifareTagDiscovered', (tag) => {
console.log(tag.tag);
})
I get: [4, 65, 109, -14, 125, 87, -128]
Which makes: 04416D-E7D57-80
I've added Log.d(TAG, bytesToHex(tag.getId()));
to fireTagEvent
to check what id you start with and I have in adb logcat:
02-19 14:08:51.086 25943 26679 D CordovaPluginMifareUltralight: 04416DF27D5780
This means that either byteArrayToJSON
or MessageFormat.format
has something wrong. Maybe endianness ?
Thanks
Sometimes when quickly removing the mifare tag during writing, the write fails. When this happens 1-3 times in a row, NFC crashes on Android and we need to restart the device. Other apps using NFC are also not working.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.