Stream Music from PC to Audio System via Bluetooth

Booting, installing, newbie
Message
Author
User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#21 Post by mikeb »

:lol:

847563
Posts: 23
Joined: Wed 07 Jan 2015, 10:05
Location: Mos Eisley, South Australia

#22 Post by 847563 »

@666philb

Installed your package. I have a Bluetooth Manager Button in Network, but when I click, the desktop reappears with no apparent action taking place.

Have I forgotten something ?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#23 Post by Semme »

Sorry, not dynamic. Can't test w/o a device neither.. :oops:
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#24 Post by tempestuous »

Well I pulled out my old bluetooth USB dongle and did some further investigation.
The first item of good news is that bluetooth configuration is very straightforward these days - instead of multiple bluetooth daemons (hcid, sdpd, passkey-agent) there's now just a single daemon application - bluetoothd. Configuration is very easy.

The second item of good news is that under tahrpup 6.0 I have successfully created a bluetooth ALSA device, which can be seen by any/all audio/video applications ...
... but unfortunately I can't test it because I don't have a bluetooth receiver or headset.

847563, the following instructions are in the form of manual commands. If you're prepared to try this, I think you have a good chance of success.
If, like many other newcomers to the Puppy forum, you are not prepared to deviate from using anything other than gui applications, then I have to give you some tough love and tell you that Linux will never be your friend. You reap what you sow.

At the outset I must mention that your Puppy computer must have a bluetooth dongle attached.
Apologies if you already knew this, but I don't see it mentioned earlier.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#25 Post by tempestuous »

Update Jan 25 2015:
Bluetooth streaming HOWTO now here -
http://www.murga-linux.com/puppy/viewtopic.php?t=97456
Last edited by tempestuous on Sun 25 Jan 2015, 06:48, edited 4 times in total.

847563
Posts: 23
Joined: Wed 07 Jan 2015, 10:05
Location: Mos Eisley, South Australia

#26 Post by 847563 »

Thanks very much tempestuous, it may take a day or so as I have a lot on at the moment.

Question about the dongle though. Isn't bluetooth available as a wireless function of my Toshiba laptop ? why a separate dongle.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#27 Post by tempestuous »

Ah, so your laptop has a built-in bluetooth adapter? OK, no dongle required.
But I just Googled your Toshiba C850 now, and I see there might be some trouble getting that bluetooth adapter to be recognised at bootup -
http://forums.gentoo.org/viewtopic-p-74 ... ml#7499484
I suggest you check this. Before you do anything else, run this command -

Code: Select all

rfkill list
If your bluetooth adapter is recognised by Puppy you should see this -

Code: Select all

1: hci0: bluetooth
	Soft blocked: no
	Hard blocked: no
If not, I suggest you follow the process suggested in that Gentoo forum post.

847563
Posts: 23
Joined: Wed 07 Jan 2015, 10:05
Location: Mos Eisley, South Australia

#28 Post by 847563 »

Very astute Tempy....,

You are so correct, the bluetooth recognition is most certainly a problem. My nokia phone syncs with the adapter and plays music through the sound system easily, so I know the adapter will do the job, all I've got to do is get the pc to do the same thing, which is how this topic came about.

While we're about it, I seem to be having trouble with terminal commands.

When I type anything in, I get a error message almost as though I'm not in terminal mode. The prompt character is # does this mean it will execute commands or do I need to do something else as well.

Sorry to be so dumb. :oops:

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#29 Post by tempestuous »

The # character denotes that the command prompt is running as root user.
You can launch a command prompt from the "console" icon on the desktop, or go to
Menu > Utility > Urxvt terminal emulator
847563 wrote:When I type anything in, I get a error message almost as though I'm not in terminal mode.
Sorry, I have no idea what you're talking about. You would need to provide more detail.

847563
Posts: 23
Joined: Wed 07 Jan 2015, 10:05
Location: Mos Eisley, South Australia

#30 Post by 847563 »

Well, I was ok up to the rfkill command.

