WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156
Hi all.

I have been very busy, last few months creating my new Preamp., with raspberry pi buildin.

I allway's end up with some diy hifi equipment, with lots of features and boxes, with power switches  :)... So i wanted something simple this time, which is easy for also my kids and wife to use.

This preamp, has no but a powerswitch at back, turning everything on with just one click. -When preamp. turns on, it automatic turns on my poweramp. -So piCore is the only usefull system, for such a system i guess  8)

So, while enjoying radio/music/streams, i thought it would be fun to have a bluetooth attached also, so i found one and plugged in the last spare usb-port of the PI.

I posted some quistions at another topic http://forum.tinycorelinux.net/index.php/topic,17945.0.html.
But i think it would be better to open up a new thread on this.

This i installed from tce :

Quote
tce - Tiny Core Extension browser

    1. bluetooth-3.12.36-piCore+.tcz
    2. bluez-hcidump-doc.tcz
    3. bluez-hcidump.tcz

But i need other tools, like bluez, bluez-utils, bluez-tools, blues-alsa etc...

Well i will wait and see, if someone chimes in here.




Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10111
You can find the corepure64 instructions to compile bluez here:

http://www.tinycorelinux.net/6.x/x86_64/tcz/src/bluez/compile_bluez

..it should be relatively easy to modify these for your purposes.

Note that it is awkward to use bluetooth with alsa alone, but much easier to use it with pulseaudio at the cost of a lot of bloat.
« Last Edit: April 11, 2015, 05:08:23 AM by Juanito »

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156
Thank.. Will look into this.


Sent from my iPhone using Tapatalk

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156
 :) Apperantly i connot make it!

I think i need the GLIB2 >= 2.28... Maybe Bela' have an idea of why it does not compile.

Quote
tc@PlayBox:~/bluetooth/bluez-5.30$ ls
AUTHORS           Makefile.am       README            btio/             config.sub        emulator/         missing           test/
BAK-config.log    Makefile.in       TODO              client/           configure         gdbus/            monitor/          tools/
COPYING           Makefile.obexd    acinclude.m4      compile           configure.ac      gobex/            obexd/            unit/
COPYING.LIB       Makefile.plugins  aclocal.m4        config.guess      configure.lineno  install-sh        plugins/
ChangeLog         Makefile.tools    android/          config.h.in       depcomp           lib/              profiles/
INSTALL           NEWS              attrib/           config.log        doc/              ltmain.sh         src/
tc@PlayBox:~/bluetooth/bluez-5.30$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... none
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for pkg-config... no
checking for C/C++ restrict keyword... __restrict
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether gcc accepts -fPIE... yes
checking build system type... armv6l-unknown-linux-gnueabihf
checking host system type... armv6l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm -B
checking the name lister (/usr/local/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/local/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/local/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/local/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for signalfd... yes
checking for clock_gettime in -lrt... yes
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking linux/if_alg.h usability... yes
checking linux/if_alg.h presence... yes
checking for linux/if_alg.h... yes
checking for GLIB... no
configure: error: GLib >= 2.28 is required
tc@PlayBox:~/bluetooth/bluez-5.30$

Rgds; Jesper

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9862
You need to install pkg-config, and maybe other packages.
The only barriers that can stop you are the ones you create yourself.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156
So.

I created pkg-config from this source http://pkgconfig.freedesktop.org/releases/

It compiled without problems, and therefore i created a .tcz for the sake of it. (Only pkg-config.list here, due to attachment size  :))

I loaded it, and tried to run ./configure on my bluez 5.30 once more, but no change. -Compiler stops at same error.

Rgds; Jesper.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156

So.

I now loaded my newly build pkg-config.tzc, and did export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig.

Now ./configure finds the GLIB  :)

It now stops at another error? -As i think udev is complicated, it might be hard to go pass this error.

What i have loaded is this :

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


Commandline snippet :

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 udev directory... configure: error: udev directory is required

Rgds; Jesper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10111
If you compile pkg-config with:
Code: [Select]
--with-pc-path="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/share/pkgconfig"..you won't need to set $PKG_CONFIG_PATH everytime.

Are /etc/udev/rules.d and /lib/udev present?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9862
There's a pre-existing pkg-config extension, as well.
The only barriers that can stop you are the ones you create yourself.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156
Juanito .

