Writing to a Mifare tag with Android NFC?

那年仲夏 提交于 2019-12-03 16:48:18

You are trying to write to block 0, which is not possible. Block 0 is always read-only, even of the access conditions say that it is writeable. Block 0 contais the UID and some other manufacturer data. Try writing to block 1 or 2 instead and see whether you still have the same problem.

I've seen that particular exception when trying to read from a Tag that isn't connected to the reader any more.

I know that for some card/reader combinations it is difficult to maintain a decent connection.

For example my Nexus S has trouble maintaining a connection with some tags. The Nexus S doesn't have the strongest field. I think the Galaxy Note is similar in that respect.

Try some other brands of tags as well as other readers.

Also, I'd try running your read through a for loop to see if it maintains a connection, if that makes sense.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!