This executed normally with the same result as yours above, which to mew indicates that the bluetooth in the pc is recognized.

When I run HCISCAN my bluetooth is not found on the sound system, so no MAC address is available. It requires 0000 to pair, but there is no request for this to be input at any stage.

I think my C850 is living up to it's reputation. :x

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#31 Post by tempestuous »

847563 wrote:... This executed normally with the same result as yours above
Good. That, plus the fact that the "hcitool scan" command appears to run without error certainly indicates that your laptop's bluetooth adapter is properly functioning.
847563 wrote:When I run HCISCAN my bluetooth is not found on the sound system, so no MAC address is available.
Well I just ran another test now with bluetooth activated on my smartphone, and "discoverable" mode also enabled on the phone. Puppy detected it and presented me with the phone's bluetooth MAC address.
So I suspect you need to activate "discoverable" mode on your sound system. Can you tell me exactly what brand/model of sound system you have?

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#32 Post by tempestuous »

Ah, just had another thought; your receiver's bluetooth MAC address might be printed on the back or underside of the unit. Or there might be some form of printed sticker on/in the user manual.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#33 Post by rcrsn51 »

I ran out and bought a little bluetooth speaker and did the setup in Tahrpup. The installation was going fine until I got to the "bluez-simple-agent" command. It gave a "no module named gi.repository" error which I think is coming from Python.

Suggestions?
Last edited by rcrsn51 on Wed 21 Jan 2015, 19:45, edited 1 time in total.

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#34 Post by 666philb »

maybe python-gi from the PPM
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#35 Post by rcrsn51 »

666philb wrote:maybe python-gi from the PPM
That led to python-dbus, which threw more errors.

So I gave up. We need to know what environment tempestuous is using.

[Edit] the error is
dbus.exceptions.DBusException: org.bluez.Error.NoSuchAdapter: No such adapter
I googled this and found other reports with no solutions.

kattman
Posts: 87
Joined: Fri 11 Jul 2008, 21:54

#36 Post by kattman »

It worked for a little bit than all heard was loud static using "VLC"!

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#37 Post by Semme »

And you're running *which* pup?
It worked for a little bit than all heard was loud static using VLC!
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#38 Post by rcrsn51 »

Success (I think)

I needed to install:
gir1.2-glib-2.0_1.40.0-1_i386.deb
libgirepository-1.0-1_1.40.0-1_i386.deb
python-dbus_1.2.0-2build2_i386.deb
python-gi_3.12.0-1_i386.deb

Then:

Code: Select all

bluetoothd
hcitool scan
bluez-simple-agent hci0 MAC_ADDRESS  (I needed the hci0)
PIN code: 0000
/etc/asound.conf >> MAC_ADDRESS
aplay -L
VLC > set audio device
Initially this got me I/O errors in both VLC and mplayer. But I mucked around with the speaker (maybe pressed the right button) and it started to play.

On the next reboot, the bluetooth service did not start automatically, so I had to run

Code: Select all

/etc/init.d/bluetooth start
The following asound.conf lets you switch between speakers in Deadbeef:

Code: Select all

#/etc/asound.conf

pcm.!default {
	type hw
	card 0
}

ctl.!default {
	type hw           
	card 0
}

pcm.btheadset {
   type plug
   slave {
       pcm {
           type bluetooth
           device FC:58:FA:98:7E:07
           profile "auto"
       }
   }
   hint {
       show on
       description "BT Headset"
   }
}
ctl.btheadset {
  type bluetooth
}
Last edited by rcrsn51 on Thu 22 Jan 2015, 00:03, edited 3 times in total.

kattman
Posts: 87
Joined: Fri 11 Jul 2008, 21:54

#39 Post by kattman »

kattman wrote:It worked for a little bit than all heard was loud static using "VLC"!
Thar 6.0 ce

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#40 Post by rcrsn51 »

kattman wrote:It worked for a little bit than all heard was loud static using "VLC"!
Deadbeef was working better for me than VLC.

Post Reply