Adding USB Keypad

More
18 Apr 2017 03:54 #91565 by islander261
Hello

I am trying to add an USB keypad to used as an external jogging control. I am almost there but just can't get permissions correct to use it. Here is the key pad USB info:
I: Bus=0003 Vendor=05f3 Product=02a5 Version=0100
N: Name="P.I. Engineering XKeys Desktop "
P: Phys=usb-0000:00:1a.1-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1a.1/usb3/3-1/3-1:1.0/0003:05F3:02A5.0004/input/input15
U: Uniq=
H: Handlers=kbd event12 
B: PROP=0
B: EV=20013
B: KEY=7f ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff 0 0 0 0
B: MSC=10
B: LED=ff00

I have created a rules file and placed it in /etc/udev/rules.d/joypad.rules.
SYSFS{idProduct}=="02a5", SYSFS{idVendor}=="05f3", MODE="0666", GROUP="plugdev"

When I do this it doesn't work:
jd@plasma1 ~ $ halrun
halcmd: loadusr -W hal_input -KRAL XKeys
No input devices could be opened.  This usually indicates a misconfigured
system.  Please read the section 'PERMISSIONS AND UDEV' in the hal_input
manpage
<stdin>:1: waitpid failed hal_input hal_input
<stdin>:1: hal_input exited without becoming ready
halcmd: 

And when I do this it does work:
jd@plasma1 ~ $ sudo halrun
halcmd: loadusr -W hal_input -KRAL XKeys
halcmd:
I can follow this with a show pin command that will overflow the terminal buffer with pins.

Now what do I need to do to get the permissions set so loadusr -W hal_input -KRAL XKeys when run from my HAL file will work?
TIA

John

Please Log in or Create an account to join the conversation.

More
18 Apr 2017 15:53 #91585 by islander261
Replied by islander261 on topic Adding USB Keypad
Hello

Ok, I found the solution in a very cryptic message in another thread. I couldn't find instructions to do this on any of the man pages I looked at, only vague references to needing to set permissions no locations given. I had the permissions set incorrectly for the /dev/input directory and all it's children. The permissions need to be read / write for all users of the directories. I had tried this previously using chmod but obviously did not get it correct. I used the file browser and the open as root right click menu choice and then went to properties > permissions and made the change. It works now both using halrun and from halshow in my Gmoccapy gui.

Now I sometimes get error messages in the terminal when I start Gmoccapy but this is normal for me.

John

Please Log in or Create an account to join the conversation.

More
18 Apr 2017 16:00 #91587 by tommylight
Replied by tommylight on topic Adding USB Keypad
Just saw this, what are you trying to use it for ? I ask as i have a USB keypad and it works as is for jogging and homing .

Please Log in or Create an account to join the conversation.

More
18 Apr 2017 17:53 #91592 by islander261
Replied by islander261 on topic Adding USB Keypad
Yes, I intend to use the keypad for jogging and homing. I thought I needed to use the hal_input.comp to get pins to connect to. Is there another way?

John

Please Log in or Create an account to join the conversation.

More
18 Apr 2017 21:26 #91604 by tommylight
Replied by tommylight on topic Adding USB Keypad
Just plug it in. I did nothing.
It works on several systems with Linuxcnc i have, Just check the "num lock" on the big keyboard, i have it on the small one so i can toggle as needed.
Jog X Y Z, home, touch off, all work. Did not test anything else.

Please Log in or Create an account to join the conversation.

More
18 Apr 2017 22:32 #91613 by islander261
Replied by islander261 on topic Adding USB Keypad
Tommy

Thank you. I don't actually have a numeric keypad clone of the standard keyboard. This is what I have:
xkeys.com/xkeys/legacy.php
I have the 20 key version. It is configured to work with my old Torchmate 3 system right now so I don't want to reprogram it as I use it almost every day. I also hope to sell the TM system to someone who needs spares when I get my Lcnc controller up and running (close).

Please Log in or Create an account to join the conversation.

Time to create page: 0.516 seconds
Powered by Kunena Forum