WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer  (Read 31389 times)

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #15 on: April 12, 2015, 06:44:45 AM »
Thanks again  :)

Yes libudev is loaded...

I will try to disable libical later today, thanks... but configure still stops at udev directory, if i not disable it... do i need udev ???


here is what i load, when i login to the PI :

Quote
jesper@jlp:~$ ssh tc@192.168.1.108
tc@192.168.1.108's password:

libudev-dev is already installed!
squashfs-tools is already installed!
dbus-glib-dev is already installed!
readline-dev is already installed!
glib2-locale is already installed!
glib2-python is already installed!
glib2-dev is already installed!
mc is already installed!
nano is already installed!
zip is already installed!
bluetooth-3.12.36-piCore+ is already installed!
bluez-hcidump is already installed!
usbutils is already installed!
compile-essentials is already installed!
linux-3.12.y_api_headers is already installed!
/home/tc/pkg-config is already installed!

All programs loaded now ... Enjoy!

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #16 on: April 12, 2015, 08:11:13 AM »
Good news!

./configure --prefix=/usr/local --with-udevdir=/etc/udev - SUCCESS!

Quote
checking for GLIB... yes
checking for DBUS... yes
checking D-Bus configuration directory... /usr/local/etc
checking D-Bus system bus services dir... /usr/local/share/dbus-1/system-services
checking D-Bus session bus services dir... /usr/local/share/dbus-1/services
checking for UDEV... yes
checking for udev_hwdb_new in -ludev... no
checking for ICAL... no
configure: error: libical is required

Rgds; Jesper.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #17 on: April 12, 2015, 11:18:33 AM »
 :) Evening...

So i have compiled and created a libical.tcz succesfully.
So when running configure, as pasted below, configure ends with no error.

But make, gives the error (Se below)

Quote
./configure --prefix=/usr/local --disable-static --localstatedir=/var --libexecdir=/usr/local/lib --disable-systemd
--enable-library --with-udevdir=/etc/udev

MAKE Error :
Quote
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
/usr/local/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
Makefile:3518: recipe for target 'client/bluetoothctl' failed
make[1]: *** [client/bluetoothctl] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:2718: recipe for target 'all' failed
make: *** [all] Error 2

I found this thread regarding readline / ncurses, witch i have installed.
http://forum.tinycorelinux.net/index.php?topic=15251.0

But i can't seem to find a way to get pass this error

Rgds; Jesper.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #18 on: April 12, 2015, 09:26:31 PM »
SUCCESS  ;)

Thanks all... so far i have compiled and installed libical, pkg-config, and bluez-5.30 (Had to "patch" 5-7 lines with -lncurses)

I will continue later, today when back from home experiemental !

Quote
tc@PlayBox:~$ lsusb
Bus 001 Device 005: ID 20b1:2009 XMOS Ltd
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. SMC9512/9514 USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
tc@PlayBox:~$
tc@PlayBox:~$ hciconfig scan
hci0:   Type: BR/EDR  Bus: USB
   BD Address: 00:1A:7D:DA:71:15  ACL MTU: 310:10  SCO MTU: 64:8
   UP RUNNING PSCAN ISCAN
   RX bytes:2713 acl:0 sco:0 events:69 errors:0
   TX bytes:811 acl:0 sco:0 commands:63 errors:0

tc@PlayBox:~$ hcitool scan
Scanning ...
   xx:xx:xx:xx:xx:1D   iPhone
tc@PlayBox:~$

Good Morning; Jesper.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #19 on: April 14, 2015, 07:23:40 AM »
So i am near now.

Patched Makefile.in, and export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig etc... etc.. etc..
./configure and make runs fine!

I have created a bluez-5.30.tcz, which is loading fine.
But i miss something.

I have only done the ::

mkdir /home/tc/package
make DESTDIR=/home/tc/package install
And then cd /home/tc, mksquashfs package bluez-5.30.tcz


How do i include this BELOW in my .tcz ???

Quote
sudo install -dm755 /usr/local/etc/bluetooth
sudo install -m644 src/main.conf /usr/local/etc/bluetooth/main.conf
sudo install -m644 profiles/input/input.conf /usr/local/etc/bluetooth/input.conf
sudo install -m644 profiles/network/network.conf /usr/local/etc/bluetooth/network.conf
sudo install -m644 profiles/proximity/proximity.conf /usr/local/etc/bluetooth/proximity.conf


Here is what i was suggested to use for install

Quote
tce-load -i dbus-glib-dev libical-dev readline-dev udev-lib-dev

cd bluez-5.28

patch -Np1 -i ../bluez-5.28-obexd_without_systemd-1.patch

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --libexecdir=/usr/local/lib --disable-systemd --enable-library

find . -name Makefile -type f -exec sed -i 's/-O2//g' {} \;

make
sudo make install

sudo install -dm755 /usr/local/etc/bluetooth
sudo install -m644 src/main.conf /usr/local/etc/bluetooth/main.conf
sudo install -m644 profiles/input/input.conf /usr/local/etc/bluetooth/input.conf
sudo install -m644 profiles/network/network.conf /usr/local/etc/bluetooth/network.conf
sudo install -m644 profiles/proximity/proximity.conf /usr/local/etc/bluetooth/proximity.conf

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #20 on: April 14, 2015, 08:07:25 AM »
Hi lykkedk
Quote
How do i include this BELOW in my .tcz
Create the directory:
Code: [Select]
package/usr/local/tce.installed/Place your commands in a file called:
Code: [Select]
bluez-5.30and save it in that directory.
You can look in:
Code: [Select]
/usr/local/tce.installed/for examples of what other extensions do.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #21 on: April 14, 2015, 09:05:08 AM »
don't forget:
Code: [Select]
$ sudo chmod 775 /usr/local/tce.installed
$ sudo chown root:staff /usr/local/tce.installed

