Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide Using a wireless USB Keypad as remote control
#11
Thumbs Up 
(01-14-2024, 09:00 PM)Nutul Wrote:
(01-14-2024, 08:08 PM)krimikael Wrote: Ok, i think i found the cause, mini keyboard is not recognized by the pi-zero.
Just attached another big size keyboard and everything works as it should.

Thanks Nutul

Hi,

I suppose you are not so happy, but nevertheless...

can you try this:
lsusb

before and after having plugged the mini kbd, so we know if it is at least seen by the system.

Ofcourse i would rather have this working with the small keyboard.
Anyway i connect everything again, rebooted and stangely everything works now with the small keyboard now aswell  Huh .

mk@FLY32:~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
mk@FLY32:~ $ lsusb
Bus 001 Device 003: ID 1189:8890 Acer Communications & Multimedia 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Hope it will stay this way now Smile.


Attached Files Thumbnail(s)
   
Reply
#12
(01-14-2024, 10:08 PM)krimikael Wrote:
(01-14-2024, 09:00 PM)Nutul Wrote:
(01-14-2024, 08:08 PM)krimikael Wrote: Ok, i think i found the cause, mini keyboard is not recognized by the pi-zero.
Just attached another big size keyboard and everything works as it should.

Thanks Nutul

Hi,

I suppose you are not so happy, but nevertheless...

can you try this:
lsusb

before and after having plugged the mini kbd, so we know if it is at least seen by the system.

Ofcourse i would rather have this working with the small keyboard.
Anyway i connect everything again, rebooted and stangely everything works now with the small keyboard now aswell  Huh .

mk@FLY32:~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
mk@FLY32:~ $ lsusb
Bus 001 Device 003: ID 1189:8890 Acer Communications & Multimedia 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Hope it will stay this way now Smile.

I don't know if this is normal (whether always, or just for the 'zero'), IMO it isn't; but looks like the keyboard insertion does not trigger the creation of the input device...
Anyway, never disconnect it and reboot, as just re-plugging it in won't, again, work. ;-)
Reply
#13
Hi folks!

I am not a Linux-Crack, it's just copying Code that i almost understand ;-)

I discovered the event-number with the command:

cat /proc/bus/input/devices

The output is a bit difficult to read, it should look like this..

I: Bus=0003 Vendor=0513 Product=0318 Version=0110
N: Name="HID 0513:0318"
P: Phys=usb-0000:01:00.0-1.3/input0
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:0513:0318.0001/input/input0
U: Uniq=
H: Handlers=sysrq kbd leds event0
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=0513 Product=0318 Version=0110
N: Name="HID 0513:0318 Mouse"
P: Phys=usb-0000:01:00.0-1.3/input1
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:0513:0318.0002/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: PROP=0
B: EV=17
B: KEY=1f0000 0 0 0 0
B: REL=1943
B: MSC=10

The upper one is my keyboard, it is "event0", which can be seen in the line beginning with H:
You should search for "HID" HumanInterfaceDevice oder keyboard, or something with USB:...

Now, we know which device should be used, and we can change the "event" in the command
sudo thd --dump /dev/input/event0

to the device we need.

Then the command should work..

Greets, Thomas
Reply
#14
Looking back at the Guide I created three years ago, Using FLIRC and other input devices for remote control,  I see that i used a wildcard to scan all the input events. Specifically, to see and save the keyscan codes as I pressed keys, I did


Code:
thd --dump /dev/input/event* | tee keycodes.cap


I'm curious to know if this works for your case as well, rather than having to laboriously dig through the Linux arcana. Seems to me it should as long as you press only keys and don't move the mouse.

It seems the older I get, the more quickly I forget the stuff I have done before. Used to take me over decade to forget; now it takes about 18 months. The trend isn't reassuring.

Regards,
Kent
Reply
#15
Hi Kent,

Thank you for your help, i will add that command to my "favorite copied commands" selection ;-)

Greets, Thomas
Reply
#16
PS - even if there are multiple input devices attached and more than one is accidentally pressed/released/moved/etc., it should be pretty easy to tell which events are associated with which device, and then filter accordingly.
Reply


Forum Jump: