aboutsummaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index c187892..89245d1 100644
--- a/utils.py
+++ b/utils.py
@@ -531,6 +531,7 @@ class PN532_Response(PN532_Frame):
class PN532_Target(object):
TYPE_ISO14443A = "ISO 14443-A"
+ TYPE_ISO14443B = "ISO 14443-B"
def __init__(self, type):
self.type = type
@@ -567,6 +568,20 @@ class PN532_Response_InListPassiveTarget(PN532_Response):
target.ats = []
# ATS length does count length byte
+ elif baudrate_polled == 3:
+ target = PN532_Target(PN532_Target.TYPE_ISO14443B)
+ self.targets[response[pos]] = target
+
+ target.atqb = response[(pos+1):(pos+13)]
+ pos = pos + 13
+
+ if response[pos] > 0:
+ target.attrib_res = response[pos+1:(pos+1+response[pos])]
+ pos = pos + response[pos]
+ else:
+ target.attrib_res = []
+ pos = pos + 1 # ATTRIB_RES length does not count the length byte
+
if last_pos == pos:
return False