Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[PROBLEM] intercepting usb device input
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Problem: intercepting usb device input
13th Jun, 2013, 02:47 AM
Post: #1
Fuzzwah Offline
Registered
Posts: 7
Joined: Feb 2013
Reputation: 0
intercepting usb device input
Question: how can I intercept an input from a USB device at the linux level prior to XBMC picking up the input?

Idea: Am I able to somehow configure XBMC so that it doesn't automatically pickup a certain USB device as being an input?

Background: My goal is to be able to trigger the playback of music in XBMC via an RFID reader.

I have a collection of RFID cards which I've associated with playlists, I currently have the system working on a separate linux machine which fires JSON API calls to XBMC which I have running on a Raspberry Pi (using XBian). On my dev setup, touching a card to the reader simply sends the card's 10 digit code and the return character to the console. I set up bash aliases to take these inputs and send the appropriate JSON call using curl.



You can find a full explanation of my project here: http://fuzzysprojects.wordpress.com/rfid-triggered-music/

I am trying to move the system from my dev machine and have it all running on the RPi. The problem I've run into is that when XBMC is running and a card is read the 10 digits and the return character are picked up in XBMC rather than being sent to the console.

When I SSH into the RPi and try to interact with the RFID reader using evtest I'm informed that "this device is grabbed by another process". So I'm wondering if there is some way that I might be able to stop XBMC from grabbing it?
Find all posts by this user
Quote this message in a reply
14th Jun, 2013, 02:07 AM
Post: #2
Markamc Offline
Registered
Posts: 94
Joined: Apr 2013
Reputation: 4
RE: intercepting usb device input
Might help? maybe...

Writing udev rules

Some Nifty udev Rules....
Find all posts by this user
Quote this message in a reply
27th Jun, 2013, 07:09 PM
Post: #3
Markamc Offline
Registered
Posts: 94
Joined: Apr 2013
Reputation: 4
RE: intercepting usb device input
I've just managed to create a hot-plug "upstart" for my touchscreen. I can unplug/re-plug usb device and start a python script to grab device instead of xbmc. I use "start on input-device-add" and "stop on input-device-removed".

You can probably use similar, docs are here http://upstart.ubuntu.com/cookbook/#upstart-udev-bridge
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 11th May, 2025, 06:29 PM Powered By MyBB, © 2002-2025 MyBB Group.