Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Total_Blue
Level 3
Level 3
Posts: 113
Joined: Wed Sep 07, 2011 5:01 pm

Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by Total_Blue »

I have a pair of Uproar bluetooth headphones with a usb dongle, and it is a real pain using them with my computer, which is running running Linux Mint Mate 18.1 Serena.

It wouldn't be so bad if all I had to do was switch the output to the headphones when I turned them on, but there a few steps that I need to do every time I want to use them.

I was hoping someone may have a suggestion on how to cut down on those steps. The steps I am using are ones that I was able to piece together from both these and the Ubuntu forums, to get them to work.

It is not as simple as turning the headphone on and waiting for them to connect. In order to use them, after turning them on and waiting for them to connect, I have to go into Sound Preferences, go into Hardware and highlight Uproar Wireless here, then I have to change the profile from Headset Head Unit (HSP/HFP) to High Fidelity Playback (A2DP Sink). I then have to select Test Speakers to make sure the headphones are working properly, as sometimes they may not be. If I get sound from the headphones, I next have to select Output, choose Uproar Wireless, and adjust the volume from 70% to 100%. Now my headphones are ready for use.

Once I am ready to turn the headphones off but before I do, I again have to go into Sound Preferences, go into Hardware and highlight Uproar Wireless, then I have to change the profile back from High Fidelity Playback (A2DP Sink) to Headset Head Unit (HSP/HFP). Now I can turn the headphones off.

If I do not switch them from High Fidelity Playback (A2DP Sink) to Headset Head Unit (HSP/HFP) before turning them off, the next time I use the headphones, they will not work until I have removed them and added them again, and even then I sometimes have to play with it a few times before they will work.

There is an a2dp.py script that can be run run after the headphones are connected to automatically switch them to the High Fidelity Playback (A2DP Sink), however, I still have to go into sound preferences and change the output method. Then, I still have to manually switch them back to Headset Head Unit (HSP/HFP) before turning them off, so they will work properly, the next time I go to use them.

I loaded up Ubuntu Mate 17.04 and tried it there was well. The first time I connected the headphones, I still had to manually switch them from Headset Head Unit (HSP/HFP) to High Fidelity Playback (A2DP Sink) and then change the output to the headphones. However, I did NOT have to switch them back to (HSP/HFP) before turning off the headphones. The next time I turned them on, I only had to switch the output to the headphones, it saved the high fidelity setting.

Any help would be appreciated.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
kukamuumuka

Re: Uproar Bluetooth Headphones on Mate 18.1

Post by kukamuumuka »

Install alsa-tools-gui and see if it can help you

Code: Select all

sudo apt-get install alsa-tools-gui
http://puolanka.info/goto/how-to-deacti ... es-output/
Total_Blue
Level 3
Level 3
Posts: 113
Joined: Wed Sep 07, 2011 5:01 pm

Re: Uproar Bluetooth Headphones on Mate 18.1

Post by Total_Blue »

administrollaattori wrote:Install alsa-tools-gui and see if it can help you
I checked out your suggestion, unfortunately, it did not do anything for me. They seemed to be more for issues with hardwired speakers and headphones, rather than bluetooth. Thanks for the suggestion though.
Total_Blue
Level 3
Level 3
Posts: 113
Joined: Wed Sep 07, 2011 5:01 pm

Re: Uproar Bluetooth Headphones on Mate 18.1

Post by Total_Blue »

I have put together two scripts that work for me, and will hopefully work for others.

These should be placed in an easily accessible location on your computer. They and can be run from either the terminal or from the gui.
I have set mine to allow execution as a program. I just double click on them, and when prompted, I run in Terminal.

For me, after I have turned on my headphones and they show as connected in bluetooth, I run the uproar.py script. When I am ready to turn the headphones off, but just prior to doing so, I run the hsp-hfp.py script.

Both scripts will have to be edited to add your device ID. Instructions for doing so are in the scripts.

The uproar.py script will change your headphones to a2dp, set your default output to your headphones, and put the volume for your headphones at 100%.

The hsp-hfp.py script will change your headphone back to hsp-hfp, so they will be ready for the next time you need to use them.

uproar.py script

Code: Select all

# This is a modified script, based on a script 
# originally written and submitted to askubuntu.com by Ray M.
# 
# Enter the ID of your device here
# To find the device ID for your headphones,
# from the command line, type "pacmd info |grep bluez" 
#  (without the quotation marks) and press enter.
# About the 4th line down, there should be a line that
# shows something like - name: <bluez_sink.FC_A8_9B_3A_7E_42>
# In this example, the FC_A8_9B_3A_7E_42 would 
# be the device ID.

MAC=FC_A8_9A_3B_9F_67

# Make ready
# Convert device address per pulseaudio standards
DEV=$(echo $MAC|tr ':' '_')
TITLE="Uproar $MAC"
CONNECTED="Audio connection updated."
PROBLEM="Unable to update settings."
JBLOGO=/usr/share/icons/hicolor/48x48/apps/rhythmbox.png
# You might want to change this, as rhythmbox.png was the only 
# speaker picture Ray M could find on his computer, as well as
# being located on mine.

# And go

pactl list short sink-inputs|while read stream; do
    streamId=$(echo $stream|cut '-d ' -f1)
pactl move-sink-input "$streamId" bluez_sink.$DEV
done

pacmd set-card-profile bluez_card.$DEV a2dp_sink
pactl set-default-sink bluez_sink.$DEV
pactl set-sink-volume  bluez_sink.$DEV 100%

