dextersiah1998
Posts: 18
Joined: Tue Sep 24, 2019 1:19 pm

Reading Input From RFid Reader

Wed Dec 04, 2019 9:27 am

Hi I'm trying to make a RFid tag in/out system using a 125KHz USB RFID Smart Card Reader EM4100 with my RPI-4. I'm following this guide here https://tutorial.cytron.io/2019/07/25/c ... pberry-pi/ but it is using a InputField GUI to capture the ID of the tag. I was wondering is there an alternative method to get the ID of the tag that does not require an InputField?

deepo
Posts: 262
Joined: Sun Dec 30, 2018 8:36 pm

Re: Reading Input From RFid Reader

Wed Dec 04, 2019 10:15 am

The RFID reader is probably presenting itself as a generic HID device (keyboard) on the USB connection.
But maybe there is help here:
http://heppg.de/ikg/wordpress/?p=390

/Mogens

dextersiah1998
Posts: 18
Joined: Tue Sep 24, 2019 1:19 pm

Re: Reading Input From RFid Reader

Wed Dec 04, 2019 10:32 am

deepo wrote:
Wed Dec 04, 2019 10:15 am
The RFID reader is probably presenting itself as a generic HID device (keyboard) on the USB connection.
But maybe there is help here:
http://heppg.de/ikg/wordpress/?p=390

/Mogens
Hi thanks for the suggestion, I've looked into the post but it seems confusing and doesn't fit into my use case as I'm not using scratch.

I was searching online and I was wondering is it possible to get the value through enabling serial? Does it work that way?

deepo
Posts: 262
Joined: Sun Dec 30, 2018 8:36 pm

Re: Reading Input From RFid Reader

Wed Dec 04, 2019 6:11 pm

Sure, if you can enable serial output from the RFID reader, then it should be a fairly simple task to read the tags that way.

/Mogens

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Reading Input From RFid Reader

Wed Dec 04, 2019 6:22 pm

On an RFID reader that I've used in the past I bypassed the kernel (HID) driver and used it directly. That was in C and from the command line. Don't ask me for code, because I don't have it any more. But I figured it out with a bit of general internet searching. None of the code was Pi specific, but it did compile and run on a Pi.

Return to “Beginners”