2014-07-21, 00:06
The tarball is compressed using gzip as the driver compression programme.
Hint: Install gzip.
Good Luck Newb.
Hint: Install gzip.
Good Luck Newb.
(2014-08-09, 13:06)12Darius12 Wrote: Hi,
I recently updated my media PC so now I'm running Ubuntu 14.04.1 and I am trying to get my PS3 remote working again.
I used PS3Pair (I had a copy at http://www.dons.net.au/~darius/ps3_pair.tar.gz if anyone else needs a copy) and fiddled around and got the remote connecting. It mostly works, however I find that not all the buttons work.
Previously I had /etc/bluetooth/input.conf which remapped a few buttons but it doesn't seem to work properly anymore.
I am trying to work out how to debug it but haven't had much luck
I am not using Lirc (and wasn't previously) - just the Bluez input plugin.
Some observations..
- I see events for all buttons appear in the input node (e.g. hexdump -Cv /dev/input/eventXX shows things) for ALL buttons - not just the ones which work
- xev shows events for buttons which work but not for ones which don't
- the bluez docs are basically non existent
Any help appreciated
(2014-08-15, 04:28)panksxbmc Wrote:(2014-08-09, 13:06)12Darius12 Wrote: Some observations..
- I see events for all buttons appear in the input node (e.g. hexdump -Cv /dev/input/eventXX shows things) for ALL buttons - not just the ones which work
- xev shows events for buttons which work but not for ones which don't
- the bluez docs are basically non existent
Any help appreciated
I want to do the same thing with ubuntu 12.xx .. could you guide me or direct me to the guide that you used to connect the ps3 to my desktop.. Need some infor for the same.
Guide the newbie..
(2014-08-15, 04:28)panksxbmc Wrote:(2014-08-09, 13:06)12Darius12 Wrote: Some observations..
- I see events for all buttons appear in the input node (e.g. hexdump -Cv /dev/input/eventXX shows things) for ALL buttons - not just the ones which work
- xev shows events for buttons which work but not for ones which don't
- the bluez docs are basically non existent
I want to do the same thing with ubuntu 12.xx .. could you guide me or direct me to the guide that you used to connect the ps3 to my desktop.. Need some infor for the same.
Guide the newbie..
(2014-08-15, 04:41)12Darius12 Wrote:(2014-08-15, 04:28)panksxbmc Wrote:(2014-08-09, 13:06)12Darius12 Wrote: Some observations..
- I see events for all buttons appear in the input node (e.g. hexdump -Cv /dev/input/eventXX shows things) for ALL buttons - not just the ones which work
- xev shows events for buttons which work but not for ones which don't
- the bluez docs are basically non existent
Any help appreciated
I want to do the same thing with ubuntu 12.xx .. could you guide me or direct me to the guide that you used to connect the ps3 to my desktop.. Need some infor for the same.
Guide the newbie..
I discovered the problem - changes to the bluetooth stack mean that you can no longer remap events that way so events go into the kernel with key codes above 255.
X can't handle such codes and ignores them, unfortunately there is no full solution (yet) because it's a limitation in the X protocol.
There is however a patched version of the evdev X11 input driver at http://www.thenautilus.net/SW/xf86-input-evdev/
I use this to remap the keys I want to ones below 255 so X can see them. Kinda tedious but unfortunately there is no other way currently (AFAIK).
I tried using LIRC as a re-mapper - it worked, however it did not generate repeated key press events for the remote which made it even less useful.
(2014-08-15, 04:28)panksxbmc Wrote:(2014-08-09, 13:06)12Darius12 Wrote: Some observations..
- I see events for all buttons appear in the input node (e.g. hexdump -Cv /dev/input/eventXX shows things) for ALL buttons - not just the ones which work
- xev shows events for buttons which work but not for ones which don't
- the bluez docs are basically non existent
I want to do the same thing with ubuntu 12.xx .. could you guide me or direct me to the guide that you used to connect the ps3 to my desktop.. Need some infor for the same.
Guide the newbie..
Actually, if you just want to connect then the XBMC wiki has a how to on it - I am not sure if Ubuntu 12 supports the bluetooth input mapping, or if you need the evdev patches I posted above.
(2014-08-15, 22:55)jamesbe Wrote: Could you please post more details on this? I'm trying to get mythtv to work with my PS3 remote and it currently only works with the D-pad and the number keys. XBMC seems to work a little better, play / stop work as well and the PS button but not much else.
I would really like to just remap all the keys to normal keyboard buttons and then I'll do a remap with my harmony remote so it makes sense to the family when using the remote. I just installed 14.04 and this is yet another stumbling block it seems. I've had nothing but problems with the IR remotes ARGH.
(2014-08-15, 22:55)jamesbe Wrote: Could you please post more details on this? I'm trying to get mythtv to work with my PS3 remote and it currently only works with the D-pad and the number keys. XBMC seems to work a little better, play / stop work as well and the PS button but not much else.
I would really like to just remap all the keys to normal keyboard buttons and then I'll do a remap with my harmony remote so it makes sense to the family when using the remote. I just installed 14.04 and this is yet another stumbling block it seems. I've had nothing but problems with the IR remotes ARGH.
sudo apt-get install git automake autoconf pkg-config xcb-proto xutils-dev libtool xserver-xorg-dev libudev-dev evtest
git clone git://www.thenautilus.net/xf86-input-evdev
cd xf86-input-evdev
git pull git://www.thenautilus.net/xf86-input-evdev code-remap-2.8.2
./autogen.sh
make
sudo mv /usr/lib/xorg/modules/input/evdev_drv.so /usr/lib/xorg/modules/input/evdev_drv.so.orig
sudo cp ./src/.libs/evdev_drv.so /usr/lib/xorg/modules/input/evdev_drv.so
Section “InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*”
MatchProduct "PS3 Remote Controller"
Driver "evdev"
# Remap list
# R1/2/3 (311/313/318) to F8/F9/F10 => vol up/down/mute
# Option (353) to c => context
# Clear (355) to w => toggle watched
# Display/Info (358) to i => info
# Start (315) to s => shutdown menu
Option "event_key_remap" "311=76 313=75 318=74 353=23 357=54 353=23 355=77 358=31 315=39"
EndSection
I: Bus=0005 Vendor=054c Product=0306 Version=0000
N: Name="PS3 Remote Controller"
P: Phys=
S: Sysfs=/devices/virtual/input/input71
U: Uniq=
H: Handlers=kbd event22
B: PROP=0
B: EV=3
B: KEY=8000000000000000 7000001083c100 8c00ea00000000 6bc0000000000001 8000 1102c0000801 80168000000000 10000ffe
Event: time 1409268216.091763, type 1 (EV_KEY), code 315 (BTN_START), value 1
Event: time 1409268216.091763, -------------- SYN_REPORT ------------
Event: time 1409268216.439260, type 1 (EV_KEY), code 315 (BTN_START), value 0
Event: time 1409268216.439260, -------------- SYN_REPORT ------------
KeyRelease event, serial 32, synthetic NO, window 0xc00001,
root 0x273, subw 0xc00002, time 88910611, (43,45), root:(43,84),
state 0x0, keycode 39 (keysym 0x73, s), same_screen YES,
XLookupString gives 1 bytes: (73) "s"
XFilterEvent returns: False
Section “InputClass"
MatchDevicePath "/dev/input/event*”
(2014-09-09, 17:02)chriswhat21 Wrote: Thank you Darius. That was a bit of a pain, but it worked. One quick note that kept my X from starting though. In your /usr/share/X11/xorg.conf.d/99-evdev.conf, the first “ in this line
and the last “ in this lineCode:Section “InputClass"
need to be replaced with ". " was probably autoformatted to “ somewhere.Code:MatchDevicePath "/dev/input/event*”
Also, the IdleTimeout from the old input.conf doesn't seem to do anything, so my batteries died. I've added "/usr/bin/bt-device --disconnect 00:21:4F:A6:3A:30" to a cron job every 10 minutes. Is there a better way to do this? A way to run a script that will sleep 600 then disconnect after the remote connects?
#!/bin/sh
exec /home/myth/bin/bt-disconnect-all.py
#!/bin/sh
case $1 in
hibernate|suspend)
/home/mythtv/bin/bt-disconnect-all.py
;;
thaw|resume)
;;
*)
;;
esac
#!/usr/bin/python
import sys, re
import dbus
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-i", "--device", action="store", type="string", dest="dev_id")
(options, args) = parser.parse_args()
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager")
if options.dev_id:
adapter_path = manager.FindAdapter(options.dev_id)
else:
adapter_path = manager.DefaultAdapter()
adapter = dbus.Interface(bus.get_object("org.bluez", adapter_path), "org.bluez.Adapter")
for path in adapter.ListDevices():
device = dbus.Interface(bus.get_object("org.bluez", path), "org.bluez.Device")
properties = device.GetProperties()
if properties['Connected']:
print "Disconnecting %s [%s]..." % (properties['Address'], properties['Name']),
try:
device.Disconnect()
print "done"
except Exception, e:
print "error (%s)" % str(e)
<global>
<mouse>
<leftclick>x</leftclick>
</mouse>
</global>
#Remap PS3 X key which is seen as mousebutton
"xte 'key X'"
b:1 + release
<global>
<mouse>
<leftclick>Stop</leftclick>
</mouse>
</global>