import nfc.handover
import logging
-logging.basicConfig()
import wpaspy
clf = nfc.ContactlessFrontend()
parser = argparse.ArgumentParser(description='nfcpy to hostapd integration for WPS NFC operations')
+ parser.add_argument('-d', const=logging.DEBUG, default=logging.INFO,
+ action='store_const', dest='loglevel',
+ help='verbose debug output')
+ parser.add_argument('-q', const=logging.WARNING, action='store_const',
+ dest='loglevel', help='be quiet')
parser.add_argument('--only-one', '-1', action='store_true',
help='run only one operation and exit')
parser.add_argument('--no-wait', action='store_true',
global no_wait
no_wait = args.no_wait
+ logging.basicConfig(level=args.loglevel)
+
try:
if not clf.open("usb"):
print "Could not open connection with an NFC device"
import nfc.handover
import logging
-logging.basicConfig()
import wpaspy
clf = nfc.ContactlessFrontend()
parser = argparse.ArgumentParser(description='nfcpy to wpa_supplicant integration for WPS NFC operations')
+ parser.add_argument('-d', const=logging.DEBUG, default=logging.INFO,
+ action='store_const', dest='loglevel',
+ help='verbose debug output')
+ parser.add_argument('-q', const=logging.WARNING, action='store_const',
+ dest='loglevel', help='be quiet')
parser.add_argument('--only-one', '-1', action='store_true',
help='run only one operation and exit')
parser.add_argument('--no-wait', action='store_true',
global no_wait
no_wait = args.no_wait
+ logging.basicConfig(level=args.loglevel)
+
try:
if not clf.open("usb"):
print "Could not open connection with an NFC device"