5 Replies Latest reply on Mar 11, 2015 10:19 AM by @hippiehacker

    Reading /dev/input/event* on the Edison (from ruby)

    @hippiehacker

      I'm trying to read usb keyboard events from the Edison. This same code works on current linux machines, but there seems to be something wrong, maybe particular here to old kernels?

       

      ```

      ~/revdev# ruby sample/key_dump /dev/input/by-id/usb-05f3_0007-ev

      /usr/local/lib/ruby/gems/2.1.0/gems/revdev-0.2.1/lib/revdev/event_device.rb:19:in `ioctl': Invalid argument @ rb_ioctl - /dev/input/by-id/usb-05f3_0007-event-kbd (Errno::EINVAL)

              from /usr/local/lib/ruby/gems/2.1.0/gems/revdev-0.2.1/lib/revdev/event_device.rb:19:in `read_ioctl_with'

              from /usr/local/lib/ruby/gems/2.1.0/gems/revdev-0.2.1/lib/revdev/event_device.rb:33:in `read_ioctl_as_string_with'

              from /usr/local/lib/ruby/gems/2.1.0/gems/revdev-0.2.1/lib/revdev/event_device.rb:38:in `device_name'

              from sample/key_dump:44:in `main'

      :~/revdev# git remote -v

      origin  git@github.com:kui/revdev.git (fetch)

      origin  git@github.com:kui/revdev.git (push)

      ```