[SGVLUG] Too Many Events

juanslayton at dialup4less.com juanslayton at dialup4less.com
Tue Sep 12 16:54:51 PDT 2006


Perhaps some kind and knowledgable person would be interested in helping me with an evdev problem.  I apologize for putting it in an attachment, but my ISP has a habit of timing me out when I'm in the middle of composing something.

John

__________________________________________________________________________________

Her madness hath the oddest frame of sense,
Such a dependency of thing on thing,
As e'er I heard in madness.
                         -Measure for Measure
-------------- next part --------------
Task:
  Create a program for a school classroom that will link 20 USB keyboards, all giving input to a single computer which runs applications that print to a common projected display.  The output from each keyboard must be kept separate from all others, and will be printed in a particular part of the display reserved for that board.

Status:
  The program has largely been written and is partially working.  It currently runs 15 keyboards, using evdev, reading data from event devices by system calls, etc.  As each board is added, 2 new unique events are added to /dev/input.  Although clearly alpha, this much of the program seems reasonably stable and the keypress reads are pretty much error free.

Problem:
  When keyboard number 16 is added, the kernel declines to assign a new event number.   If we try for 17, the program sometimes crashes, returning a message that there are no free event devices left.  This leaves me 5 keyboards short, since current standard classsize for grades 1-3 is 20.

Strategies:
  My third grade brain returns 3 possibilities:

1.Somewhere in this computer’s cosmos of data is a number that says how many event devices I can have.  I need to find that number and make it bigger.

2.Roughly half of the event devices used are for mice.  But I don’t want any mice for this application; the keyboards don’t even ship with mice.  If I can somehow get rid of the mouse events, there would be more than enough free events for my 5 keyboards.  (Using ‘rm’ in /dev/input doesn’t work.  I tried it.)

3.If I can’t get rid of the mouse events, maybe I can change them to keyboard events. Possibly change .type and .code field in the input_event structure?  I’m really over my head here.

Question:
  Can any of these things be done from user space without re-compiling the kernel drivers?


More information about the SGVLUG mailing list