- Posts: 105
- Thank you received: 0
PS4 help
5 years 8 months ago #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 use
HAL selects the first found entry
The one that works currently is
But that can change during reboots
I did find a section in the documentation that should work by specifying a number
But 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
Code:
less /proc/bus/input/devices
gives me ...
Code:
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
Code:
loadusr -W hal_input -KRAL Controller
The one that works currently is
Code:
loadusr -W hal_input -KRAL 16
I did find a section in the documentation that should work by specifying a number
Code:
:N
Also in some examples people use stings with spaces in between
Code:
loadusr -W hal_input -KRAL Wireless Controller
But it seems only the last string is valid?
Thank you
Please Log in to join the conversation.
5 years 8 months ago #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 to join the conversation.
5 years 8 months ago #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.
Please Log in to join the conversation.
5 years 8 months ago #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 to join the conversation.
5 years 8 months ago #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 to join the conversation.
Time to create page: 4.345 seconds
