diff --git a/usb_application/ccid.py b/usb_application/ccid.py index 24425cf2..d6b69dba 100755 --- a/usb_application/ccid.py +++ b/usb_application/ccid.py @@ -5,31 +5,6 @@ from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid from pySim.transport.pcsc import PcscSimLink -class find_class(object): - def __init__(self, class_): - self._class = class_ - def __call__(self, device): - # first, let's check the device - if device.bDeviceClass == self._class: - return True - # ok, transverse all devices to find an - # interface that matches our class - for cfg in device: - # find_descriptor: what's it? - intf = usb.util.find_descriptor( - cfg, - bInterfaceClass=self._class - ) - if intf is not None: - return True - - return False - -def set_conf(conf): - devs = usb.core.find(find_all=1, custom_match=find_class(0xb)) # 0xb = Smartcard - for dev in devs: - dev.set_configuration(conf) - def pySim_read(): sl = PcscSimLink(0)