mirror of
https://github.com/nikdoof/pytikitag.git
synced 2025-12-17 03:39:28 +00:00
Massive changes to support basic NDEF and URI record types
This commit is contained in:
23
test.py
23
test.py
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
import logging, sys
|
||||
from pytikitag import reader, tikitag
|
||||
from pytikitag.nfc import type2
|
||||
from smartcard.util import toHexString, toASCIIString
|
||||
|
||||
log = logging.getLogger('pytikitag.mifareul')
|
||||
@@ -8,21 +9,15 @@ h = logging.StreamHandler(sys.stdout)
|
||||
log.addHandler(h)
|
||||
|
||||
r = reader.TikiReader()
|
||||
|
||||
print r.firmware_version()
|
||||
|
||||
m = tikitag.TikiTag(r)
|
||||
|
||||
print m.get_uid()
|
||||
print "Tikitag ID: " + m.get_uid()
|
||||
print "Manf: " + m.get_manf_ascii() + ", Serial: " + m.get_serial()
|
||||
print ""
|
||||
print "Reading Tikitag Data..."
|
||||
print m.get_tag_url()
|
||||
|
||||
#d = m.read_block(0x6)
|
||||
#print "%s bytes" % len(d)
|
||||
#print toASCIIString(d)
|
||||
|
||||
#print m.write_block(0xf, [0xde, 0xad, 0xbe, 0xee])
|
||||
|
||||
#print toHexString(m.read_block(0xf))
|
||||
|
||||
print m.get_manf_ascii()
|
||||
print m.get_serial()
|
||||
#tag = type2.NFCType2(d)
|
||||
#print tag.ndefs[0].items
|
||||
#print toHexString(value)
|
||||
#print toASCIIString(value)
|
||||
|
||||
Reference in New Issue
Block a user