LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-25-2010, 02:49 AM   #1
e_pech
LQ Newbie
 
Registered: Jul 2007
Posts: 8

Rep: Reputation: 0
Read USB HID


Hello,

OS: Fedora 6

So I was given the task of reading a Magnetic Card Reader (which uses the USB HID class) and it is recognized as some kind of keyboard (I swipe the card and the info goes to the active window, that works fine).
Now what I need to do is REGARDLESS of which window active I want my app to read those characters and manipulate them.
I've been reading about how Keyloggers work (reading /dev/input/event*) and about how to make a Keylogger (I figured that would help me out), however I've got to the point where I should ask for help. I tried a keylogger that works that way (reading the event) but it doesn't work very well. I've been reading about I can do it in User Space and in Kernel Space, and that's where I need help. Which one is easier? How to go about doing each one of those options? Is there any other way?? Will I have to deal with the USB Protocol??

Any suggestion, hint will be greatly appreciated and taken into account.
 
Old 03-29-2010, 10:20 PM   #2
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,424

Rep: Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876
How about we start with what you have already tried to see if it can be improved?
Maybe give example of keylogger code and tell us more about what "doesn't work very well"?

As for User and Kernel Space - generally something done in User Space will require lest changes to your overall system
and potentially have less side effects that you have to later work out. So I would place this in perhaps the easier pile
although have had experience that this is not always the case

As far as options for doing either, google is your friend.
 
Old 04-02-2010, 03:03 PM   #3
e_pech
LQ Newbie
 
Registered: Jul 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I'm on the way...

I'm sorry, what happened is, I was having issues with the USB on VMWare, so what I did is I installed Fedora Core 6 on my Hard Drive and I'm able to develop.

I'm working on reading the event of my USB Card Reader. I'm using LogKeys as a base for my work.

Thank you!!
 
Old 04-03-2010, 01:30 AM   #4
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,424

Rep: Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876Reputation: 1876
No probs ... don't forget to mark as SOLVED.
 
  


Reply

Tags
hid, keyboard, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read/write to/from USB HID devices jimspruell Linux - Newbie 0 05-04-2009 10:18 AM
Talking to USB-HID ectech Programming 1 10-24-2005 06:24 AM
USB hid.o hijacking my USB Printer Relativity Linux - Hardware 0 12-09-2003 08:56 PM
Usb-hid RanmaPhreak79 Linux - Hardware 1 07-18-2003 08:32 PM
Usb + Hid vexer Slackware 4 05-28-2003 09:46 PM


All times are GMT -5. The time now is 04:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration