[LINUX] HOW-TO Sony Bluetooth BD PS3 on with on Ubuntu 9.04 and 9.10 with LIRC
#16
Has anyone had any success making keypresses stick? I.e. when I press and hold the down arrow it only counts 1 key press and scrolls down one item. It's annoying having to press it multiple times.

My bluetooth keyboard and mouse are also disabled on reboot, may have something to do with bluetooth start and stopping. I need to reconnect them every time.
Reply
#17
danish Wrote:Has anyone had any success making keypresses stick? I.e. when I press and hold the down arrow it only counts 1 key press and scrolls down one item. It's annoying having to press it multiple times.

From the README. You have to modify the gen.sh file.

Quote:Execute gen.sh in the build directory. This will run CMake, which will generate a build in build/linux. One of the CMake options for in the script is -DENABLE_REPEAT:BOOL=OFF. Set this to ON, if you want to use repeating keys.
Reply
#18
pbjr Wrote:From the README. You have to modify the gen.sh file.

Ah awesome, thanks!
Reply
#19
Exclamation 
xbmc@XBMCLive:/usr/src$ cd /usr/src/bdremote-ng-0.4/build
xbmc@XBMCLive:/usr/src/bdremote-ng-0.4/build$ sudo ./gen.sh
sudo: ./gen.sh: command not found

gen.sh: command not found Rolleyes
Reply
#20
Hi there, I am having a lot of trouble getting this remote working I hope you guys can help me. I am a newbie, so may sound stupid but please bear with me. Nothing you suggest can be too dumb. I installed XBMC from the live cd onto my hdd. It is Ubuntu 9.04.

First off when scanning for the remote, while pressing start & enter for at least 5 secs using either "hcitool scan" or "hidd --search" most of the time it does not see the remote. Only my other computer, which at least lets me know the bluetooth is working to some extent.

Secondly, when the remote is discoverable and i copy the mac address then try to use hidd --connect <mac> I can never connect. Most of the time i get the error "Can't get device information: Host is down" sometimes i get the error "Can't get device information: Software caused connection abort" I have never successfully connected via this method.

I had a little success with this older python script, http://ubuntuforums.org/showthread.php?t=1031070 (slightly modded) this connected to the remote occasionally and threw errors on button presses showing at least it was recieving the button press event.

Then i came across this thread and the bdremoteng.

Following the steps above i built and installed bdremoteng. Had to make a few changes to the process. I needed to install build-essentials and have root permissions to make the project. Then to run bdremoteng i had to chmod 777 bdremoteng. On rebooting the i still seemed to be missing "/var/run/lirc" & "/dev/lircd" so i made these.

When booting i now think that the rc.local script is not fully executing as it seems that bluetooth is still switched off, so i guess it is falling over somewhere in the script.

So anyway, any ideas you guys have would be greatly appreciated. I dont mind doing a full reinstall and taking a step by step approach. Not sure if installing from the live cd is causing me problems, just want it all to work.

Thanks in advance.
Jim
Reply
#21
xboxgame Wrote:xbmc@XBMCLive:/usr/src$ cd /usr/src/bdremote-ng-0.4/build
xbmc@XBMCLive:/usr/src/bdremote-ng-0.4/build$ sudo ./gen.sh
sudo: ./gen.sh: command not found

gen.sh: command not found Rolleyes

I had this problem, you need to install build-essentials
Code:
sudo apt-get install build-essentials

hth
Jim
Reply
#22
Quote:xbmc@XBMCLive:/usr/src$ cd /usr/src/bdremote-ng-0.4/build
xbmc@XBMCLive:/usr/src/bdremote-ng-0.4/build$ sudo ./gen.sh
sudo: ./gen.sh: command not found

gen.sh: command not found

I had this problem, you need to install build-essentials

Code:
sudo apt-get install build-essentials


i install build-essentials...but still having same problem..:confused2:
is this for xbmc-live ? i am using xbmc-live-9.11-b1
i get Wii Remote and xbox 360 controller working fine..but no luck with ps3 bd remote :mad:
Reply
#23
Just a heads up. You need to use a clean /etc/lirc/hardware.conf. The Live version is setup for MCE USB remote.

