WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #45 on: April 19, 2015, 02:48:57 AM »
 :) Soo, as Bela' said there was a .dep typo.

So now, i got pass the other fault.

first load the pygobject :

Quote
tc@PlayBox:~$ tce-load -i pygobject
readline.tcz: OK
python.tcz: OK
gobject-introspection.tcz: OK
pixman.tcz: OK
cairo.tcz: OK
pycairo.tcz: OK
pygobject.tcz: OK

So trying again the simple-agent :

Quote
tc@PlayBox:~/bluez-4.101/test$ python simple-agent
Traceback (most recent call last):
  File "simple-agent", line 8, in <module>
    import dbus
ImportError: No module named dbus

Seems endless .. haha

Rgds; Jesper

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #46 on: April 19, 2015, 02:58:08 AM »
True, no python dbus module in the repo.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #47 on: April 19, 2015, 03:00:12 AM »
 :).. I am trying to compile it now!

make is running right now... donno if i can make it  :)

Will report back!

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #48 on: April 19, 2015, 03:38:45 AM »
 :) Soo ... lucky me i guess...

dbus-python compiled fine, so i created dbus-python.tcz, which also loads fine.

Now i can run sudo python simple-agent  8)

Quote
tc@PlayBox:~/bluez-4.101/test$ sudo python simple-agent
Agent registered
Authorize (/org/bluez/2642/hci0/dev_xxxxxxxx_1D, 0000110c-0000-1000-8000-00805f9b34fb)
Authorize connection (yes/no): yes

Actually i can pair/connect now...

Quote
tc@PlayBox:~/bluez-4.101/test$ sudo python list-devices
[ /org/bluez/2642/hci0 ]
    Name = PlayBox-0
    Powered = 1
    Devices = dev_7xxxxxxxxxx_1D
    DiscoverableTimeout = 0
    PairableTimeout = 0
    Discoverable = 0
    Address = xxxxxxxxxx:15
    Discovering = 0
    Pairable = 1
    Class = 0
    UUIDs = 0x1000 0x1001 0x1112 0x111f 0x110c 0x110e
    [ /org/bluez/2642/hci0/dev_xxxxxxxxxxx_1D ]
        Product = 0x6e00
        Vendor = 0x004c
        Name = iPhone
        Paired = 1
        Adapter = /org/bluez/2642/hci0
        Alias = iPhone
        Version = 0x0810
        Connected = 1
        UUIDs = 00000000-deca-fade-deca-deafdecacafe 0x1000 0x110a 0x110c 0x110e 0x1116 0x111f 0x112f 0x1132 0x1200
        Address = xxxxxxxxxx:1D
        Services = dbus.Array([], signature=dbus.Signature('o'), variant_level=1)
        Blocked = 0
        Class = 0x7a020c
        Trusted = 0
        Icon = phone

Translate Danish "Tilsluttet" = "Connected"  8) 8) 8)



Rgds; Jesper.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14831
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #49 on: April 19, 2015, 04:42:20 AM »
Great - does music come out?

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #50 on: April 19, 2015, 05:09:10 AM »
 :) Naaa... no music yet!

Actually i haven't a clue of howto do that yet  :o

    -Do you know about music streaming ?

Been using a lot of time getting here now.

Rgds; Jesper.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #51 on: April 19, 2015, 05:11:03 AM »
dbus-python.tcz added to repo.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14831
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #52 on: April 19, 2015, 06:05:44 AM »
I managed to set an iPhone as an audio source using blueman and then play music from the iPhone through my laptop speakers using pavucontrol/pulseaudio to set the appropriate source and sink

This being said, I guess you'd need to achieve the same thing using python/alsa on your raspberry/hifi setup, which is going to require some considerable google foo...

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: [ Need bluetooth] DIY Preamplifier with buildin Raspberry pi B streamer
« Reply #53 on: April 20, 2015, 02:46:04 PM »
Hi...

