Bluez-Alsa

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#31 Post by rcrsn51 »

Thanks for testing.

Regarding the stuttering: if you thought that the "nice" command helped in v1.1, you can try it at line 157 of v1.2.

Here are some troubleshooting tips if a device stops working:

1. In bluetoothctl, use the "info" command. It will confirm if a device is properly paired/connected.

2. Check two things in your .asoundrc file:
a. the correct MAC address is inserted
b. the "bluetooth" ALSA device is enabled at the bottom.

You don't need to unpair a device if switching to another one.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#32 Post by greengeek »

rcrsn51 wrote:You don't need to unpair a device if switching to another one.
I am still rather confused by the various steps required to link BT devices. For example, i don't understand the difference between "pairing" and "connecting" - according to the bt4stretch help file you have to manually "pair" to the MAC first, then go on to "connect" to the MAC (unless I have misunderstood, which is frequently the case )

Then there is the need to release the remote device before shutting down - is that "unpairing" or "unconnecting"?

I feel that once I have a clearer idea of the layers of the BT protocol I may experience more repeatability and reliability.

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

#33 Post by rcrsn51 »

I'm not either, except that bluetoothctl clearly needs both.

You only need to pair once, then bluetoothctl adds that info to its database and remembers it.

But you need to connect at each session. If you watch the device's indicator lights and listen to the beeps, you can tell when the connection is made properly.

At one time, I thought that disconnecting a device made it more amenable to connecting at the next session. But that may not be true.

Read here.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#34 Post by greengeek »

Thanks, that info is useful. I definitely have one device which doesn't connect (or maybe I mean pair?) properly if it is not disconnected properly from previous devices. That device would not show in Linux at all until I disconnected it from my wife's phone (even though she had not connected to it for months). Even if she was out of the house and miles away (obviously not connected) the device stayed hidden.

Is there some way to use apt-get to download the bt4stretch and peasymp3 packages (rather than install) so that I can load the software when required (like a .pet)?

My wife is getting sick of the ethernet cable tracking across the floor.
:oops:

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

#35 Post by rcrsn51 »

greengeek wrote:Is there some way to use apt-get to download the bt4stretch and peasymp3 packages (rather than install) so that I can load the software when required (like a .pet)?
Go into Fred's repo and download the packages. Then install them with Right-click/Install deb.

But you still need to be connected in order to get all the dependent packages.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#36 Post by greengeek »

Ran some more tests with v1.2 tonight and managed to switch repeatedly between two BT devices without any of the previous stuttering problems.

I did not unpair the devices - just clicked the "disconnect" button in the bt4stretch gui to free the current device, then entered "connect MACaddr" in the control terminal to connect the second device. Then altered the MACaddr in the .asoundrc and ran carousel.

I have three further tests to perform:

- establish what was causing the stuttering.
- establish why the BT adapter in the PC is sometimes not found, resulting in the daemon not running (seem to have to reboot to get past this)
- try several other BT devices to confirm reliability of switching between devices.

I do miss the ability that was in the old bluez package to "list currently paired devices", and also the ability to select a device from that gui list rather than using "control" to manually drive the connection. As far as I can tell "quickconnect" only tries to reconnect to the previously paired (or do i mean "connected"??) device (but i need to retest this)

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

#37 Post by rcrsn51 »

greengeek wrote:Ran some more tests with v1.2 tonight and managed to switch repeatedly between two BT devices without any of the previous stuttering problems.
That's good news.
I did not unpair the devices - just clicked the "disconnect" button in the bt4stretch gui to free the current device, then entered "connect MACaddr" in the control terminal to connect the second device. Then altered the MACaddr in the .asoundrc and ran carousel.
That should be the standard procedure, if your BT devices cooperate. Depending on the device and the adapter, it's not always that easy. I have found that desktop machines with a separate USB adapter sometimes work better than laptops where the BT adapter is built-in and incorporated with the WiFi adapter.
I do miss the ability that was in the old bluez package to "list currently paired devices", and also the ability to select a device from that gui list rather than using "control" to manually drive the connection
.
PuppyBT used a combination of tools from bluez4 and bluez-tools. I tried again to make them work in bluez5 and failed.

Most people will find a BT speaker that works for them and lock it in.
As far as I can tell "quickconnect" only tries to reconnect to the previously paired (or do i mean "connected"??) device (but i need to retest this)
Quick Connect looks in your .asoundrc file, identifies the current MAC address that you set up and uses it to connect/disconnect. Because pairing info is saved between sessions, you don't need to re-pair.

For some reason, the agent tool in PuppyBT doesn't distinguish between pairing and connecting. It may automatically pair new devices.
establish why the BT adapter in the PC is sometimes not found, resulting in the daemon not running (seem to have to reboot to get past this)
That sounds like a timing problem, possibly because you are booting off an optical disc. I have never experienced it.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#38 Post by greengeek »

rcrsn51 wrote:Quick Connect looks in your .asoundrc file, identifies the current MAC address that you set up and uses it to connect/disconnect. Because pairing info is saved between sessions, you don't need to re-pair.
One of the things I am doing at present is to build up a collection of .asoundrc files that are modified for each specific BT device that I can connect to.

I will be trialling a script to swap between asoundrc files instead of manually editing each time. As you say most people will not need to do this as they will stay with one device - but doing this will let me test what can be done to make the bluez5 more usable for my needs. I am hoping that I can simplify and semi-automate the connect and disconnect process a little.

I intend to avoid persistence so that causes me some issues with losing the "database" of paired devices - so I would like to work out where bluez keeps it's list of paired devices and see if i can duplicate it so that Quickconnect could be used to manage the connections (without me using the BT control terminal in future sessions).

Dropping in an appropriate asoundrc and allowing quickconnect to do the rest might be a way I can make this more straightforward.

Here are the devices I am currently using:

- Samsung Soundplate (A flat chunky amplifier that sits under the TV to boost the TV and other audio)
- "H-163" generic usb BT receiver which has a headphone out jack to make ordinary headphones BT compatible
- "Tactix" earmuffs for use in an industrial environment
- "Veon" mini stereo i use for streaming my laptop music directory output to.
- "Marley chant sport" BT speaker for using BT music output in other rooms of the house. (also used as a phone interface when in the car)
Attachments
Veon_mini-stereo.jpg
(9.19 KiB) Downloaded 238 times
H163_audio.jpg
(38 KiB) Downloaded 244 times
TactixEarmuffs.jpg
(22.84 KiB) Downloaded 243 times
Marley_Chant_Sport.jpg
(9.34 KiB) Downloaded 243 times

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

#39 Post by rcrsn51 »

I intend to avoid persistence so that causes me some issues with losing the "database" of paired devices - so I would like to work out where bluez keeps it's list of paired devices and see if i can duplicate it so that Quickconnect could be used to manage the connections (without me using the BT control terminal in future sessions).
Check out /var/lib/bluetooth

Post Reply