if [ $? -eq 0 ]
then
   notify-send -i $JBLOGO -t 3000 "$TITLE" "$CONNECTED" 
else
   notify-send -i gtk-dialog-warning -t 3000 "$TITLE" "$PROBLEM"
fi


hsp-hfp.py script

Code: Select all

# This is a modified script, based on a script 
# originally written and submitted to askubuntu.com by Ray M.
# 
# This script is to switch the headphone profile to
# HSP/HFP prior to turrning the headphones off.
#
# Enter the ID of your device here
# To find the device ID for your headphones,
# from the command line, type "pacmd info |grep bluez" 
#  (without the quotation marks) and press enter.
# About the 4th line down, there should be a line that
# shows something like - name: <bluez_sink.FC_A8_9B_3A_7E_42>
# In this example, the FC_A8_9B_3A_7E_42 would 
# be the device ID.

MAC=FC_A8_9A_3B_9F_67

# Let's get ready
# Convert device address per pulseaudio standards
DEV=$(echo $MAC|tr ':' '_')
TITLE="Uproar $MAC"
CONNECTED="Audio connection updated."
PROBLEM="Unable to update settings."
JBLOGO=/usr/share/icons/hicolor/48x48/apps/rhythmbox.png
# You might want to change this, as rhythmbox.png was the only 
# speaker picture Ray M could find on his computer, as well as
# being located on mine.


# And go


pacmd set-card-profile bluez_card.$DEV headset_head_unit



if [ $? -eq 0 ]
then
   notify-send -i $JBLOGO -t 3000 "$TITLE" "$CONNECTED" 
else
   notify-send -i gtk-dialog-warning -t 3000 "$TITLE" "$PROBLEM"
fi


sam_49
Level 3
Level 3
Posts: 195
Joined: Sun Mar 01, 2015 4:20 am
Location: Angers
Contact:

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by sam_49 »

i tested the script but i have an error. Can you help me please

Code: Select all

python3.9 uproar.py
  File "/home/samuel/Bureau/bluetooth/uproar.py", line 13
    MAC= 00_23_13_01_F0_CA
                    ^
SyntaxError: invalid decimal literal
Total_Blue
Level 3
Level 3
Posts: 113
Joined: Wed Sep 07, 2011 5:01 pm

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by Total_Blue »

I am currently running Linux Mint 20.1 so no longer use the scripts, however I will try and help you with them,

For your device, you have MAC= 00_23_13_01_F0_CA. There should be no space between the MAC and the 00_23_13_01_F0_CA. Change it to MAC=00_23_13_01_F0_CA and give that a try.
sam_49
Level 3
Level 3
Posts: 195
Joined: Sun Mar 01, 2015 4:20 am
Location: Angers
Contact:

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by sam_49 »

I've tested with the correction but no change

Code: Select all

python3.9 uproar.py
  File "/home/samuel/Bureau/bluetooth/uproar.py", line 13
    MAC=00_23_13_01_F0_CA
                   ^
SyntaxError: invalid decimal literal
Total_Blue
Level 3
Level 3
Posts: 113
Joined: Wed Sep 07, 2011 5:01 pm

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by Total_Blue »

What version and flavour of Linux Mint are you running? These were written for Linux Mint Mate 18.1, so the bluetooth setup may be different in a different version. For instance, I am now running Linux Mint Cinnamon 20.1, and no longer need to use the scripts as the bluetooth issue has been corrected.
sam_49
Level 3
Level 3
Posts: 195
Joined: Sun Mar 01, 2015 4:20 am
Location: Angers
Contact:

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by sam_49 »

Thank for your reply. This is my hardware and software information
My problem is to change the audio profile of my bluetooth headphone. It isn't possible to change to A2DP sink
Image

Code: Select all

Host: samuel-H110M-S2PV Kernel: 5.4.0-73-generic x86_64 bits: 64 
  Desktop: Cinnamon 4.8.6 Distro: Linux Mint 20.1 Ulyssa 
Machine:
  Type: Desktop System: Gigabyte product: H110M-S2PV v: N/A 
  serial: <superuser/root required> 
  Mobo: Gigabyte model: H110M-S2PV-CF v: x.x 
Image
Total_Blue
Level 3
Level 3
Posts: 113
Joined: Wed Sep 07, 2011 5:01 pm

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by Total_Blue »

Ok, we are both running Linux Mint Cinnamon 20.1. Unfortunately, I do not know what else to suggest. When I turn on my bluetooth headphones. they come on already set to A2DP in sound settings.

Sorry I was not more help.
sam_49
Level 3
Level 3
Posts: 195
Joined: Sun Mar 01, 2015 4:20 am
Location: Angers
Contact:

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by sam_49 »

ok, i don't understand because my bluetooth speakers are automaticaly in A2DP profiles but my 2 headphones still in HFP profil :shock: :( :(

Anyone else i'd be able to trouble ?
Total_Blue
Level 3
Level 3
Posts: 113
Joined: Wed Sep 07, 2011 5:01 pm

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by Total_Blue »

You may want to start a new message regarding your issue. This message says it is for mate 18.1 and marked as solved, so may not get many people looking at it. By starting your own topic, you will have a better chance of getting other, more knowledgeable people than me, seeing it.
User avatar
Larry78723
Level 14
Level 14
Posts: 5479
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Uproar Bluetooth Headphones on Mate 18.1 [Solved]

Post by Larry78723 »

You also need to do an upgrade or clean install of the LM19.x or 20.x series. LM18 has reached End of Life and will receive no updates in the future.
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
Locked

Return to “Hardware Support”