Ubuntu Bluetooth Overview

Source: Internet
Author: User

Let me come with you to squeeze out the potential of ubuntu! I use Ubuntu 9.10. I have never tested any other version. You can try it on your own. In addition, it should be noted that the gnome-Bluetooth tool provided by Ubuntu is not very useful, and it will be very inconvenient to use gnome-Bluetooth When configuring Bluetooth stereo support later, we recommend that you install and use the blueman management tool. Of course, do not install blueman directly in the new IDE. If you install blueman directly, it will not replace gnome-Bluetooth. As a result, the conflict between the two will be very tragic... We recommend that you add the PPA source of blueman.

 
Https://launchpad.net /~ Blueman/+ archive/PPA

Then install blueman and it will automatically replace gnome-Bluetooth. We recommend that you update all software packages related to Bluetooth. After testing, the updated compatibility and performance will be better. Of course, if you don't want to use blueman, it's all right, it's a bit of a hassle. I will describe it in detail later.

In addition, if you are using an external USB Bluetooth adapter, you may be unable to manage it when you plug it into your computer and start it on your computer. The solution is to unplug it and then plug it in or run it on your terminal.

 
Sudo/etc/init. d/Bluetooth restart

To restart the Bluetooth service.

First, let's look at how to build Ubuntu into a Bluetooth hands-free device. Here we will invite the main character-HFP for Linux.

HFP for Linux is a tool that provides Bluetooth HFP (hands-free support) in Linux. Let's take a look at the pictures on the home page and you will understand what is going on.


Image 1


Next we will compile and install. First, install some packages required for compilation.

 
Sudo apt-Get install subversion g ++ Autoconf libtool libspeexdsp-dev libasound2-dev libbluetooth-dev libaudiofile-dev libdbus-1-dev

Then use SVN to obtainSource code

SVN Co https://nohands.svn.sourceforge.net/svnroot/nohands/trunk

Go to sourceCodeTo start compilation and installation.

 
./Autogen. Sh./configuremakesudo make install

Compilation and installation are complete. Then run hfconsole, and a dial page appears. We paired our cell phone in it and waited for the signal and power indicator on the interface to appear!


Image 2

Try a call? Why is there no sound in the computer's speakers? Don't worry. Click the setting button in the lower-right corner. On the audio device tab, try changing OSS in driver. Click the following feedback test. If the microphone sound can be heard, it will be normal. What if the OSS does not display any error message, but there is still no sound? Don't worry. First, set the sound.ProgramAre you sure you have set the microphone? Open the recorder program and record a piece. How can this problem be solved? Or the microphone volume is too small. Run alsamixer to increase the mic boost. As for alsamixer, you may not be able to save the volume settings. The next time you start the system, you will not be able to solve the problem by Google. I don't know why. I can only use OSS here. However, the OSS exclusive sound card, so when you use it, you should retire all your music players ...... Or you can try to wrap it with aoss.

If everything is normal, we can leave our cell phone aside and call our computer! If you are a strong player, you can try to use a tablet, netbook, advanced MP4, or something to create your own hands-free car Bluetooth system. Linux is a great pleasure ~

~~~~~~~~~~~~~ Split line ~~~~~~~~~~~~~

Next, we will enable the support for a2dp audio source stream in Ubuntu. Is to build a computer into a stereo Bluetooth headset.

Here is a detailed description in English. If you have a good foreign culture and a high wall flip capability, you can go and have a look at it ~

Go to the topic. First, make sure that your system contains the pulseaudio-module-Bluetooth module. If you do not have the pulseaudio-module-Bluetooth module, you can use apt-get to install the module. Then load the module

Pactl load-module-Bluetooth-discover

In ubuntu 9.10, it seems that this module is automatically loaded by default. This part is skipped.

Modify the/etc/Bluetooth/audio. conf file to enable audio source support. In

 
# If we want to disable support for specific services # defaults to supporting all implemented services # disable = control, Source

Add a row under these rows

 
Enable = Source

Save and close. Restart the Bluetooth service, that is, sudo/etc/init. d/Bluetooth restart.

Then, if you are using blueman, the effect will be immediate. Re-search and pair your mobile phone. If your mobile phone supports Bluetooth stereo headphones, right click on your device list, you will see the words audio source under connect. Click Connect and use your cell phone to play a music. How about it? The computer's horn is ringing ~ The following figure shows the effect of connecting to my iPod Touch.


Image 3


Image 4


But if you really don't want to use blueman, are you sure you want to use Ubuntu's default Bluetooth manager? Okay, no way ...... First, you may need D-feet, a D-bus debugging tool. Apt-Get or new installation.

Repairing your device in the Bluetooth manager, Run D-feet, and click Org. bluez, find the project corresponding to the MAC address of your Bluetooth device on the right side, and expand Org. bluez. audiosource/methods, double-click Connect (),.

Next, a box is displayed, and click execute. You may need to try multiple times. Then open the sound settings and check the hardware bar. Is there an a2dp device?


image 5

image 6

The Bluetooth a2dp stream has been successfully input into pulseaudio. Next you can select this as the input device, and then record a piece of audio to see... But how can we make the sound play directly from the speaker? If you want to use blueman, will it be so troublesome...

Open pacmd and go to the pulseaudio console. Run the "List-sources" command to find the input source corresponding to your Bluetooth device. Pay attention to the MAC address and write down the name. Then use list-sinks to find out the name of the output device you need. Generally, there is only one. Run the load-module-loopback source = <name of the Input Source> sink = <name of the output device> command to connect the device! If the cost is so great, you can change blueman quickly. They will help you automatically!

In addition, the sound quality of Bluetooth stereo may not be as good as you think... Maybe it's because I'm using dozens of fake Bluetooth adapters. In addition, my computer's bluetooth stereo and BlackBerry are extremely incompatible and completely unusable. I don't know why...

How about a small Bluetooth, We have squeezed out so many potentials of ubuntu. Also, if you are a strong player, you can try using a tablet, netbook, advanced MP4, or something to create your own Bluetooth car entertainment system. How about Linux ~

Author: ivan_wl (Twitter: @ ivan_wl)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.