Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6645843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:20:21+00:00 2026-05-26T00:20:21+00:00

I’ve got a RFID USB device that registers as a HID device (A USB

  • 0

I’ve got a RFID USB device that registers as a HID device (A USB Keyboard more or less).

I’m looking for a way to capture this input, and block/filter it before it hits the normal keyboard event handler (and outputs the 10 digit RFID code to the console).

I would of course have to exclusively capture just this device, and leave the real keyboard input alone (or pass it along).

My initial idea was to block the device in UDEV (So the usbhid/event/kbd kernel module didn’t bind to it) and write my own basic driver for this device – but I don’t know where to begin, or if that’ll even work.

What would be great (and I’m not sure if such a thing can be done) – is if I write a event-filter module that can sit in-line with the event driver and capture (then filter) the appropriate input from the RFID unit, but let everything else pass through. I imagine such a module wouldn’t require much code, and would be the most practical.

Help?

[EDIT: I should add that Xorg is NOT installed – console only]

cat /proc/bus/input:
  I: Bus=0003 Vendor=0419 Product=0912 Version=0100
  N: Name="NewRoad Sem. NewRoad System PS2 Interface"
  P: Phys=usb-0000:00:1d.3-2/input0
  S: Sysfs=/devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/input/input20
  U: Uniq=
  H: Handlers=sysrq kbd mouse0 event3
  B: PROP=0
  B: EV=120017
  B: KEY=70000 0 0 e080ffdf01cfffff fffffffffffffffe
  B: REL=103
  B: MSC=10
  B: LED=1f

More info:

lsusb -d 0419:0912 -v
Bus 005 Device 019: ID 0419:0912 Samsung Info. Systems America, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0419 Samsung Info. Systems America, Inc.
  idProduct          0x0912
  bcdDevice            0.01
  iManufacturer           1 NewRoad Sem.
  iProduct                2 NewRoad System PS2 Interface
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4
    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              5
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     119
         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
Device Status:     0x0000
  (Bus Powered)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:20:22+00:00Added an answer on May 26, 2026 at 12:20 am

    So I whipped up a proof-of-concept app according to that post I found here

    It does exactly what I require – just though I’d share my solution anyway.

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <errno.h>
    #include <fcntl.h>
    #include <dirent.h>
    #include <linux/input.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <sys/select.h>
    #include <sys/time.h>
    #include <termios.h>
    #include <signal.h>
    
    int main(int argc, char* argv[])
    {
        struct input_event ev[64];
        int fevdev = -1;
        int result = 0;
        int size = sizeof(struct input_event);
        int rd;
        int value;
        char name[256] = "Unknown";
        char *device = "/dev/input/event3";
    
    
        fevdev = open(device, O_RDONLY);
        if (fevdev == -1) {
            printf("Failed to open event device.\n");
            exit(1);
        }
    
        result = ioctl(fevdev, EVIOCGNAME(sizeof(name)), name);
        printf ("Reading From : %s (%s)\n", device, name);
    
        printf("Getting exclusive access: ");
        result = ioctl(fevdev, EVIOCGRAB, 1);
        printf("%s\n", (result == 0) ? "SUCCESS" : "FAILURE");
    
        while (1)
        {
            if ((rd = read(fevdev, ev, size * 64)) < size) {
                break;
            }
    
            value = ev[0].value;
    
            if (value != ' ' && ev[1].value == 1 && ev[1].type == 1) {
                printf ("Code[%d]\n", (ev[1].code));
            }
        }
    
        printf("Exiting.\n");
        result = ioctl(fevdev, EVIOCGRAB, 1);
        close(fevdev);
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.