diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-05-24 22:57:13 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-07-04 23:18:45 -0700 |
commit | 6eb99ceb647cf35c39dc97292f00040fbb821170 (patch) | |
tree | 1db97cb18370f6b25902bb06b2e01a74aae169e2 /README.md | |
parent | f9e5259d74c8cf521921a96377c64691b5b3c3ae (diff) |
binding: nfc: new initial binding
Slight rewrite to use libnfc initially for getting tag uid's for
user settings.
Bug-AGL: SPEC-1554
Change-Id: I7b8c30102b82e86a92c89909bcbfba9ab7164c1f
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 90 |
1 files changed, 12 insertions, 78 deletions
@@ -1,84 +1,18 @@ -# nfc-binding -Binding to handle NFC devices and tags. -It currently use the libnfc, but we would like to support neard. -Unfortunatly, neard seem not mature enough right now. +# NFC Service -# Devices and Tags compatibilities +## Overview -Those tags were tested with both SCL3711 (pn533) and ACS122U (pn532). -ACS122U is currently not working using neard and have also some issues with libnfc. -Expect random error, but seem to stay stable and working. +NFC service uses the respective libnfc package to detect the presence of NFC tags and singal via an event -|Tag type |Protocol |libnfc|neard| -|---------------------------|----------------|------|-----| -|Alien H3 + FM1108 |ISO/IEC 14443A |yes |no² | -|FM1108 |ISO/IEC 14443A |yes |no² | -|Hitag2 |ISO/IEC 14443A |yes |no | -|Mifaire Ultralight |ISO/IEC 14443A |yes |yes | -|Mifare 1K S50 |ISO/IEC 14443A |yes |no² | -|Mifare Plus S2K |ISO/IEC 14443A |yes |no² | -|Mifare Desfire D41 |ISO/IEC 14443A |yes |yes | -|NTag 213 |ISO/IEC 14443A |yes |yes | -|Hellfest Cashless |ISO/IEC 14443A |yes |no² | -|French biometric passeport¹|ISO/IEC 14443A |yes |no² | -|French Credit Card |ISO/IEC 14443-4B|yes |no² | -|Alien H3 |N/A |no |no | -|Alien H3 9654 |N/A |no |no | -|Alien H3 9662 |N/A |no |no | -|Alien H3 + TK4100 |N/A |no |no | -|EM4450 |N/A |no |no | -|ICODE SLI |N/A |no |no | -|Picopass 2KS |N/A |no |no | -|SRI512 |N/A |no |no | -|Tag-it HF-I (TI2048) |N/A |no |no | -|TK4100 |N/A |no |no | +## Verbs -¹ UID is randomly generated so the tag is detected as a new one on each poll. +| Name | Description | JSON Parameters | +|--------------------|:-------------------------------------|:-----------------------------------------------------------------------| +| subscribe | subscribe to NFC events | *Request:* {"value": "presence"} | +| unsubscribe | unsubscribe to NFC events | *Request:* {"value": "presence"} | -² Polling is stopped at detection but no tag is exposed. +## Events -# UDev rules - -You may want to add some UDev's rule for nfc device to make things easier. -You can put those lines into /etc/udev/rules.d/99-nfc.rules -```Shell -ACTION!="add", GOTO="nfc_pn53x_end" - -# Advanced Card Systems, Ltd ACR122U -ATTRS{idVendor}=="072f", ATTRS{idProduct}=="2200", MODE="0666", SYMLINK+="nfc%n" - -# SCM Microsystems, Inc. SCL3711-NFC&RW -ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5591", MODE="0666", SYMLINK+="nfc%n" - -LABEL="nfc_pn53x_end" -``` - -# Kernel module -The SCL3711 is supported by the kernel and neard, so it takes the device and prevent the libnfc to use it. -If you have an error saying that the device is busy, it's probably the reason why. - -You have to unload nfc kernel modules to get it work using libnfc. -```ShellSession -root@localhost# rmmod pn533_usb -root@localhost# rmmod pn533 -root@localhost# rmmod nfc -``` - -To make it permanent you can add this file: /etc/modprobe.d/blacklist-nfc.conf -``` -blacklist nfc -blacklist pn533 -blacklist pn533_usb -``` - -# Compilation option - -* USE_LIBNFC - Enable or disable the 'libnfc' usage. Default is ON. - * LIBNFC_POLL_ALL Enable all modulation when polling. Default is OFF. - * LIBNFC_POLL_NMT_ISO14443A - Enable ISO-14443A modulation when polling. Default is ON. - * LIBNFC_POLL_NMT_ISOJEWEL - Enable ISO-JEWEL modulation when polling. Default is OFF. - * LIBNFC_POLL_NMT_ISO14443B - Enable ISO-14443B modulation when polling. Default is OFF. - * LIBNFC_POLL_NMT_ISO14443BI - Enable ISO-14443BI modulation when polling. Default is OFF. - * LIBNFC_POLL_NMT_ISO14443B2SR - Enable ISO-14443B2SR modulation when polling. Default is OFF. - * LIBNFC_POLL_NMT_ISO14443B2CT - Enable ISO-14443B2CT modulation when polling. Default is OFF. - * LIBNFC_POLL_NMT_FELICA - Enable Felica modulation when polling. Default is OFF.
\ No newline at end of file +| Name | Description | JSON Response | +|--------------------|:-------------------------------------|:------------------------------------------ ----------------------------| +| presence | event that reports NFC tag presence | *Response:* {"status": "detected", "uid": "042eb3628e4981"} | |