Welcome! Log In Create A New Profile

Advanced

USB Keyboard. How to start?

USB Keyboard. How to start?
February 20, 2015 01:16PM
Hi,

I have Debian 3.17 on my Pogo V3 (oxnas.) and a simple USB keyboard attached.

But there is no /dev/input/eventX only mice exists...
root@p24:~# ls /dev/input/
.  ..  mice

The USB keyboard recognised by linux:
root@p24:~# cat /proc/bus/input/devices

I: Bus=0003 Vendor=1241 Product=1503 Version=0110
N: Name="  USB Keyboard"
P: Phys=usb-40200100.ehci-1.4/input0
S: Sysfs=/devices/40200100.ehci/usb1/1-1/1-1.4/1-1.4:1.0/0003:1241:1503.0002/input/input1
U: Uniq=
H: Handlers=kbd 
B: PROP=0
B: EV=120013
B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=1241 Product=1503 Version=0110
N: Name="  USB Keyboard"
P: Phys=usb-40200100.ehci-1.4/input1
S: Sysfs=/devices/40200100.ehci/usb1/1-1/1-1.4/1-1.4:1.1/0003:1241:1503.0003/input/input2
U: Uniq=
H: Handlers=kbd 
B: PROP=0
B: EV=13
B: KEY=2000000 39fa d941d001 1e0000 0 0 0
B: MSC=10

root@p24:~#

BUT there is no /dev/input/ device for keyboard.

Any tip to have keyboard events?
I want to capture keyboard presses to shut down properly, skip next song in playlist, etc...

Regards,
Robert
Re: USB Keyboard. How to start?
February 22, 2015 06:06AM
Any hints?
Re: USB Keyboard. How to start?
February 23, 2015 08:03AM
dunno if this holds any water - but have you tried a wireless mouse keyboard combo?
Re: USB Keyboard. How to start?
February 24, 2015 03:38AM
@robert - I saw the thread, but I know zero about input devices ... my general approach would be to keep hitting google until I find something that answers my question - but guess you've already tried that !

Usually my experience is with something plugged in via USB that doesn't "just work" is caused by a missing driver (or firmware or module). For instance I plugged in a Netgear WPN111 wifi apdater, and I can't see it in the usual places. Because it's an Atheros chipset, the driver install was easy, simply by - "apt-get install atheros-firmware". Then I had to add it in "/etc/network/interfaces" and bang there it is on "ifconfig".

I don't know if there's a similar step(s) necessary on Debian, perhaps look for packages for HID (human input device), keyboard etc.

SO - I reckon you could be missing some setup, and suggest reading this page carefully - https://wiki.debian.org/Keyboard, especially the "usbhid" kernel module. I think this is probably key ... find out if that module has been loaded, and if not then try loading it and see if that resolves the issue. If your changing the initramfs boot file, take a backup first, this has saved me hours in the past ....

Some pointers in the right direction hopefully - sorry can't be of more help, drivers and modules aren't my strong suit, I muddle through when I get similar issues !

Please do let us know how you get on ... that is if someone else on here doesn't come up with the answer :D

Cheers

Don Charisma ... because anything is possible with Charisma

My blog - http://DonCharisma.org
Our commercial site - http://DonCharisma.com
Re: USB Keyboard. How to start?
February 25, 2015 11:28AM
Hi Gravelrash,


Thanks! Mouse probably works, but not helps for me.
None of the keyboards could work because device is not created by debian.

Thanks,
Robert
Re: USB Keyboard. How to start?
February 25, 2015 11:50AM
Hi Don Charisma,

Thanks for try to help. :)
You are possibbly right. I made a few days :) discover about this topic and concludes to the same result as you.
USB Keyboard needs input and usb related modules.
Tried to reconfigure console-data and keyboard-configuration but not thisis the root of the problem.

I found some guide about kernel compillation:
http://www.tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/build_kernel.html

I will ask Bodhi to share kernel source and some guide to build kernel wtih this moudules.

Thanks for help.
If I have any progress I will refer back.

Regardsm,
Robert
Re: USB Keyboard. How to start?
February 25, 2015 11:54AM
Looks like @Don was on the right track with observations....

so if you do the following from serial console or ssh whichever is your preference

apt-get install console-data keyboard-configuration -f

then reference the following link : https://wiki.debian.org/Keyboard

You *should* be able to get a keyboard working on the *plug
Re: USB Keyboard. How to start?
February 25, 2015 01:06PM
Hi Gravelrash,


Thanks again!

Unfortunately this kernel (3.17 OXNAS by Bodhi) not have modules or compiled directly the necessary components.
See attached kernelconfig.
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set


root@p24:~# lsmod 
Module                  Size  Used by
snd_usb_audio          98502  0 
snd_pcm                65837  1 snd_usb_audio
snd_timer              16188  1 snd_pcm
snd_hwdep               5385  1 snd_usb_audio
snd_usbmidi_lib        17415  1 snd_usb_audio
snd_rawmidi            16507  1 snd_usbmidi_lib
rt73usb                22100  0 
crc_itu_t               1077  1 rt73usb
rt2x00usb               7823  1 rt73usb
snd_seq_device          4993  1 snd_rawmidi
snd                    46431  7 snd_usb_audio,snd_hwdep,snd_timer,snd_pcm,snd_rawmidi,snd_usbmidi_lib,snd_seq_device
soundcore               4795  1 snd
uas                    15442  0 
root@p24:~#

