PS4 help

More
06 Feb 2021 21:27 #197872 by Tady
PS4 help was created by Tady
Hello
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
The last entry is the one I need. But if I use
loadusr -W hal_input -KRAL Controller
HAL selects the first found entry

The one that works currently is
loadusr -W hal_input -KRAL 16
But that can change during reboots

I did find a section in the documentation that should work by specifying a number
:N
But I don't know how to correctly use it

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.

More
08 Feb 2021 23:50 #198099 by andypugh
Replied by andypugh on topic PS4 help
I _think_ you can use any word in the name, so try "Motion" or "Sensors"

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

More
09 Feb 2021 06:39 #198121 by Tady
Replied by Tady on topic PS4 help
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

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

More
09 Feb 2021 09:03 - 09 Feb 2021 09:03 #198129 by andypugh
Replied by andypugh on topic PS4 help
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.
Last edit: 09 Feb 2021 09:03 by andypugh.

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

More
09 Feb 2021 19:13 #198185 by Tady
Replied by Tady on topic PS4 help
loadusr -WN temp -KRAL "Controller"
Throws
Loadusr: invalid option - - 'N'

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

More
09 Feb 2021 20:56 #198200 by andypugh
Replied by andypugh on topic PS4 help

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

More
10 Feb 2021 19:28 #198315 by Tady
Replied by Tady on topic PS4 help
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?

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

More
10 Feb 2021 19:57 #198319 by andypugh
Replied by andypugh on topic PS4 help
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

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

More
11 Feb 2021 14:28 #198399 by Tady
Replied by Tady on topic PS4 help
Now it complains. Waiting for component temp to become ready
If I remove - W it throws another error. It doesn't like it without the W

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

More
11 Feb 2021 14:43 - 11 Feb 2021 14:44 #198403 by andypugh
Replied by andypugh on topic PS4 help
Does it get bored of waiting? Some wait is to be expected.
You might have to expand any udev changes to include the other devices.

What _are_ the other devices?
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.309 seconds
Powered by Kunena Forum