Closed moliata closed 5 years ago
From the bottom diagram, it looks like it is not a USB HID device; it might be USB to Serial. Maybe you could ask the seller the name of the tool it uses? That might give you some clue.
I found this video using (from the look) same device https://youtu.be/vCaVs2aS1tQ, even though it's a different store, the bottom of the reader looks the same (USB-203, ID, USB, R/W). In the video, we can see that it acts as a USB Input Device as well, so I hope it should be same with this device. They also use IDRW tool, but I'm not sure if that is original and/or it's V2 or V1.
I'm not sure if this device would be compatible with my library, but let me know when you have it; if it doesn't work we'll try to add support for it.
@charlysan Sure, I have also seen some RFID readers/writers like these in AliExpress which also showed a picture of IDRW V3 in use with it, so I am 90% confident it should work, if not, I'll try to reverse engineer the software they provide and look into the serial communication between the device and computer. I should get the device on August 28th - September 13th. I'll tell you whenever I get my hands on it. Fingers crossed.
Oh and also, this GitHub repository at https://github.com/merbanan/rfid_app, seems really interesting to me. RFID App is a really popular application which is used in these AliExpress products. You may want to take a look there.
Yes, I've seen that app; it's great!
By the way, does this reader/writer work with HID ProxCards, AWID cards? EDIT: it doesn't...
No HID/AWID cards support by this reader/writer. AFAIK, only EM4305 and T5577.
Yup! AFAIK EM4xxx and T55xx
Hello, I ordered this one: https://de.aliexpress.com/item/USB-125-khz-RFID-EM4305-T5567-Karte-Reader-Writer-Kopierer-Schriftsteller-Programmierer-Brenner-5-ID-Schl/32903931148.html and I received it today.
I try to use it with IDRW V3 but it doesn't work. It only give the UID as output over my keyboard anytime when i put one of my RFID Cards in the range. Also tried with your libary but I get an error from pyusb.
Initializing device... Traceback (most recent call last): File "read.py", line 76, in <module> main() File "read.py", line 48, in main rfid.init() File "/usr/lib/python3.6/site-packages/pyrfidhid-0.1-py3.6.egg/rfidhid/core.py", line 58, in init File "/usr/lib/python3.6/site-packages/usb/control.py", line 173, in get_descriptor data_or_wLength = desc_size) File "/usr/lib/python3.6/site-packages/usb/core.py", line 1043, in ctrl_transfer self.__get_timeout(timeout)) File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 883, in ctrl_transfer timeout)) File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 32] Pipe error
@vale5566, that device might behave as a USB HID Keyboard. The one I have is different, it has a custom "protocol" with commands for reading and writing a tag. Have you tried merbanan rfid_app? One more thing, could you please paste your output for sudo lsusb -vd ffff:0035
?
output from sudo lsusb -vd ffff:0035
:
Bus 001 Device 006: ID ffff:0035 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0xffff idProduct 0x0035 bcdDevice 1.00 iManufacturer 1 Sycreader iProduct 2 USB Reader iSerial 3 08FF20150112 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0034 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 4 Keyboard HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 33 US bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 65 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 5 Vender Hid HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 33 US bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 35 Report Descriptor: (length is 35) Item(Global): Usage Page, data= [ 0xa0 0xff ] 65440 (null) Item(Local ): Usage, data= [ 0x01 ] 1 (null) Item(Main ): Collection, data= [ 0x01 ] 1 Application Item(Global): Report ID, data= [ 0x01 ] 1 Item(Local ): Usage, data= [ 0x08 ] 8 (null) Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255 Item(Global): Logical Minimum, data= [ 0x00 ] 0 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Report Count, data= [ 0xff ] 255 Item(Main ): Feature, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Global): Report ID, data= [ 0x02 ] 2 Item(Local ): Usage, data= [ 0x08 ] 8 (null) Item(Main ): Feature, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Global): Report ID, data= [ 0x03 ] 3 Item(Local ): Usage, data= [ 0x08 ] 8 (null) Item(Main ): Feature, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Main ): End Collection, data=none can't get debug descriptor: Resource temporarily unavailable cannot read device status, Resource temporarily unavailable (11)
Yes I t tried the rfid_app I get the same error as this comment.
Does it work with preincluded software by the seller? If so, can you tell us the name of it.
There was no software included. I wrote the seller at Aliexpress but I don't think I get an helpful answer.
Okay I found the solution I disassembled the package and the chip can only read.
But thanks for your help!
That makes sense @vale5566, as the device behaves as a Keyboard. Could you please share a picture of the back of the device? (it if has same labels). That information might be useful.
Sure, but there is no label. link to the photo: https://ittuberlin-my.sharepoint.com/:i:/g/personal/5146500509788880_msopseudo_tu-berlin_de/EXJ6PE3cLR9NuA3GF2ypa64B6wD8XdZsWpL5jWi-oI4Wew?e=nde7UX
@charlysan the HID option in my picture meant not Human Interface Device, but whether it supports HID Corporation cards such as HID ProxCard II
True. Thanks for clarifying that @moliata.
@charlysan there are 2 RFID Reader/Writer versions. ffff:0035 version and 6688:6850 version. Your code works with the ffff:0035, but my device is the second version 6688:6850. It is also HID device, but with a different PID/VID and different commands. RFID APP repository worked for me, so we should take a look on how to implement it.
In the provided software the is a check box for enabling "Analog USB Keyboard" mode, when I enable it and click Read Card, it becomes a HID device. Then I am able to use Notepad and get all of the data. Pretty interesting.
That's seems to be a more complex device than mine @moliata. Just in case, please try out v0.1.1 branch.
v0.1.1 branch uses ffff:0035 vid/pid. I'll try to rewrite the code under the 6688:6850 vid/pid with different commands. I'll post the update here, if everything works well, I'll create a PR under the master branch with a proposal.
Arghh... I am not able to send the data to the RFID reader because of the https://github.com/pyusb/pyusb/issues/208
No need to rewrite code for your vid/pid, you can just pass any vid/pid to the constructor. ffff:0035
are just the default values @moliata
@charlysan yeah, but I am not able to run your code because of the insufficient permissions error on my Macbook.
You can use a Linux VM until the guys from pyusb figure out out to solve that issue @moliata.
It seems the problem is with Mac computers security... The kernel driver is binded to a HID device, disallowing me to use it. I'll try it with my Ubuntu laptop, thanks!
Strange @moliata. I can confirm that I can read and write tags using my Mac. I've just tried it out with success (MacOS HighSierra 10.13.6 (17G65)).
I am not able to use neither read neither write examples with 10.13.5 (MacBook Air Early 2015).
I have just successfully purchased an RFID Reader/Writer (just like this one) on AliExpress: https://www.aliexpress.com/item/RFID-Copier-125KHz-EM4100-Cloner-Writer-Duplicator-Programmer-Reader-5-Pcs-EM4305-T5577-Rewritable-ID-Keyfobs/32721839667.html?spm=a2g0s.9042311.0.0.2b494c4d1v0Omv, interesting thing is that when I searched for IDRW V3 on Google Images, all photos contained the same reader but instead they all had following text on them: Microsoft Windows, FC and USB Reader. The only thing that his has is RFID Reader, should it work? Or I just purchased something not right?