Demonstration of possible usage of the the NFCController class.
NFC SmartPoster example
Demonstration of possible usage of the the NFCController class.
The application creates a smart poster record and sends it when a connected peer requests it. The smart poster record generated contains:
- A URI: https://www.mbed.com
- A title: "mbed website"
- An action: EXECUTE which asks the peer to open the URI.
Running the application
Verification of the sample application can be seen on any a smartphone with an NFC reader. After running you will be able to read the tag with an NFC tag reader application.
Information about activity is also printed over the serial connection - please have a client open. You may use:
Tera Term - https://ttssh2.osdn.jp/index.html.en
This example is known to work on boards connected to a PN512 shield.
README.md@5:48c9ea2e0991, 2019-02-27 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Feb 27 13:03:20 2019 +0000
- Revision:
- 5:48c9ea2e0991
- Parent:
- 1:6c82b777db0b
- Child:
- 6:52cd72e84703
Updating mbed-os to mbed-os-5.11.5
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nfc
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:9a16c3f036b0 | 1 | # NFC SmartPoster example |
mbed_official | 0:9a16c3f036b0 | 2 | |
mbed_official | 0:9a16c3f036b0 | 3 | Demonstration of possible usage of the the `NFCController` class. |
mbed_official | 0:9a16c3f036b0 | 4 | |
mbed_official | 0:9a16c3f036b0 | 5 | The application creates a smart poster record and sends it when a connected peer requests it. |
mbed_official | 0:9a16c3f036b0 | 6 | The smart poster record generated contains: |
mbed_official | 0:9a16c3f036b0 | 7 | - A URI: https://www.mbed.com |
mbed_official | 0:9a16c3f036b0 | 8 | - A title: "mbed website" |
mbed_official | 0:9a16c3f036b0 | 9 | - An action: `EXECUTE` which asks the peer to open the URI. |
mbed_official | 0:9a16c3f036b0 | 10 | |
mbed_official | 0:9a16c3f036b0 | 11 | # Running the application |
mbed_official | 0:9a16c3f036b0 | 12 | |
mbed_official | 0:9a16c3f036b0 | 13 | ## Requirements |
mbed_official | 0:9a16c3f036b0 | 14 | |
mbed_official | 0:9a16c3f036b0 | 15 | Verification of the sample application can be seen on any a smartphone with an NFC reader. After running you will be able to read the tag with an NFC tag reader application. |
mbed_official | 0:9a16c3f036b0 | 16 | |
mbed_official | 0:9a16c3f036b0 | 17 | This example is known to work on boards connected to a PN512 shield. |
mbed_official | 0:9a16c3f036b0 | 18 | |
mbed_official | 0:9a16c3f036b0 | 19 | ## Building instructions |
mbed_official | 0:9a16c3f036b0 | 20 | |
mbed_official | 0:9a16c3f036b0 | 21 | Clone the repository containing the collection of examples: |
mbed_official | 0:9a16c3f036b0 | 22 | |
mbed_official | 0:9a16c3f036b0 | 23 | ``` |
mbed_official | 0:9a16c3f036b0 | 24 | git clone https://github.com/ARMmbed/mbed-os-example-nfc.git |
mbed_official | 0:9a16c3f036b0 | 25 | ``` |
mbed_official | 0:9a16c3f036b0 | 26 | |
mbed_official | 0:9a16c3f036b0 | 27 | Using a command-line tool, navigate to the exmaple: |
mbed_official | 0:9a16c3f036b0 | 28 | |
mbed_official | 0:9a16c3f036b0 | 29 | ``` |
mbed_official | 0:9a16c3f036b0 | 30 | cd mbed-os-example-nfc |
mbed_official | 0:9a16c3f036b0 | 31 | cd NFC_SmartPoster |
mbed_official | 0:9a16c3f036b0 | 32 | ``` |
mbed_official | 0:9a16c3f036b0 | 33 | |
mbed_official | 0:9a16c3f036b0 | 34 | Update the source tree: |
mbed_official | 0:9a16c3f036b0 | 35 | |
mbed_official | 0:9a16c3f036b0 | 36 | ``` |
mbed_official | 0:9a16c3f036b0 | 37 | mbed deploy |
mbed_official | 0:9a16c3f036b0 | 38 | ``` |
mbed_official | 0:9a16c3f036b0 | 39 | |
mbed_official | 0:9a16c3f036b0 | 40 | Run the build: |
mbed_official | 0:9a16c3f036b0 | 41 | |
mbed_official | 0:9a16c3f036b0 | 42 | ``` |
mbed_official | 0:9a16c3f036b0 | 43 | mbed compile -t <ARM | GCC_ARM> -m <YOUR_TARGET> |
mbed_official | 0:9a16c3f036b0 | 44 | ``` |
mbed_official | 0:9a16c3f036b0 | 45 |