summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2014-03-20 17:36:42 -0700
committerSamuel Ortiz <sameo@linux.intel.com>2014-04-07 01:21:28 +0200
commit647f2705bebf051ea85ab74399461203c8ba900e (patch)
tree1b91cf50091e9875acd65d4b56e170f8e7330939
parent36b3b7f46ce3696ed1419fc4e6847fc2434baf76 (diff)
downloadneard-647f2705bebf051ea85ab74399461203c8ba900e.tar.gz
neard-647f2705bebf051ea85ab74399461203c8ba900e.tar.bz2
neard-647f2705bebf051ea85ab74399461203c8ba900e.zip
ISO14443-B: Add support for ISO/IEC 14443-B Protocol
Add support for the ISO/IEC 14443-B protocol used by Type 4B tags.
-rw-r--r--src/adapter.c3
-rw-r--r--src/tag.c3
-rw-r--r--tools/nfctool/adapter.c3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/adapter.c b/src/adapter.c
index 2d74c6e..70c3570 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -308,7 +308,8 @@ static void append_protocols(DBusMessageIter *iter,
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &str);
}
- if (adapter->protocols & NFC_PROTO_ISO14443_MASK) {
+ if ((adapter->protocols & NFC_PROTO_ISO14443_MASK) ||
+ (adapter->protocols & NFC_PROTO_ISO14443_B_MASK)) {
str = "ISO-DEP";
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &str);
diff --git a/src/tag.c b/src/tag.c
index cb71e56..61fb520 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -148,6 +148,7 @@ static const char *type_string(struct near_tag *tag)
break;
case NFC_PROTO_ISO14443:
+ case NFC_PROTO_ISO14443_B:
type = "Type 4";
break;
@@ -184,6 +185,7 @@ static const char *protocol_string(struct near_tag *tag)
break;
case NFC_PROTO_ISO14443_MASK:
+ case NFC_PROTO_ISO14443_B_MASK:
protocol = "ISO-DEP";
break;
@@ -435,6 +437,7 @@ static DBusMessage *write_ndef(DBusConnection *conn,
break;
case NFC_PROTO_ISO14443:
+ case NFC_PROTO_ISO14443_B:
ndef_with_header = g_try_malloc0(sizeof(
struct near_ndef_message));
if (!ndef_with_header)
diff --git a/tools/nfctool/adapter.c b/tools/nfctool/adapter.c
index c2174de..beaee53 100644
--- a/tools/nfctool/adapter.c
+++ b/tools/nfctool/adapter.c
@@ -100,7 +100,8 @@ void adapter_print_info(struct nfc_adapter *adapter)
if (adapter->protocols & NFC_PROTO_JEWEL_MASK)
printf("Jewel ");
- if (adapter->protocols & NFC_PROTO_ISO14443_MASK)
+ if ((adapter->protocols & NFC_PROTO_ISO14443_MASK) ||
+ (adapter->protocols & NFC_PROTO_ISO14443_B_MASK))
printf("ISO-DEP ");
if (adapter->protocols & NFC_PROTO_NFC_DEP_MASK)