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:
Fri Nov 29 13:01:40 2019 +0000
Revision:
6:52cd72e84703
Parent:
1:6c82b777db0b
Merge pull request #50 from jamesbeyond/update

Update readme with PN512 shield info
.
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 This example is known to work on boards connected to a PN512 shield.
mbed_official 0:9a16c3f036b0 18
mbed_official 6:52cd72e84703 19 **Wirring diagram for NFC Explorer with PN512**
mbed_official 6:52cd72e84703 20
mbed_official 6:52cd72e84703 21 If using the Raspbery Pi explorer (PN512) board, use this pinout mapping diagram to connect the shield to the reference target. In this case a ST NucleoF401RE pinout is shown.
mbed_official 6:52cd72e84703 22
mbed_official 6:52cd72e84703 23 Nucleo F401RE Explore NFC
mbed_official 6:52cd72e84703 24 (Arduino header) (pin1 on shield shown with a <|)
mbed_official 6:52cd72e84703 25 +-------+ +-------+ +--------+
mbed_official 6:52cd72e84703 26 | [NC] | | [B8] | |[ 2][ 1]|
mbed_official 6:52cd72e84703 27 | [IOREF| | [B9] | |[ 4][ 3]|
mbed_official 6:52cd72e84703 28 | [RST] | | [AVDD]| |[ 6][ 5]|
mbed_official 6:52cd72e84703 29 1<---+ [3V3] | | [GND] | |[ 8][ 7]|
mbed_official 6:52cd72e84703 30 | [5V] | | [A5] +--->23 |[10][ 9]|
mbed_official 6:52cd72e84703 31 | [GND] | | [A6] +--->21 |[12][11]|
mbed_official 6:52cd72e84703 32 25<--+ [GND] | | [A7] +--->19 |[14][13]|
mbed_official 6:52cd72e84703 33 | [VIN] | | [B6] +--->3 |[16][15]|
mbed_official 6:52cd72e84703 34 | | | [C7] | |[18][17]|
mbed_official 6:52cd72e84703 35 26<--+ [A0] | | [A9] | |[20][19]|
mbed_official 6:52cd72e84703 36 16<--+ [A1] | | [A9] | |[22][21]|
mbed_official 6:52cd72e84703 37 | ... | | | |[24][23]|
mbed_official 6:52cd72e84703 38 | | | [A8] | |[26][25]|
mbed_official 6:52cd72e84703 39 +-------+ | ... | +--------+
mbed_official 6:52cd72e84703 40 | |
mbed_official 6:52cd72e84703 41 | |
mbed_official 6:52cd72e84703 42 +-------+
mbed_official 6:52cd72e84703 43
mbed_official 6:52cd72e84703 44 Patch using jumper wires to the
mbed_official 6:52cd72e84703 45 indicated pins on the Shield.
mbed_official 6:52cd72e84703 46
mbed_official 6:52cd72e84703 47
mbed_official 6:52cd72e84703 48 Schematic (https://www.element14.com/community/docs/DOC-76384/l/explore-nfc-board-schematic)
mbed_official 6:52cd72e84703 49
mbed_official 6:52cd72e84703 50
mbed_official 0:9a16c3f036b0 51 ## Building instructions
mbed_official 0:9a16c3f036b0 52
mbed_official 0:9a16c3f036b0 53 Clone the repository containing the collection of examples:
mbed_official 0:9a16c3f036b0 54
mbed_official 0:9a16c3f036b0 55 ```
mbed_official 0:9a16c3f036b0 56 git clone https://github.com/ARMmbed/mbed-os-example-nfc.git
mbed_official 0:9a16c3f036b0 57 ```
mbed_official 0:9a16c3f036b0 58
mbed_official 0:9a16c3f036b0 59 Using a command-line tool, navigate to the exmaple:
mbed_official 0:9a16c3f036b0 60
mbed_official 0:9a16c3f036b0 61 ```
mbed_official 0:9a16c3f036b0 62 cd mbed-os-example-nfc
mbed_official 0:9a16c3f036b0 63 cd NFC_SmartPoster
mbed_official 0:9a16c3f036b0 64 ```
mbed_official 0:9a16c3f036b0 65
mbed_official 0:9a16c3f036b0 66 Update the source tree:
mbed_official 0:9a16c3f036b0 67
mbed_official 0:9a16c3f036b0 68 ```
mbed_official 0:9a16c3f036b0 69 mbed deploy
mbed_official 0:9a16c3f036b0 70 ```
mbed_official 0:9a16c3f036b0 71
mbed_official 0:9a16c3f036b0 72 Run the build:
mbed_official 0:9a16c3f036b0 73
mbed_official 0:9a16c3f036b0 74 ```
mbed_official 0:9a16c3f036b0 75 mbed compile -t <ARM | GCC_ARM> -m <YOUR_TARGET>
mbed_official 0:9a16c3f036b0 76 ```
mbed_official 0:9a16c3f036b0 77