Quote
Are /etc/udev/rules.d and /lib/udev present?

Yes  :)

tc@PlayBox:~/bluetooth/bluez-5.30$ ls -all /etc/udev/rules.d
total 56
drwxrwxr-x    2 root     staff          340 Jan  1  1970 ./
drwxrwxr-x    3 root     staff           60 Jan  1  1970 ../
-rw-rw-r--    1 root     staff          764 Jan 14 08:17 42-qemu-usb.rules
-rw-rw-r--    1 root     staff          277 Jan 14 08:17 50-firmware.rules
-rw-rw-r--    1 root     staff         3831 Jan 14 08:17 50-udev-default.rules
-rw-rw-r--    1 root     staff          167 Jan 14 08:17 55-tc.rules
-rw-rw-r--    1 root     staff          104 Jan 14 08:17 56-lsusb.rules
-rw-rw-r--    1 root     staff          308 Jan 14 08:17 60-cdrom_id.rules
-rw-rw-r--    1 root     staff          616 Jan 14 08:17 60-persistent-alsa.rules
-rw-rw-r--    1 root     staff         2400 Jan 14 08:17 60-persistent-input.rules
-rw-rw-r--    1 root     staff          947 Jan 14 08:17 60-persistent-serial.rules
-rw-rw-r--    1 root     staff         2669 Jan 14 08:17 60-persistent-storage.rules
-rw-rw-r--    1 root     staff          239 Jan 14 08:17 75-cd-dvd.rules
-rw-rw-r--    1 root     staff          657 Jan 14 08:17 80-drivers.rules
lrwxrwxrwx    1 root     root            49 Jan  1  1970 90-alsa-restore.rules -> /usr/local/etc/udev/rules.d/90-alsa-restore.rules
-rw-rw-r--    1 root     staff          155 Jan 14 08:17 95-udev-late.rules
-rw-rw-r--    1 root     staff          294 Jan 14 08:17 98-tc.rules
tc@PlayBox:~/bluetooth/bluez-5.30$ ls -all /lib/udev
total 4
drwxrwxr-x    2 root     staff           60 Jan  1  1970 ./
drwxr-xr-x    4 root     root          1060 Jan 31 17:29 ../
-rwxrwxr-x    1 root     staff          568 Jan 14 08:17 firmware.sh

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10111
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #10 on: April 12, 2015, 03:19:30 AM »
Then I guess you'll need to look in config.log to see why you get this:
Code: [Select]
checking udev directory... configure: error: udev directory is required

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #11 on: April 12, 2015, 03:26:25 AM »
Hi.

Not much :

Quote
configure:13415: checking udev directory
configure:13419: error: udev directory is required

Rgds; Jesper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10111
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #12 on: April 12, 2015, 05:18:46 AM »
How about line 13419 of the configure script?

Offline lykkedk

  • Full Member
  • ***
  • Posts: 156
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #13 on: April 12, 2015, 06:08:13 AM »
Hi back...

First of, the link you gave me earlier, with instructions for compiling on core64, the line with
tce-load -i dbus-glib-dev libical-dev readline-dev udev-lib-dev

I better tell, that both libical-dev and udev-lib-dev is nonexistant on piCore (will try to build later maybee)

If i --disable -with udev, in configure, the scripts end at missing libical.

Anyway, you asked about line 13419  :)

Line 13419 is where the * is  :)

Quote
# Check whether --with-udevdir was given.
if test "${with_udevdir+set}" = set; then :
  withval=$with_udevdir; path_udevdir=${withval}
fi

if (test "${enable_udev}" != "no" && test -z "${path_udevdir}"); then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking udev directory" >&5
$as_echo_n "checking udev directory... " >&6; }
        path_udevdir="`$PKG_CONFIG --variable=udevdir udev`"
        if (test -z "${path_udevdir}"); then
        *       as_fn_error $? "udev directory is required" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${path_udevdir}" >&5
$as_echo "${path_udevdir}" >&6; }
fi
UDEV_DIR=${path_udevdir}




Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10111
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #14 on: April 12, 2015, 06:16:32 AM »
I guess it's called libudev-dev rather than udev-lib-dev in the raspberry repo and I'd also guess there's a ./configure switch to disable libical (check "./configure --help").

Do you have libudev-dev loaded?