Bluetooth + streaming for tahrpup 6.x

How to do things, solutions, recipes, tutorials
Message
Author
ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#91 Post by ktat »

tempestuous wrote:
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.
I have got to this step, however, my asound.conf looks like this

Code: Select all

defaults.pcm.card 1
defaults.pcm.device 0
I'm not sure where I should put my bluetooth MAC address.

Thanks.

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

#92 Post by tempestuous »

My bluez dotpet definitely provides a custom asound.conf file with the appropriate bluetooth-related entries, and this will definitely be installed to /etc
so it sounds like you may have overwritten this file, possibly by running the ALSA Sound Card wizard.

The simple fix would be to re-install the bluez dotpet.

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#93 Post by ktat »

Thank you for your help.

I couldn't find any file bluez.pet in the Puppy Package Manager. So I'm not sure if I've reinstalled the correct package.

What I did reinstall was bluez 4.101.

After installation and starting bluetoothd, the bluetooth icon appeared in the task bar. I was able to find my speaker, however, when I tried to connect to the audio sink a window popped up saying "Device added successfully but failed to connect".
I tried again, this time there was another error. In the bluetooth manager window it said "Connection failed: stream setup failed".

I went and took another look at /etc/asound.conf. The contents of this file has not changed since reinstalling bluez 4.101.

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

#94 Post by tempestuous »

ktat wrote:I couldn't find any file bluez.pet in the Puppy Package Manager.
My software packages are not part of the PPM, and I don't wish them to be so.
ktat wrote:What I did reinstall was bluez 4.101.
Yes, that's the correct dotpet to install, assuming you obtained it from the first post in this thread.
And if so, it definitely installs this asound.conf file -

Code: Select all

#/etc/asound.conf

pcm.btheadset {
   type plug
   slave {
       pcm {
           type bluetooth
           device XX:XX:XX:XX:XX:XX
           profile "auto"
       }
   }
   hint {
       show on
       description "BT Headset"
   }
}
ctl.btheadset {
  type bluetooth
}

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#95 Post by ktat »

Thank you, again.

Following your instructions, I am now that much closer to having a fully portable OS that meets my needs.

I had, originally downloaded the file from the PPM, and so when you redirected me back to the start of this thread - all became much clearer.

I expect that I will need to have a different asound.conf for evey bluetooth device that I wish to connect. Or, can I just use the first device listed as a template - changing the MAC address and "description" for additional devices, then appending tem to the asound.conf file?

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

#96 Post by tempestuous »

Mmm. Multiple bluetooth headsets?
ktat wrote:can I just use the first device listed as a template - changing the MAC address and "description" for additional devices, then appending tem to the asound.conf file?
Yes, that might work, but with one caveat - you almost certainly cannot duplicate the words "pcm.btheadset" and "ctl.btheadset"
because then you would have more than one definition of the same device, which would confuse the system.

I think that when you add a second device's set of definitions to the asound.conf file, these should be listed as "pcm.btheadset2" and "ctl.btheadset2".

Also be aware that whenever you change the asound.conf file, you must reboot before the changes will come into effect.

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

#97 Post by tempestuous »

Well I just tried such a configuration now, even though I don't own a bluetooth headset or speaker.

For the second device I used a different "description" value; something meaningful like "Bose BT Soundbar".
Now in DeaDBeeF when I go to Edit > Preferences > Output plugin:
I can see 2 different bluetooth devices listed, as illustrated -
Attachments
BT-multiple.jpg
(67.56 KiB) Downloaded 664 times

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#98 Post by ktat »

Thanks tempestuous, that is good to know.

Now I have another problem, in my pursuit of portability.

Unfortunately, my other laptop is a hp Pavilion g6. From my research, it would seem that it's wifi/bluetooth chip is notoriously difficult to get the bluetooth working (although my Fedora OS has no problem).

Here is what I have learned so far...

Code: Select all

root# rfkill list
0: phy0: wlan
	Soft blocked: no
	Hard blocked: no

root# hciconfig dev
Can't get device info: No such device

lsusb
02:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)

lsusb -v
Bus 006 Device 002: ID 0cf3:311d Atheros Communications, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x0cf3 Atheros Communications, Inc.
  idProduct          0x311d 
  bcdDevice            0.01
  iManufacturer           1 Atheros Communications
  iProduct                2 Bluetooth USB Host Controller
  iSerial                 3 Alaska Day 2006
  bNumConfigurations      1 

dmesg | grep -i blue
Bluetooth: Core ver 2.18
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
Bluetooth: Patch file not found ar3k/AthrBT_0x01020200.dfu
Bluetooth: Loading patch file failed
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: BNEP socket layer initialized