Is there something I misunderstand or kernel modules ( keyboard, usbcore uhci_hcd ehci_hcd usbhid ) are required?

Thanks,
Robert
Re: USB Keyboard. How to start?
February 25, 2015 01:52PM
@robert,

You did not misunderstand! keyboard was not included in the kernel 3.17 config for OXNAS. I'll include it in the next release.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: USB Keyboard. How to start?
February 25, 2015 02:25PM
@Bodhi + Robert

apologies - i thought from the earlier references to kernel source you had obtained it and made the modules.
Re: USB Keyboard. How to start?
February 25, 2015 08:03PM
Thanks guys for help Robert out ...

@Robert - I think once you've got the new kernel and modules, and installed the packages @Gravelrash mentioned, fingers crossed, hopefully it'll be plug and play !

Cheers

Don Charisma ... because anything is possible with Charisma

My blog - http://DonCharisma.org
Our commercial site - http://DonCharisma.com
Re: USB Keyboard. How to start?
February 26, 2015 05:41AM
Thank you Bodhi for clarify the situation!!

>I'll include it in the next release.
I appreciate it very much!!!

Of course It is not a high priority thing, but I will be very happy with it... Thanks in advance.

As you probably see (from modul list), I have USB sound and wifi already working!
and my Pogo V03 is a very decent media player :)

Keyboard needed only to control (and shut down properly) without any (SSH) terminal connection.

Best regards,
Robert
Re: USB Keyboard. How to start?
February 26, 2015 05:47AM
Hi Gravelrash and Don Charisma,

Thanks for help and identify the problem!

Until Bodhi make new kernel I try an old usb mouse (from my garage) to power off Pogo -on the proper way- by one button event.


Regards Robert
Re: USB Keyboard. How to start?
February 26, 2015 06:50AM
@robert

if you would share how you accomplish this mouse buton event shutdown i am certain it can be modified for other devices around, and be of use to many people on here

- speaking for myself, i will include it into an upcoming project, after stripping the internals from the mouse... and utilise left button for poweroff and right button for reboot.
Re: USB Keyboard. How to start?
February 27, 2015 05:20AM
Hi,

USB mouse LEFT button for Shutdown; RIGHT button for Reboot.


See instructions: Robert Blog


Steps needed:

1. Install Python.
apt-get install python

2. Download the python program.
cd /usr/local/bin
wget --no-check-certificate https://raw.githubusercontent.com/robertio/Is_mouse_button_pressed/master/mouse_pressed.py
chmod 755 mouse_pressed.py

3. Download shell script allow to run when system statup.

cd /etc/init.d
wget --no-check-certificate https://raw.githubusercontent.com/robertio/Is_mouse_button_pressed/master/mouse_pressed.sh
chmod 755 mouse_pressed.sh
update-rc.d mouse_pressed.sh defaults

4. Start first time manually
/etc/init.d/mouse_pressed.sh start 

# or reboot

If LEFT mouse button pressed - shut down system

If RIGHT mouse button pressed - Reboots system

Is that helps ?

Regards,
Robert



Edited 6 time(s). Last edit at 02/27/2015 06:40AM by robert1968@gmail.com.
Re: USB Keyboard. How to start?
February 27, 2015 07:04AM
@Robert

Thankyou thats been VERY helpful - particularly in that you have created the relevant scripts already, and been willing to share your work.
Re: USB Keyboard. How to start?
February 27, 2015 07:30AM
Hi Gravelrash,

Happy to help you!

Wireless usb mouses also works!
It is a magic when button pushed 3 meters far from Nas, and shuts down. :)

Right button developed only because you requested.... :)

Robert



Edited 1 time(s). Last edit at 02/27/2015 07:33AM by robert1968@gmail.com.
Re: USB Keyboard. How to start?
February 27, 2015 10:46PM
Good job Robert! It is even a little better than having physical 2 buttons on the box if you use a wireless mouse :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: USB Keyboard. How to start?
February 28, 2015 01:43AM
Thanks Bodhi!

Glad to hear you like it! :)

We have middle button free!
What should to do?
Re: USB Keyboard. How to start?
February 28, 2015 10:06AM
couple of possible suggestions for the middle button

maybe leave it with a link to a blank script so the user can assign there own shell function i.e

perform system update + upgrade
stop / start / restart particular services
send email stats from gzip log files.

and thats just a few :)
Re: USB Keyboard. How to start?
February 28, 2015 02:54PM
Excellent idea Gravelrash!

Empty script is winning for me. :)
Everyone cook according to his/her taste..
Re: USB Keyboard. How to start?
March 01, 2015 05:16AM
You're welcome Robert ...

I recently (re)used an old mouse's microswiches for a reset and power button for a PC motherboard ... haven't been able to confirm working as yet, the motherboard died before I could test !

It's interesting to see what's possible without a soldering iron ...

Cheers

Don Charisma ... because anything is possible with Charisma

My blog - http://DonCharisma.org
Our commercial site - http://DonCharisma.com
Re: USB Keyboard. How to start?
March 12, 2015 03:29AM
Thanks Don! :)
Re: USB Keyboard. How to start?
March 12, 2015 05:06AM
Hi,

Middle mouse button is included!
Script updated:

Blog

github



Edited 1 time(s). Last edit at 03/15/2015 01:58PM by robert1968@gmail.com.
Re: USB Keyboard. How to start?
March 12, 2015 10:17AM
Yippee :)
thanks a lot!!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: