-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write to password protected NFC #659
Comments
I'm not familiar with how the NFC Tools app works. It would help us understand how/if we can make Web NFC works better if we knew how write-protected nfc tags with this app. |
The NFC tools app has these 2 menu items:
The Set password, when pressed, asks for a password. Then it makes the NFC tag read-only (writes will fail). It is similar to locking the NFC tag with Therefore, I'd suggest the following API (name should be changed but you get the idea): NDEFReader.makeReadOnlyWithUnlockPassword('the-unlock-password') // => Promise
NDEFReader.unlockWithPassword('the-unlock-password') // => Promise |
From my additional research, it seems that this Password feature is not NFC Forum standard, but is an additional feature by some NFC manufacturers. For example, here’s the C code for setting up password in NTAG213/215/216 tags, and the related data sheet. |
The password feature is not a NFC Forum standard but a NTAG21x feature. You can check the datasheet to see how it's works in detail. In NFC Tools, we use the first bytes of the MD5 hash of your password. Because NTAG chips requires a 4 bytes password. For non-tech-savvy users, we decided to ask for a simple text password instead of four Hex values (or more depending of the chips type). |
The password feature is not a NFC Forum standard but a chip related feature. You can check the datasheet to see how it's works in detail. In NFC Tools, we use the first bytes of the MD5 hash of your password. Because, as an example, NTAG chips requires a 4 bytes password. For non-tech-savvy users, we decided to ask for a simple text password instead of four Hex values (or more depending of the chips type). |
Thank you @wakdev! Since it's not a NFC Forum Standard, I believe we won't be implementing this in Web NFC. |
In the Android NFC Tools app, there is an option to set a password for the NFC to make it write-protected, and next time I try to write to that NFC it gives a write error, so If I want to update it, I have to remove the password by providing it my old password and then write the data to it and then again protect it with the password.
but now when I try to write it with web nfc api, It gives me the write error, is there a way I can write to a write-protected nfc through web nfc api by providing it the password that I set from NFC tools app?
I wanted to write to the nfc by providing it my old password --> set new data in the nfc --> and again write-protect it with the password. (is it possible with web NFC api ?)
The text was updated successfully, but these errors were encountered: