Stream Music from PC to Audio System via Bluetooth
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
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.
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.
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
Update Jan 25 2015:
Bluetooth streaming HOWTO now here -
http://www.murga-linux.com/puppy/viewtopic.php?t=97456
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.
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
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 -
If your bluetooth adapter is recognised by Puppy you should see this -
If not, I suggest you follow the process suggested in that Gentoo forum post.
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
Code: Select all
1: hci0: bluetooth
Soft blocked: no
Hard blocked: no
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.
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.
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
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
You can launch a command prompt from the "console" icon on the desktop, or go to
Menu > Utility > Urxvt terminal emulator
Sorry, I have no idea what you're talking about. You would need to provide more detail.847563 wrote:When I type anything in, I get a error message almost as though I'm not in terminal mode.
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.
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.
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
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:... This executed normally with the same result as yours above
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.847563 wrote:When I run HCISCAN my bluetooth is not found on the sound system, so no MAC address is available.
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?
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
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?
Suggestions?
Last edited by rcrsn51 on Wed 21 Jan 2015, 19:45, edited 1 time in total.
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
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
That led to python-dbus, which threw more errors.666philb wrote:maybe python-gi from the PPM
So I gave up. We need to know what environment tempestuous is using.
[Edit] the error is
I googled this and found other reports with no solutions.dbus.exceptions.DBusException: org.bluez.Error.NoSuchAdapter: No such adapter
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:
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
The following asound.conf lets you switch between speakers in Deadbeef:
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
On the next reboot, the bluetooth service did not start automatically, so I had to run
Code: Select all
/etc/init.d/bluetooth start
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.