Thursday, February 20, 2014

install bluez 5.xx and sbc from source

The following was performed on ubuntu 13.10 and raspian on the rpi.

mkdir "a working directory of your choice"

git clone https://git.kernel.org/pub/scm/bluetooth/bluez.git
git clone https://git.kernel.org/pub/scm/bluetooth/sbc.git

cd sbc
./bootstrap-configure
(resolve any dependency issues)
make
sudo make install

cd ..
cd bluez
vim bootstrap-configure
"if you have systemd installed (most do), add the following lines to the script before the disable-datafiles line, also remove the "disable-datafiles" line and replace it with "enable-library"
--with-systemdsystemunitdir=/lib/systemd/system \
--with-systemduserunitdir=/usr/lib/systemd \
:wq (this saves the file and quits)

the bootstrap-configure file should look like the following:
_______________________________________________________________
#!/bin/sh

if [ -f config.status ]; then
        make maintainer-clean
fi

./bootstrap && \
    ./configure --enable-maintainer-mode \
                --enable-debug \
                --prefix=/usr \
                --mandir=/usr/share/man \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --enable-experimental \
                --enable-android \
                --enable-sixaxis \
                --with-systemdsystemunitdir=/lib/systemd/system \
                --with-systemduserunitdir=/usr/lib/systemd \
                --enable-library $*
_______________________________________________________________

./bootstrap-configure
(resolve any dependency issues, just "apt-get install" them)
make
sudo make install

you should now have bluez installed and it should automatically run on boot.
there may be some issues with dbus when running some scripts in "bluez/tests", so you may have to modify the file /etc/dbus-1/system.d/bluetooth.conf for a different user, or just run all the scripts as root.

If you would like to change the class of your bluetooth device, go to the following website and select the specifications for your class.
http://bluetooth-pentest.narod.ru/software/bluetooth_class_of_device-service_generator.html

Then copy your hex value into the following command:
sudo hciconfig -a hci0 class 0x200420

I entered the class 0x200420 which is a major service of Audio, a major device class of Audio/Video, with a minor device class of car audio.  Great configuration for wireless audio for the raspberry pi.  Enter the class after the power flag is on.

you can run bluetoothd with numerous plugins.  Here are just a few in one example:
sudo bluetoothd -n -E -p autopair,hostname,policy,avrcp,input,deviceinfo,scanparam

Wednesday, February 19, 2014

Iphone 5 screen replacement issues/fixes

Replacing the screen is easy thanks to icracked, really nice kit.
Anyway, if you may encounter the issue where you have no service after the screen replacement, I have the remedy.
Set the date and time manually, reboot your phone, that's it.... dumb but simple