PS4 help
06 Feb 2021 21:27 #197872
by Tady
Hello
I'm trying to connect my PS4 controller to LinuxCNC with HAL_Input
gives me ...The last entry is the one I need. But if I useHAL selects the first found entry
The one that works currently isBut that can change during reboots
I did find a section in the documentation that should work by specifying a numberBut I don't know how to correctly use it
Also in some examples people use stings with spaces in between
But it seems only the last string is valid?
Thank you
I'm trying to connect my PS4 controller to LinuxCNC with HAL_Input
less /proc/bus/input/devices
gives me ...
I: Bus=0005 Vendor=054c Product=09cc Version=8100
N: Name="Wireless Controller Touchpad"
P: Phys=e0:2a:82:d4:4a:3e
S: Sysfs=/devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/bluetooth/hci0/hci0:11/0005:054C:09CC.0003/input/input17
U: Uniq=1c:a0:b8:86:b3:3a
H: Handlers=mouse2 event14
B: PROP=5
B: EV=b
B: KEY=2420 10000 0 0 0 0
B: ABS=260800000000003
I: Bus=0005 Vendor=054c Product=09cc Version=8100
N: Name="Wireless Controller Motion Sensors"
P: Phys=e0:2a:82:d4:4a:3e
S: Sysfs=/devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/bluetooth/hci0/hci0:11/0005:054C:09CC.0003/input/input18
U: Uniq=1c:a0:b8:86:b3:3a
H: Handlers=event15
B: PROP=40
B: EV=19
B: ABS=3f
B: MSC=20
I: Bus=0005 Vendor=054c Product=09cc Version=8100
N: Name="Wireless Controller"
P: Phys=e0:2a:82:d4:4a:3e
S: Sysfs=/devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/bluetooth/hci0/hci0:11/0005:054C:09CC.0003/input/input16
U: Uniq=1c:a0:b8:86:b3:3a
H: Handlers=event16 js1
B: PROP=0
B: EV=20001b
B: KEY=7fdb000000000000 0 0 0 0
B: ABS=3003f
B: MSC=10
B: FF=107030000 0
loadusr -W hal_input -KRAL Controller
The one that works currently is
loadusr -W hal_input -KRAL 16
I did find a section in the documentation that should work by specifying a number
:N
Also in some examples people use stings with spaces in between
loadusr -W hal_input -KRAL Wireless Controller
But it seems only the last string is valid?
Thank you
Please Log in or Create an account to join the conversation.
09 Feb 2021 06:39 #198121
by Tady
The thing is that Sony made stupid naming.. The last entry is the correct one and if you take a look it only says Wireless controller
The first two use the sam string.. So if I use wireless or controller Hal_input always picks the first entry.
That is why I am asking on how to select the third option.
For now I am using the event number. But that can change on reboots
The first two use the sam string.. So if I use wireless or controller Hal_input always picks the first entry.
That is why I am asking on how to select the third option.
For now I am using the event number. But that can change on reboots
Please Log in or Create an account to join the conversation.
09 Feb 2021 09:03 - 09 Feb 2021 09:03 #198129
by andypugh
Sorry, I hadn't realised that there were three entries in the code box.
I wonder if this will work?
loadusr -WN temp -KRAL "Controller"
loadusr -WN temp2 -KRAL "Controller"
loadusr -WN joypad -KRAL "Controller"
unload temp
unload temp2
I have tried to find out if there is a way to force an exact match, but I haven't even managed to find out where linux_event is from. (in the hal_input source code)
Does the event number _actually_ change with a reboot? One solution if it does might be to have a small Python wrapper programme that looks through /dev for an exact name match, extracts the event number and loads the component by number.
I wonder if this will work?
loadusr -WN temp -KRAL "Controller"
loadusr -WN temp2 -KRAL "Controller"
loadusr -WN joypad -KRAL "Controller"
unload temp
unload temp2
I have tried to find out if there is a way to force an exact match, but I haven't even managed to find out where linux_event is from. (in the hal_input source code)
Does the event number _actually_ change with a reboot? One solution if it does might be to have a small Python wrapper programme that looks through /dev for an exact name match, extracts the event number and loads the component by number.
Last edit: 09 Feb 2021 09:03 by andypugh.
Please Log in or Create an account to join the conversation.
10 Feb 2021 19:28 #198315
by Tady
Nope throws an error
loadusr -Wn temp -KRAL Controller
loadusr -Wn temp2 -KRAL Controller
loadusr -W hal_input -KRAL Controller
unload temp
unload temp2
loadusr: invalid option -- 'K'
Shutting down and cleaning up LinuxCNC...
I'm using 2.9 and I really don't understand temp and temp2.. Are these components in LinuxCNC?
loadusr -Wn temp -KRAL Controller
loadusr -Wn temp2 -KRAL Controller
loadusr -W hal_input -KRAL Controller
unload temp
unload temp2
loadusr: invalid option -- 'K'
Shutting down and cleaning up LinuxCNC...
I'm using 2.9 and I really don't understand temp and temp2.. Are these components in LinuxCNC?
Please Log in or Create an account to join the conversation.
10 Feb 2021 19:57 #198319
by andypugh
You can load a component with a custom name.
What I am trying to do is to load the component three times, then unload the first two, hopefully leaving the one that you want.
I think I see where it is going wrong, I forgot to tell the system _what_ to load.
loadusr -Wn temp hal_input -KRAL Controller
loadusr -Wn temp2 hal_input -KRAL Controller
loadusr -Wn keep_me hal_input -KRAL Controller
unload temp
unload temp2
What I am trying to do is to load the component three times, then unload the first two, hopefully leaving the one that you want.
I think I see where it is going wrong, I forgot to tell the system _what_ to load.
loadusr -Wn temp hal_input -KRAL Controller
loadusr -Wn temp2 hal_input -KRAL Controller
loadusr -Wn keep_me hal_input -KRAL Controller
unload temp
unload temp2
Please Log in or Create an account to join the conversation.
11 Feb 2021 14:43 - 11 Feb 2021 14:44 #198403
by andypugh
Last edit: 11 Feb 2021 14:44 by andypugh.
Please Log in or Create an account to join the conversation.
Time to create page: 0.283 seconds