lsmod | grep -i ath9
ath9k                  58216  0 
ath9k_common             892  1 ath9k
ath9k_hw              326100  2 ath9k_common,ath9k
ath                    12076  3 ath9k_common,ath9k,ath9k_hw
mac80211              181284  1 ath9k
cfg80211              133384  3 ath,ath9k,mac80211

lsmod | grep -i blue
bluetooth             153589  12 bnep,ath3k,btusb,rfcomm
6lowpan_iphc            4320  1 bluetooth
rfkill                  5402  6 cfg80211,hp_wmi,bluetooth
No matter how much I "cycle" my wifi button, I'm not getting hci0 to show up in the rfill list

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

#99 Post by tempestuous »

From an earlier post by rcrsn51, I understand that when you have a combined wifi/bluetooth interface, its driver needs to explicitly enable the bluetooth functionality.
In the case of your ath9k driver, that is achieved with the "btcoex_enable" parameter. (You can run "modinfo ath9k" to see what other parameters are available)

To enable the bluetooth function temporarily, unload/reload your ath9k driver with these 2 commands -

Code: Select all

rmmod ath9k
modprobe ath9k btcoex_enable=1
Now run those bluetooth diagnostic commands again. If successful, you can move on to bluetooth configuration and pairing.

To make the driver's bluetooth function permanent, create a new text document in Geany, with this text -

Code: Select all

options ath9k btcoex_enable=1
and save the text file as /etc/modprobe.d/bluetooth.conf

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#100 Post by ktat »

Thank you tempestuous.

I gave the above a try, however, it doesn't seem to have worked. This is what I entered and the output I received:

Code: Select all

root# rmmod ath9k
root# modprobe ath9k btcoex_enable=1 blink=1	
root# rfkill list
1: phy1: wlan
	Soft blocked: no
	Hard blocked: no
root# hciconfig dev
Can't get device info: No such device
* before entering rfkill list, I clicked on the bluetooth icon to turn the daemon on.

So, following on from the earlier post by rcrsn51, I have attached the lsmod output for the Fedora OS and the Puppy OS. It would seem that the Fedora OS isn't using the btcoex option either, but still works. I also added the blink option to see if it did anything, the light on the keyboard now blinks - but this doesn't show up in the lsmod either??

I'm not sure where to go with this now.

By the way my system is 32bit so the file that rcrsn51 suggests to upload wouldn't be useful for me.
Attachments
puppy_lsmod.txt.tar
(10 KiB) Downloaded 216 times
fedora_lsmod.txt.tar
(10 KiB) Downloaded 218 times

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

#101 Post by tempestuous »

ktat wrote:before entering rfkill list, I clicked on the bluetooth icon to turn the daemon on.
I don't think that's necessary, and may even be counterproductive while you are trying to enable the bluetooth functionality.

This sounds like a case of problematic inbuilt bluetooth devices, as I mentioned in the first post. Comparing the Puppy/Fedora lsmod results, I see one significant one which is absent in Puppy - hp_wireless
Apparently this kernel module supports the hardware wifi switch on HP laptops.
In Tahrpup6 I can see that the hp_wireless module was not enabled in the kernel configuration. So it's feasible you could lobby one of the Tahrpup developers (rcrsn51 springs to mind) to compile this module for you and provide it as a dotpet.
But before you do this, try the fixes mentioned here -
https://forums.gentoo.org/viewtopic-p-7 ... ml#7499484
You will see that one of the suggested fixes is to cycle the wireless switch, which adds additonal weight to my suspicion that the hp_wireless module may be required.

And I still think the "btcoex_enable=1" parameter should be used.

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

#102 Post by tempestuous »

I have just downloaded the kernel source for Tahrpup 6.0.5 and can compile the hp_wireless driver shortly.

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

#103 Post by tempestuous »

Here is the hp-wireless driver (kernel module) compatible ONLY with the 3.14.56 PAE kernel in Tahrpup 6.0.5.
This driver is part of the official kernel source, but is not normally enabled in Puppy kernels.
hp-wireless supports the hardware wifi switch on modern HP laptops.

After installing this dotpet, reboot. Puppy should automatically load the new driver at bootup. You can check with the "lsmod" command.
Attachments
hp-wireless-k3.14.56-PAE.pet
for Tahrpup 6.0.5 with 3.14.56 PAE kernel
(1.64 KiB) Downloaded 298 times

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#104 Post by ktat »

Thanks, again, for all your help with this problem.

I've installed the dotpet you provided and rebooted. I then ran the following:

Code: Select all

root# lsmod | grep hp
hp_wmi                  4832  0 
sparse_keymap           1532  1 hp_wmi
rfkill                  5402  4 cfg80211,hp_wmi,bluetooth
wmi                     5142  1 hp_wmi
hp_wireless             1064  0 
root# rfkill list
0: phy0: wlan
	Soft blocked: no
	Hard blocked: no
