Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 02 Apr 2015, 00:44
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Bluetooth + streaming for tahrpup 6.x
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 4 [55 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
tempestuous

Joined: 10 Jun 2005
Posts: 5347
Location: Australia

PostPosted: Sun 25 Jan 2015, 02:35    Post subject:  Bluetooth + streaming for tahrpup 6.x  

Here are the "bluez" bluetooth libraries compatible with Ubuntu Trusty Tahr, with some specific added configuration files to support bluetooth A2DP audio streaming.
There's NO GUI - I had trouble satisfying dependencies for the "blueman" front end. But it's not really necessary, just a couple of manual commands are all you need to pair your bluetooth devices. Then at each bootup all you need to do is start the bluetooth daemon, via a neat tray applet, kindly provided by forum member rcrsn51.

INSTRUCTIONS
Install this dotpet -
http://www.smokey01.com/tempestuous/bluez_4.101-streaming.pet
When the installation is complete you will see a bluetooth icon in the desktop tray, which is black in colour.

Plug your bluetooth USB dongle into your Puppy computer. Puppy already contains the necessary drivers, which will automatically load. Before going any further, it's a good idea to check that Puppy recognises your bluetooth device, with this command -
Code:
rfkill list

Along with an entry for your wifi device, you should see this for your bluetooth device -
Code:
1: hci0: bluetooth
   Soft blocked: no
   Hard blocked: no

In-built bluetooth devices, in particular, may fail to be recognised. If so, check this site for instructions on how to coax the bluetooth device into life -
http://forums.gentoo.org/viewtopic-p-7499484.html#7499484

Now get the bluetooth daemon running by simply clicking once on the bluetooth icon. You will see it turn blue to confirm the bluetooth daemon is now running.

Next put your external bluetooth device into "discoverable" bluetooth mode. You may need to check the device's user manual. Bluetooth receivers which are built in to certain hifi systems may achieve this by pressing a particular button-sequence on their remote control unit.
Once the external device is in discoverable mode, run this command in Puppy to find its bluetooth MAC address -
Code:
hcitool scan

The result will be something like "00:17:E3:4B:68:A3"
Now go ahead and pair your external device to Puppy with this command -
Code:
bluez-simple-agent hci0 00:17:E3:4B:68:A3

Obviously use your own bluetooth MAC address, not the value I used as an example.
Your headset might require you to authorise the pairing. If so, type your PIN (0000 or 1234, etc)

UPDATE:
Some bluetooth receivers are properly paired at this point, although it might be necessary to reboot Puppy before audio streaming will work properly
... but some bluetooth receivers may indicate that they have failed to pair, even though your Puppy computer shows a successful connection. Thanks to Philh, here are some extra steps you may require - first run these 2 commands:
Code:
hciconfig hci0 piscan
bluetooth-agent 0000

then power-off / power-on your bluetooth receiver. Hopefully it will now show that it is paired.

Once the pairing is successful, it should happen automatically in the future - whenever you activate Puppy's bluetooth daemon.

These instructions are common for all forms of bluetooth communication. Now we will move on to audio streaming.
tray-applet.jpg
 Description   
 Filesize   7.35 KB
 Viewed   854 Time(s)

tray-applet.jpg


Last edited by tempestuous on Sun 01 Feb 2015, 02:39; edited 1 time in total
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5347
Location: Australia

PostPosted: Sun 25 Jan 2015, 02:41    Post subject:  

BLUETOOTH A2DP STREAMING VIA ALSA PLUGIN.

Open /etc/asound.conf in Geany, and replace "XX:XX:XX:XX:XX:XX" with the bluetooth MAC address of your bluetooth receiver (or headset), which you determined earlier.
To check that a valid bluetooth ALSA device has been created, run this command -
Code:
aplay -L

You should see "btheadset" listed. If so, great. Success.
Now this ALSA device is available to any audio/video application on your computer.

In DeaDBeeF go to Edit > Preferences
and you can select "BT Headset" in the Output device dropdown menu.

Or in VLC go to Audio > Audio Device
and do the same.
DeaDBeeF-output.jpg
 Description   
 Filesize   37.27 KB
 Viewed   846 Time(s)

DeaDBeeF-output.jpg

Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9807
Location: Stratford, Ontario

PostPosted: Sun 25 Jan 2015, 10:16    Post subject:  

Some hints:

1. Go here and get PeasyBT. It will simplify the Bluetooth connection procedure.

2. I found that ALSA didn't always detect my BT speaker immediately after setup. A reboot may be required to get it working. Or sometimes a re-pair.

---------------------------

Last edited by rcrsn51 on Tue 10 Feb 2015, 10:41; edited 2 times in total
Back to top
View user's profile Send private message 
pchan

Joined: 12 Oct 2012
Posts: 130
Location: Kuala Lumpur, Malaysia

PostPosted: Tue 27 Jan 2015, 05:35    Post subject:  

rcrsn51 wrote:
Some hints:

1. To check your BT setup, run: bluez-test-device list

2. To delete a device, run: bluez-test-device remove xx:xx:xx:xx:xx:xx

3. I found that ALSA didn't always detect my BT speaker immediately after setup. A reboot may be required to get it working.
is

I am going to give this a try.

It is a great thing if it is possible to get Bluetooth working in Puppy Linux Tahr.

When i do a search, I cannot find many threads in the puppy Linux forum discussing on Bluetooth. Some puppy Linux like Fat-dog or those put together by Csipsez, have Bluetooth but it is only for file transferring or the connection of Bluetooth mouse. I could not get proper streaming of sound to a Bluetooth headset.

Therefore, if i want to use my Bluetooth headset. I always have to log in to Linux lite, Lubuntu or windows.

If it is possible to use Bluetooth headset in puppy Linux, then for me, Puppy Linux would become quite complete as an OS for my computing needs.

recently, I was given a Bluetooth headset that has good battery handling and it claims 40 hours music listening. It is such a pity if I don't use it.

I wish that all puppy Linux developers would consider implementing a working Bluetooth just like they would implement a working WiFi, working sound and working graphic modules. Bluetooth can then become a "out-of-the-box" thing.

Bluetooth is still a useful tool to me although I cannot speak for everyone.

Happy to see that Talented contributors like rcrsn51 is involved in helping with this Bluetooth implementation.

Thanks rcrsn51!
Back to top
View user's profile Send private message 
pchan

Joined: 12 Oct 2012
Posts: 130
Location: Kuala Lumpur, Malaysia

PostPosted: Tue 27 Jan 2015, 06:12    Post subject:  

tempestuous, rcrsn51,

First attempt -> result : not successful!


# rfkill list
0: phy0: wlan
Soft blocked: no
Hard blocked: no
1: hci0: bluetooth
Soft blocked: no
Hard blocked: no
# hcitool scan
Device is not available: No such device
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9807
Location: Stratford, Ontario

PostPosted: Tue 27 Jan 2015, 06:51    Post subject:  

Has the Bluetooth icon in the system tray turned blue?

From the results of your rfkill command, it looks like your local Bluetooth device is part of your internal WiFi card. I don't have one of these - I am only testing with a USB dongle. Tempestuous has posted a link above with some suggestions.

Is the BT device detected by "lsusb"?

What driver is being loaded for your WiFi card? I wonder whether the driver actually has BT enabled?

I'm pretty sure that "Device is not available: No such device" refers to the local device, not the headphones. If the local device was working, you would see a "Scanning..." message.

Run the command "hcitool dev". Does this detect the internal device?
Back to top
View user's profile Send private message 
pchan

Joined: 12 Oct 2012
Posts: 130
Location: Kuala Lumpur, Malaysia

PostPosted: Tue 27 Jan 2015, 12:06    Post subject:  

rcrsn51 wrote:
Has the Bluetooth icon in the system tray turned blue?


Yes
rcrsn51 wrote:

From the results of your rfkill command, it looks like your local Bluetooth device is part of your internal WiFi card.


Yes, it is a built in bluetooth.

rcrsn51 wrote:

Is the BT device detected by "lsusb"?


# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 1220:0008
Bus 005 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
#

rcrsn51 wrote:

What driver is being loaded for your WiFi card? I wonder whether the driver actually has BT enabled?


rtl1892ce - a very good driver I received from you.
Anyway, I can live without Bluetooth but I can't without WIFI. But would be really nice if the Bluetooth can work.

rcrsn51 wrote:

I'm pretty sure that "Device is not available: No such device" refers to the local device, not the headphones. If the local device was working, you would see a "Scanning..." message.

Run the command "hcitool dev". Does this detect the internal device?


# hcitool dev
Devices:
#

You are right I think. ... interesting.
Unfortunately, it is back to wired ear phones for me I guess until someone can help me to get Bluetooth working. (or maybe, ... find me a Bluetooth dongle Smile )
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9807
Location: Stratford, Ontario

PostPosted: Tue 27 Jan 2015, 12:42    Post subject:  

pchan wrote:
Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

So this is an internal device, even though it's called a "dongle"?

Did you try the suggestion above?
Code:
rmmod btusb
modprobe btusb

I looked at the source for the rtl8192ce driver and it has something called btcoexist that I never included. I will build and post it.

This is for Tahrpup NO-PAE?
Back to top
View user's profile Send private message 
pchan

Joined: 12 Oct 2012
Posts: 130
Location: Kuala Lumpur, Malaysia

PostPosted: Tue 27 Jan 2015, 14:13    Post subject:  

This is for Tahrpup NO-PAE?

Yes, I am using Tahrpup no pae. Thanks

I will try it.


will also try these as soon as I log in to puppy again sometimes later. Cos now I am on another partition enjoying my Bluetooth headset.

rmmod btusb
modprobe btusb


Thanks rcrsn51 as always!
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9807
Location: Stratford, Ontario

PostPosted: Tue 27 Jan 2015, 15:21    Post subject:  

@pchan: Install this PET. Then run
Code:
modprobe btcoexist

Test your bluetooth.
rtl8192ce_btcoexist_tahrpup_nopae-k3.14.20.pet
Description 
pet

 Download 
Filename  rtl8192ce_btcoexist_tahrpup_nopae-k3.14.20.pet 
Filesize  71.46 KB 
Downloaded  59 Time(s) 
Back to top
View user's profile Send private message 
pchan

Joined: 12 Oct 2012
Posts: 130
Location: Kuala Lumpur, Malaysia

PostPosted: Wed 28 Jan 2015, 00:36    Post subject:  

rcrsn51 wrote:
@pchan: Install this PET. Then run
Code:
modprobe btcoexist

Test your bluetooth.


Hi rcrsn51,

I ran "modprobe btcoexist"

Received error (see attached txt file)

Thanks for helping.

If you can succeed in getting an inbuilt bluetooth working, it is great!

If it is not successful, don't worry. As i say, in my effort to search the forum, very few discussions on getting bluetooth working on a puppy linux. Don't know why but most have given up maybe. Usually, we cannot live without sound, wifi or proper graphic modules. But for bluetooth headsets .... we can always return to wired headsets although it will not be as convenient as a headset that is wireless and we can temporarily move about from our pc to other parts of house/room.

It will be quite revolutionary if puppy can someday become like ubuntu or other Linux which comes with Bluetooth working "out-of-the-box" for those who are technically challenged like me. Happy if you can be the one to ignite that bluetooth historical revolution. It is one "last" missing component of Puppy Linux. (... But of course, some puppy (puppies) like
Fatdog and those from lupu and saluki days do provide limited bluetooth connections ... as long as it is not headsets ... ). So, until now, it is more common for puppy linux os to come without bluetooth and users will have to find ways to install it themselves if that is what they need.
error.txt.zip
Description 
zip

 Download 
Filename  error.txt.zip 
Filesize  12.33 KB 
Downloaded  58 Time(s) 
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9807
Location: Stratford, Ontario

PostPosted: Wed 28 Jan 2015, 01:45    Post subject:  

I don't understand that. In Tahrpup NO-PAE, I installed the rtl8192ce_tahrpup_nopae-k3.14.20.pet and the rtl8192ce_btcoexist_tahrpup_nopae-k3.14.20.pet.

I ran "modprobe rtl8192ce" and "modprobe btcoexist". I did NOT get that error. You should not need to run the first modprobe command because the module would automatically load on your machine, since it has the device. Maybe a reboot is necessary?

Boot up a Linux where your BT headphones work and run "lsmod". Is btcoexist being loaded?

Quote:
Bus 006 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

I own two external BT dongles with this identical chip. Both work OOTB. Something is blocking your internal device.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9807
Location: Stratford, Ontario

PostPosted: Thu 29 Jan 2015, 09:34    Post subject:  

No reply? I have the feeling that I am the only person who has seen (heard) this work with actual speakers.

If anyone else has been successful, particularly with an internal BT adapter, please provide some feedback.

[Edit] I just picked up this BT receiver



It works seamlessly, but I am using an external USB BT dongle as the transmitter.
Back to top
View user's profile Send private message 
Philh

Joined: 17 May 2006
Posts: 108
Location: England

PostPosted: Fri 30 Jan 2015, 11:18    Post subject:  

I havent managed to make it work streaming to an audio amplifier from a plugin usb dongle.
bluez-simple-agent asks for the pin and seems to create the device
but the audio amp is still trying to pair, never connects, then times out.
I found something about using bluez-test-device trusted and bluez-test-input connect but they didnt
make it work

# hcitool scan
Scanning ...
00:1D:DF:86:67:98 CR-H260i
# bluez-simple-agent hci0 00:1D:DF:86:67:98
RequestPinCode (/org/bluez/3232/hci0/dev_00_1D_DF_86_67_98)
Enter PIN Code: 0000
Release
New device (/org/bluez/3232/hci0/dev_00_1D_DF_86_67_98)
# bluez-test-device trusted 00:1D:DF:86:67:98 yes
# bluez-test-input connect 00:1D:DF:86:67:98 yes
Traceback (most recent call last):
File "/usr/bin/bluez-test-input", line 42, in <module>
input.Connect()
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "" on interface "org.bluez.Input" doesn't exist

#


I got bluetooth working in precise using bluetooth-wizard
but if I try bluez-simple-agent then it doesnt connect.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9807
Location: Stratford, Ontario

PostPosted: Fri 30 Jan 2015, 12:37    Post subject:  

Philh wrote:
but the audio amp is still trying to pair, never connects, then times out.

Quote:
New device (/org/bluez/3232/hci0/dev_00_1D_DF_86_67_98)

The above line indicates that pairing was successful. Now update your asound.conf file as per the above instructions.

When I run "bluez-test-input connect", I get the same errors as you. I don't believe that they are of any consequence.

At this point, I would reboot and possibly redo the pairing with "bluez-test-device remove" and "bluez-simple-agent".

Here is a test command:
Code:
aplay -D btheadset /usr/share/audio/2barks.wav
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 4 [55 Posts]   Goto page: 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1123s ][ Queries: 12 (0.0044s) ][ GZIP on ]