Lines Matching defs:nfc
3 # Example nfcpy to wpa_supplicant wrapper for WPS NFC operations
15 import nfc
16 import nfc.ndef
17 import nfc.llcp
18 import nfc.handover
109 class HandoverServer(nfc.handover.HandoverServer):
117 sel = nfc.ndef.HandoverSelectMessage(version="1.2")
132 message = nfc.ndef.Message(data);
153 nfc.llcp.activate(peer);
159 while nfc.llcp.connected():
162 except nfc.llcp.ConnectRefused:
164 nfc.llcp.shutdown()
171 nfc.llcp.shutdown()
184 record = nfc.ndef.Record()
187 record = nfc.ndef.HandoverCarrierRecord(record)
191 message = nfc.ndef.HandoverRequestMessage(version="1.2")
198 nfc.llcp.activate(peer);
200 client = nfc.handover.HandoverClient()
205 except nfc.llcp.ConnectRefused:
207 nfc.llcp.shutdown()
220 nfc.llcp.shutdown()
223 if message.type != "urn:nfc:wkt:Hs":
225 nfc.llcp.shutdown()
231 message = nfc.ndef.HandoverSelectMessage(message)
240 wifi = nfc.ndef.WifiConfigRecord(carrier.record)
244 nfc.llcp.shutdown()
252 message = nfc.ndef.Message(tag.ndef.message)
280 print "Touch an NFC tag"
302 print "Touch an NFC tag"
324 print "Touch an NFC tag"
341 if nfc.llcp.connected():
343 general_bytes = nfc.llcp.startup({})
345 if isinstance(peer, nfc.DEP):
354 if isinstance(peer, nfc.DEP):
368 clf = nfc.ContactlessFrontend()
408 if isinstance(tag, nfc.DEP):