JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
About pyusb
About pyusb
I want use pyusb to test my CCID device. But I'm new to pyusb. I installed pyusb and liusb. But when I called get_active_configuration() or set_configuration(), I got the "Operation not supported or unimplemented on this platform" information. Why?
Re: About pyusb
Did my smartcard reader driver cause this question?
Re: About pyusb
Now I resolved this problem by installed the newest libusb(libusb-1.0.22). And set_configuration() worked rightly. But a new question appread. Tt is write function.
The error appeared when PC processing out.write function:
NotImplementedError: Operation not supported or unimplemented on this platform

Code: Select all
dev = usb.core.find(idVendor=0x096e, idProduct=0x0856)
dev.set_configuration()
cfg = dev.get_active_configuration()
for intf in cfg:
if intf.bInterfaceClass == 0x0B: #smart card
break
out_ep = None
in_ep = None
for ep in intf:
if usb.util.endpoint_direction(ep.bEndpointAddress) == usb.util.ENDPOINT_IN:
in_ep = ep
if usb.util.endpoint_direction(ep.bEndpointAddress) == usb.util.ENDPOINT_OUT:
out_ep = ep
print out_ep
print in_ep
dev.ctrl_transfer(bmRequestType=0x80, bRequest=0x06, wValue=0x0302, wIndex=0x0409, data_or_wLength=0x0018)
out.write('\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00')
NotImplementedError: Operation not supported or unimplemented on this platform



Re: About pyusb
Now, I'm getting a little clearer on Libusb. winUSB is the grandfather. libusb is the son. pyusb is grandson. All operations base on winUSB. libusb is only a lib. It encapsulates winUSB operations and provides a uniform interfaces. pyusb is python module. If I use C language, I can use libusb too.
Re: About pyusb
If you want to work on libusb, the fist step is replacing your device driver. I usb "zadig-2.5.exe" replaced my CCID reader. I can send apdu and recv sw now. 

Who is online
Users browsing this forum: No registered users and 5 guests