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.

Committer:
mbed_official
Date:
Mon Sep 24 17:09:42 2018 +0100
Revision:
0:9a16c3f036b0
Child:
1:6c82b777db0b
Add mbed deploy into the SmartPoster instructions.
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nfc

Who changed what in which revision?

UserRevisionLine numberNew 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 Information about activity is also printed over the serial connection - please have a client open. You may use:
mbed_official 0:9a16c3f036b0 18
mbed_official 0:9a16c3f036b0 19 - [Tera Term](https://ttssh2.osdn.jp/index.html.en)
mbed_official 0:9a16c3f036b0 20
mbed_official 0:9a16c3f036b0 21 This example is known to work on boards connected to a PN512 shield.
mbed_official 0:9a16c3f036b0 22
mbed_official 0:9a16c3f036b0 23 ## Building instructions
mbed_official 0:9a16c3f036b0 24
mbed_official 0:9a16c3f036b0 25 Clone the repository containing the collection of examples:
mbed_official 0:9a16c3f036b0 26
mbed_official 0:9a16c3f036b0 27 ```
mbed_official 0:9a16c3f036b0 28 git clone https://github.com/ARMmbed/mbed-os-example-nfc.git
mbed_official 0:9a16c3f036b0 29 ```
mbed_official 0:9a16c3f036b0 30
mbed_official 0:9a16c3f036b0 31 Using a command-line tool, navigate to the exmaple:
mbed_official 0:9a16c3f036b0 32
mbed_official 0:9a16c3f036b0 33 ```
mbed_official 0:9a16c3f036b0 34 cd mbed-os-example-nfc
mbed_official 0:9a16c3f036b0 35 cd NFC_SmartPoster
mbed_official 0:9a16c3f036b0 36 ```
mbed_official 0:9a16c3f036b0 37
mbed_official 0:9a16c3f036b0 38 Update the source tree:
mbed_official 0:9a16c3f036b0 39
mbed_official 0:9a16c3f036b0 40 ```
mbed_official 0:9a16c3f036b0 41 mbed deploy
mbed_official 0:9a16c3f036b0 42 ```
mbed_official 0:9a16c3f036b0 43
mbed_official 0:9a16c3f036b0 44 Run the build:
mbed_official 0:9a16c3f036b0 45
mbed_official 0:9a16c3f036b0 46 ```
mbed_official 0:9a16c3f036b0 47 mbed compile -t <ARM | GCC_ARM> -m <YOUR_TARGET>
mbed_official 0:9a16c3f036b0 48 ```
mbed_official 0:9a16c3f036b0 49