You'll also need an /usr/local/etc/init.d/bluez script - you can copy it and the start-up script from the bluez extension in the x86 repo (and please feel free to add improvements).
« Last Edit: April 14, 2015, 09:07:42 AM by Juanito »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #22 on: April 14, 2015, 09:19:42 AM »
You might also want to check if /usr/local/share/dbus-1/services/org.bluez.obex.service was installed - it wasn't installed by bluez-5.28 and it is required for obex file transfer to work.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #23 on: April 14, 2015, 10:26:31 AM »
Thanks all  :)

Thanks i am working hard to get it going right now !

 8)

Rgds; Jesper.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #24 on: April 16, 2015, 08:18:49 AM »
So... here i am now  :)

BlueZ-5.30.tcz created succesfully, and everything is running with minimal .deps

Next step is to use it with pulseaudio, but i need (I think??) the "pulseaudio-module-bluetooth"
The prebuild pulseaudio 5, does not contain that, so i tried to compile pulseaudio myself.
./configure runs fine, but does not contain BlueZ 5...

Any hint's, it seems hard to find documentation about, what must be, for the bluetoot-pulseaudio to be build

Rgds; Jesper.

Quote
---{ pulseaudio 6.0 }---

    prefix:                        /usr/local
    sysconfdir:                    ${prefix}/etc
    localstatedir:                 /var
    modlibexecdir:                 ${exec_prefix}/lib/pulse-6.0/modules
    System Runtime Path:           /var/run/pulse
    System State Path:             /var/lib/pulse
    System Config Path:            /var/lib/pulse
    Zsh completions directory:     ${datarootdir}/zsh/site-functions
    Compiler:                      gcc -std=gnu99
    CFLAGS:                        -g -O2 -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
    CPPFLAGS:                      -DFASTPATH -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
    LIBS:                          -lgdbm -lcap -lpthread -lrt -ldl -lm

    Enable X11:                    no
    Enable OSS Output:             yes
    Enable OSS Wrapper:            yes
    Enable EsounD:                 yes
    Enable Alsa:                   yes
    Enable CoreAudio:              no
    Enable Solaris:                no
    Enable WaveOut:                no
    Enable GLib 2.0:               yes
    Enable Gtk+ 3.0:               no
    Enable GConf:                  no
    Enable Avahi:                  no
    Enable Jack:                   yes
    Enable Async DNS:              no
    Enable LIRC:                   no
    Enable Xen PV driver:          no
    Enable D-Bus:                  yes
      Enable BlueZ 4:              no
      Enable BlueZ 5:              no
        Enable ofono headsets:     no
        Enable native headsets:    no
    Enable udev:                   yes
      Enable HAL->udev compat:     yes
    Enable systemd
      Daemon (Socket Activation):  no
      Login (Session Tracking):    no
      Journal (Logging):           no
    Enable TCP Wrappers:           no
    Enable libsamplerate:          no
    Enable IPv6:                   yes
    Enable OpenSSL (for Airtunes): yes
    Enable fftw:                   no
    Enable orc:                    yes
    Enable Adrian echo canceller:  yes
    Enable speex (resampler, AEC): yes
    Enable WebRTC echo canceller:  no
    Enable gcov coverage:          no
    Enable unit tests:             no
    Database
      tdb:                         no
      gdbm:                        yes
      simple database:             no

    System User:                   pulse
    System Group:                  pulse
    Access Group:                  pulse-access
    Enable per-user EsounD socket: yes
    Force preopen:                 yes
    Preopened modules:             all

    Legacy Database Entry Support: yes


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #25 on: April 16, 2015, 09:02:24 AM »
This worked for me:

http://www.tinycorelinux.net/5.x/x86_64/tcz/src/pulseaudio5/compile_pulseaudio

Did you check config.log to see why the ./configure script did not find bluez?

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #26 on: April 16, 2015, 11:45:22 AM »
 :) Thanks again pal!

I am working (or my PI does) compiling the pulseaudio

I am having some problems with x and startup the pulseaudio daemon. (I use no X on my headless PI)

Will report back, when i got some progress.

Rgds; Jesper.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #27 on: April 17, 2015, 09:33:28 AM »
 :) hmm...

Nothing seems to work right now.

Pulseaudio both 5 and 6 seems to be using far to much cpu-power (~50%) so no go pulseaudio.

So i tried to compile the Bluez4 for using ALSA with bluetooth audio stream, but i cannot find any documentation?

I cant even made bluez4 start.. Complains about some dbus things  ::)

Anyone with working bluetooth streaming ??

Rgds; Jesper

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #28 on: April 17, 2015, 10:25:39 PM »
You can start pulseaudio with "pulseaudio -vv" to look for the problem. I seem to recall that I had to comment something out in one of the *conf files.

You could compare with the conf files in the x86 extension.
« Last Edit: April 18, 2015, 03:58:00 AM by Juanito »

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #29 on: April 18, 2015, 05:17:30 AM »
Thanks .. But i think i have to go the BlueZ4 way for success!

I managed to make bluez4 start as daemon now, but i have now discovered that i need some python things to use the supplied scripts.

When i try to start simple-agent, i got this error :

I dont know howto solve this ?

Quote
tc@PlayBox:~/bluez-4.101/test$ ./simple-agent
Traceback (most recent call last):
  File "./simple-agent", line 5, in <module>
    from gi.repository import GObject
ImportError: No module named gi.repository