root# hcitool dev
Devices:
I still have the following in my file system:
To make the driver's bluetooth function permanent, create a new text document in Geany, with this text -
Code:
options ath9k btcoex_enable=1

and save the text file as /etc/modprobe.d/bluetooth.conf
From what I can tell, it's not working, is there something that I have missed?

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

#105 Post by tempestuous »

ktat wrote:is there something that I have missed?
You didn't mention whether you followed the advice in that gentoo forum link about cycling your hardware wireless switch.
Here's what I suggest you try -

1. boot up to Tahrpup (6.0.5)
2.

Code: Select all

rfkill list
to check that phy0/wlan is displayed, but not hci0.
3. toggle your hardware wireless switch OFF - this should be possible now that you have the hp-wireless driver installed.
4.

Code: Select all

rfkill list
to check that phy0/wlan is absent
5. toggle your hardware wireless switch ON
6.

Code: Select all

rfkill list
to check that phy0/wlan AND hci0 are now displayed.
7.

Code: Select all

hcitool dev
may still display no devices ... so unload/reload the bluetooth driver -
8.

Code: Select all

rmmod btusb
modprobe btusb
9.

Code: Select all

hcitool dev
will now hopefully show "hci0".

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#106 Post by ktat »

step 1.

Code: Select all

root# rfkill list
0: phy0: wlan
	Soft blocked: no
	Hard blocked: no
Following this I tried the wifi switch. Pressing 'fn' key and 'f12' (has pic of antenna and light on it) didn't get the desired result. It just caused the Puppy menu to pop up. The wifi light didn't turn off either.

Running rfkill list got the same result as before.

Interestingly, 'f2' and 'f3' have brightness icons and work to adjust brightness without holding down the 'fn' key. this is also true for 'f5', which launches a browser.

Pressing 'f12' on its own seems to do nothing. My experimenting with 'f*' keys hasn't located one that will turn off the wifi.

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

#107 Post by tempestuous »

ktat wrote:Pressing 'fn' key and 'f12' (has pic of antenna and light on it) didn't get the desired result. It just caused the Puppy menu to pop up.
Groan. Nothing's easy.
For reference, I was involved with early hotkey support for Puppy in 2008 via the acpid utility, specifically for Asus Eee's at that time. This required different configuration files tailored for different Eee models.
Getting full hotkey support working for your HP g6 would take a lot of effort, but for the task at hand all we need to do is run the Linux commands which are linked to the wifi hotkey ...
and for that I need a little investigation - the (new) hp-wireless driver will probably create its own directory somewhere in /proc
could you please use ROX to look in /proc and report anything which appears to be a candidate. It's likely to be something like
/proc/hp
or
/proc/acpi/hp
or
/proc/hp/wlan
you get the idea.

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#108 Post by ktat »

Not sure that I've been able to find what we're looking for. This is what I came up with after searching for "hp" and "wlan" directories in /proc.

Code: Select all

ls /proc/sys/dev/hpet/
max-user-freq

ls /proc/sys/net/ipv4/conf/wlan0/
accept_local
accept_redirects
accept_source_route
arp_accept
arp_announce
arp_filter
arp_ignore
arp_notify
bootp_relay
disable_policy
disable_xfrm
force_igmp_version
forwarding
igmpv2_unsolicited_report_interval
igmpv3_unsolicited_report_interval
log_martians
mc_forwarding
medium_id
promote_secondaries
proxy_arp
proxy_arp_pvlan
route_localnet
rp_filter
secure_redirects
send_redirects
shared_media
src_valid_mark
tag

ls /proc/sys/net/ipv4/neigh/wlan0/
anycast_delay
app_solicit
base_reachable_time
base_reachable_time_ms
delay_first_probe_time
gc_stale_time
locktime
mcast_solicit
proxy_delay
proxy_qlen
retrans_time
retrans_time_ms
ucast_solicit
unres_qlen
unres_qlen_bytes

Walt52
Posts: 123
Joined: Fri 04 Apr 2014, 00:52

#109 Post by Walt52 »

Hope y'all don't mind my butting in, but I've installed three different versions of bluEz on my Dell 1501 Running Tahr, including yours, and I can't get the logo to appear. I was running Precise and got it to come up, but I never did get it to work. Can you offer suggestions?

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

#110 Post by Semme »

Walt, if your dealing with a 605 cd, boot "puppy pfix=ram" >> dwnld and install from page one. You get an icon? I do.

Fact is remnants from previous Bluez pkgs may be running interference..

==

In addition, use pFind and "system files" search bluez.

After the results surface, you hit "file" and "export the results to text editor" option.

Dump those here..
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

Post Reply