I'm working now on a Live install.

Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="None"
REMOTE_MODULES=""
REMOTE_DRIVER=""
REMOTE_DEVICE=""
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="false"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
Reply
#24
Hi,
Thanks for this wonderful guide. I got my PS3 remote working on a normal Ubuntu 9.10.
However just like mar1b0r0man it also breaks my bluetooth keyboard and mouse.
The bluetooth applet shows activity for both but I can't use them unless I do the pairing again.

Checked the bdremoteng Wiki (http://code.google.com/p/bdremote-ng/wiki/README) and the notes say it does not work with auth & encryption enabled.

Does anyone know how to disable these. It doesn't work as mentioned in the notes.
Reply
#25
bob72 Wrote:However it still does not work for me. Checking the debug output all I see in the bdremote log is 'no data on capture device' repeated over and over, and using irw shows nothing when I press keys.

Does anything else other than what you have posted here need to be done first? Should the remote be paired using some method? Any other packages required to be installed?

I've been trying other methods as well to no avail. This method looks promising, but I end up with the same problem: bdremoteng does not capture data. It looks as if the remote is not connecting to the deamon. Is there any way to debug this (sniff the bluetooth traffic or something)?

Just to be clear: I'm running a fresh XBMC Live 9.11 stable. I had to install some other stuff (build-essential and bluez-utils), otherwise I couldn't build the package and use the hcitool. I also had to pair the remote first. I tried this in several ways:

1) with 'hcitool cc AA:BB:CCBig GrinD:EE:FF' (which was succesfull, I think, but there was no feedback after running the command).
2) with the ps3_pair.py script (http://wiki.xbmc.org/index.php?title=HOW..._BD_Remote).

Also tried several combinations with bluetoothd and bdremoteng (the starting order), but none seem to make a difference.

Anyone has some input on this? It would be appreciated.

EDIT: just read something on this page: http://code.google.com/p/bdremote-ng/wiki/README (scroll down to the comment on Jan 01). He supposedly has a fix in his comment on Jan 04. I'm not able to test it right now, as I'm not at home, but maybe someone else can look into it?
Reply
#26
I figured out my problem. Apparently I had to set the bluetooth dongle link-mode to 'MASTER'. Did it like this: hciconfig hdi0 lm ACCEPT,MASTER.

I followed most of the how-to, but just for the record this is my version (on a clean XBMC Live 9.11 install) (mostly post it here for my own records):

First install the required packages (LIRC is already installed on XBMC Live):

Code:
apt-get install bluez bluez-utils build-essential cmake libbluetooth-dev

Then pair your XBMC with the ps3_pair.py script:

Code:
wget http://kitlaan.twinaxis.com/holdingcell/ps3pair.tar.gz
tar xvzf ps3pair.tar.gz
python ps3_pair.py

Press a few buttons on the remote to make it connect. Check the following script to see if 'connected' is 1.

Code:
/usr/share/doc/bluez/examples/list-devices

If not, try to set the link-mode to MASTER by running the following

Code:
hciconfig hdi0 lm ACCEPT,MASTER

It will go back to SLAVE after rebooting, but apparently that doesn't matter after the connection has worked once.

Now get bdremoteng.

Download the latest bdremoteng from http://code.google.com/p/bdremote-ng/downloads/list.

Extract the contents to /usr/src/
Code:
tar xvjf bdremote-ng-0.5.tar.bz2
cd /usr/src/bdremote-ng-0.5/build
sudo ./gen.sh
cd linux/
sudo make
cp bdremoteng /usr/local/bin/

After that I created my own /etc/rc.local since I had some issues with removing bluetooth and lirc from starting at boot (even after disabling with update-rc.d). Needed a quick fix, so here is my rc.local:

Code:
killall bluetoothd

killall lircd

sleep 1

/usr/local/bin/bdremoteng -p 8888 -a 00:23:06:ED:5B:D4 -t 20 -d -f /var/log/bdremote.log
sleep 1

/usr/sbin/bluetoothd
sleep 1


mkdir /var/run/lirc
/usr/sbin/lircd -H null --connect 127.0.0.1:8888

ln -s /var/run/lirc/lircd /dev/lircd

exit 0

Now copy the two code parts from this post: http://forum.xbmc.org/showpost.php?p=345756&postcount=2

First code part to ~/.xbmc/userdata/Lircmap.xml

Seconde code part to ~/.xbmc/userdata/remote.xml and ~/.xbmc/userdata/keymaps/remote.xml (it might work with the remote.xml only on one place, but didn't test).

Reboot and it should work.
Reply
#27
What is the best way to pair a usb bluetooth dongle with the remote?
Reply
#28
With the ps3_pair.py script. I think that the how to in this topic and the howto on the wiki should give you enough information on how to get the remote working. If you still have problems: please describe what you have tried and what exactly goes wrong.
Reply
#29
XBL. Wrote:With the ps3_pair.py script. I think that the how to in this topic and the howto on the wiki should give you enough information on how to get the remote working. If you still have problems: please describe what you have tried and what exactly goes wrong.

Followed the wiki guide and got this

Code:
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Tue Apr 20 22:38:36 2010 from 192.168.0.6
xbmc@XBMCLive:~$ sudo apt-get purge bluez
wget http://www.kernel.org/pub/linux/bluetooth/bluez-4.58.tar.gz
tar xvfz bluez-4.58.tar.gz%
Reading package lists... Done
cd bluez-4.58ndency tree... 0%
patch -p0 < ../bluez_ps3remote.diff
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=bluez --pkgversion "4.58-patched"
Building dependency tree
Reading state information... Done
Package bluez is not installed, so not removed
The following packages were automatically installed and are no longer required:
  user-setup cryptsetup wget busybox
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
xbmc@XBMCLive:~$ cd /usr/local/src
xbmc@XBMCLive:/usr/local/src$ wget http://kitlaan.twinaxis.com/holdingcell/bluez_ps3remote.diff
--2010-04-20 22:42:55--  http://kitlaan.twinaxis.com/holdingcell/bluez_ps3remote.diff
Resolving kitlaan.twinaxis.com... 66.132.144.42
Connecting to kitlaan.twinaxis.com|66.132.144.42|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30123 (29K) [text/plain]
bluez_ps3remote.diff: Permission denied

Cannot write to `bluez_ps3remote.diff' (Permission denied).
xbmc@XBMCLive:/usr/local/src$ wget http://www.kernel.org/pub/linux/bluetooth/bluez-4.58.tar.gz
--2010-04-20 22:42:56--  http://www.kernel.org/pub/linux/bluetooth/bluez-4.58.tar.gz
Resolving www.kernel.org... 130.239.17.4, 199.6.1.164
Connecting to www.kernel.org|130.239.17.4|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 972715 (950K) [application/x-gzip]
bluez-4.58.tar.gz: Permission denied

Cannot write to `bluez-4.58.tar.gz' (Permission denied).
xbmc@XBMCLive:/usr/local/src$ tar xvfz bluez-4.58.tar.gz
tar: bluez-4.58.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Exiting with failure status due to previous errors
xbmc@XBMCLive:/usr/local/src$ cd bluez-4.58
-bash: cd: bluez-4.58: No such file or directory
xbmc@XBMCLive:/usr/local/src$ patch -p0 < ../bluez_ps3remote.diff
-bash: ../bluez_ps3remote.diff: No such file or directory
xbmc@XBMCLive:/usr/local/src$ ./configure
-bash: ./configure: No such file or directory
xbmc@XBMCLive:/usr/local/src$ make
make: *** No targets specified and no makefile found.  Stop.
xbmc@XBMCLive:/usr/local/src$ sudo checkinstall --fstrans=no --install=yes --pkgname=bluez --pkgversion "4.58-patched"
sudo: checkinstall: command not found
xbmc@XBMCLive:/usr/local/src$

I'm not sure if the ps3 remote has paired with my dongle which is why i was asking what is the best method for that.

Thanks
Reply
#30
This topic is giving a different method than the one in the wiki (and imo it makes more sense and is easier). There is a topic regarding that other method as well.

According to what you have posted, you ended up not being able to install the patched bluez because the patch is not available (permission denied by the webserver). I don't see anything regarding pairing your remote. For this you will need the ps3_pair.py script here: http://kitlaan.twinaxis.com/holdingcell/ps3pair.tar.gz and use it like this:

Code:
tar xvzf ps3pair.tar.gz
python ps3_pair.py

Seeing as you removed your bluez package (the stuff that makes sure that your bluetooth is working), I don't think the script will work.

Please figure out which method you want to go with (patched bluez or bdremoteng) and choose the right topic to get more support.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO Sony Bluetooth BD PS3 on with on Ubuntu 9.04 and 9.10 with LIRC1