I managed to setup Bluez4 now, but things are flacky...
I did not manage to actually stream audio yet  ::)

Just a little followup.

Rgds; Jesper.

Offline JJF

  • Newbie
  • *
  • Posts: 7
Hi Jesper... and everyone else in the forum ;),

are there any news, success, etc. with the audio streaming? It would be a dream to got this to work! I also thought about doing this with BlueZ4 and ALSA (instead of Bluez5 + Pulseaudio) because i already use alsa for audio output from mpd. But:

While researching how to got this to work I found this great documentation of bluez for audio streaming (with explanation!):
https://web.archive.org/web/20140704063150/http://jamesbond3142.no-ip.org/blog/?viewDetailed=00031

I'm not really familiar with this bluez thing but if I understand it right, then it's not possible to use bluez4 + alsa to recieve a audio stream via A2DP and play it at the audio output of the RasPi. That means you have to go with bluez5 + pulseaudio. Am I right that far?

Cheers JJ
« Last Edit: July 22, 2015, 06:46:47 AM by JJF »

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Hi there  :)

Quote
Hi Jesper... and everyone else in the forum ;),

are there any news, success, etc. with the audio streaming? It would be a dream to got this to work! I also thought about doing this with BlueZ4 and ALSA (instead of Bluez5 + Pulseaudio) because i already use alsa for audio output from mpd. But:

While researching how to got this to work I found this great documentation of bluez for audio streaming (with explanation!):
newbielink:https://web.archive.org/web/20140704063150/http://jamesbond3142.no-ip.org/blog/?viewDetailed=00031 [nonactive]

I'm not really familiar with this bluez thing but if I understand it right, then it's not possible to use bluez4 + alsa to recieve a audio stream via A2DP and play it at the audio output of the RasPi. That means you have to go with bluez5 + pulseaudio. Am I right that far?

Cheers JJ

Nice link you provided, thanks.

Honestly, i cannot answer yes or no to youre quistions. I think through that its possible both some how.
Problem is, that both bluez4/alsa and bluez5/pulseaudio both have some pros. / cons.  :)

Hope that someone else try it out...

Rgds; Jesper.

Offline JJF

  • Newbie
  • *
  • Posts: 7
Hey Jesper

I'd be glad to try but at the moment I'm stuck at compiling bluez5 (I didn't try bluez4 yet). First I had the same Errors you got at the beginning of this thread but now I have a "DBUS not found" error and until now I was not able to solve this. Maybe you could upload your compiled packages somewhere or send them to me? (add them to the repo?)

To the Link: My understanding of this is: It's not possible to use bluez4 + alsa without writing an interface to pass the A2DP stream from bluez to Alsa. Thats because you need to disable the Socket option in audio.conf to make the Media DBus API work, wich you need to receive the audio stream from the bluetooth device. But if this works the next step - logically - is to pass this received strem to alsa. To do so you need the alsa pcm plugin and for that you need to enable the Socket option in audi.conf. And because you cannot enable and disable Socket at the same time, it doesn't work - at least not that easily I expected ;D

But If I'd have the compiled packages I would give both solutions a try... ;)

Cheers JJ
« Last Edit: July 23, 2015, 04:11:27 AM by JJF »

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Hi there... I Will Try finding it sogn...

Really sorry i miss reply, and not answer soner, but i AM in middle of moving house ;-)... So time is stort... Good Thing is, That the house is really neat ;-)

Rdgsrds from working man :)


Sent from my iPhone using Tapatalk

Offline JJF

  • Newbie
  • *
  • Posts: 7
Hey. No problem, take your time. :) Meanwhile I'll try to finish compiling bluez5.
Current status: I solved all errors with the configure script but now make command stops because of several "...-file not found" errors despite the fact that the files are existing. I'll try to fix this in the next days, otherwise I'll post a detailed description of the errors, so maybe someone can help.
Greez JJ

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Any progress ?

 :) Just curius

Rgds; Jesper