nfc raspberrypi tag id matching

import nfc
import time
my_id = '01010501b00ac30b'

def connected (tag):
    time.sleep(1)

clf = nfc.ContactlessFrontend('usb')
touched = 0

while True:
    print('waiting...')
    tag = clf.connect(rdwr={'on-connect':connected})
    felica_id = str(tag.idm).encode("hex")
    if (my_id == felica_id):
        print('matched!!')
    else:
        print('invalid id!!')

    print('scaned')

で,

指定したfelica(=my_id)だと,

waiting...
matched!!
scaned
waiting...

違うfelicaだと,

waiting...
invalid id!!
scaned
waiting...

となる.