App3 Conclusion
Get the project source code below, and follow along with the lesson material.
Download Project Source CodeTo set up the project on your local machine, please follow the directions provided in the README.md
file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.
This lesson preview is part of the The newline Guide to NFCs with React Native course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.
Get unlimited access to The newline Guide to NFCs with React Native, plus 70+ \newline books, guides and courses with the \newline Pro subscription.
[00:00 - 00:24] Congratulations! We have finished the last app in this course. Let's do a quick recap of what we learned during this journey. In this module, we go beyond and death. We first discuss the differences between and death, NFC tech platform and the tech-specific proprietary operations.
[00:25 - 00:42] During the process of developing our NFC Pokemon app, we focused on the NFC Type 2 tech platform. The Type 2 NFC tags describe their internal memory in blocks or pages. Each block or page have 4 bytes.
[00:43 - 01:10] The first 4 blocks for any given NFC tech contain several important data such as unique identifier or UID, CC block to describe the and death capability and the tech memory size. Type 2 NFC tags also provide some general purpose commands such as read and write operations.
[01:11 - 01:44] The read operation starts with 30 in hex, followed by the starting block index, and the tech will send 4 blocks or 16 bytes of data at the response. The write operation starts with a2 in hex, followed by the block index you want to write, followed by 4 bytes of data. The tech will response a in hex when the operation success.
[01:45 - 02:02] After the introduction of the NFC Type 2 tech platform, we shift our focus to a symmetric cryptography. We'd like to create digital signature for our NFC Pokemon tags so that people won't be able to write fake ones.
[02:03 - 02:28] In order to adopt the cryptography library from the node.js environment to our native world, we learn that we can use a tool called our Unnotify to polyfill the missing APIs. We also learn how to use elliptic npm package to create and verify the signatures.
[02:29 - 02:51] After the signature, we learn the difference memory protection mechanisms when dealing with NFC tags. Both n-death level and Type 2 platform level protection won't fit our use cases , so we introduce the tech-proputtery password protection commands.
[02:52 - 03:10] In our scenario, the users are free to read the NFC tags but must provide the correct password if they want to update the tags. Before using the password protection feature, we must first configure it.
[03:11 - 03:33] The configuration process is actually a sequence of standard Type 2 write operations to write the desired parameters to the correct block, according to the spec provided by the NFC tag manufacturers. This is a standard pattern for most of the proprietary NFC features.
[03:34 - 03:59] After the configuration, we can now use the proprietary PWD auth command to grant the following write operations. The PWD auth command starts with command code 1B followed by 4 bytes password and will respond to bytes pack when the password is correct.
[04:00 - 04:18] This command is useful and widely supported by NXP and Tech Prote Alliance, which is one of the most popular NFC tags in the market. Well, that's indeed lots of knowledge. Hope you enjoy them as I do.
[04:19 - 04:22] I'm looking forward to see your next NFC project.