Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Linux


Reply
 
Share Thread Tools Display Modes
Old 10-18-2008, 04:19 AM   #1
Newbie
 
samr7's Avatar
 
Join Date: Mar 2006
Posts: 41
samr7 is on a distinguished road
HFP for Linux Bluetooth Hands Free

I'm trying to put together support for Bluetooth Hands-Free Profile on Linux. We all know what a mess Bluetooth HFP is on Windows, and the lengths that some will go through to get it to work despite the fragmented infrastructure. Fortunately, on Linux, we are blessed with a single good standard of BlueZ. One would think that it could only be easier to create a good HFP implementation on Linux. I hope to prove that to be the case.

Recently posted on SourceForge, in the subversion repository:

http://nohands.sourceforge.net/

This package aims to support a variety of relevant standards:
  • Bluetooth HFP 1.5, although presently only tested with Motorola handsets
  • ALSA and OSS sound drivers
  • libspeexdsp for noise reduction/echo cancelation
  • D-Bus for environmental integration and external control
  • PyGTK and Qt GUIs

With luck, this package will make its humble debut as a plugin for tripzero's nGhost 2.1 platform, due to be released within a month.

Any code/testing/interest is appreciated!

Attached Images
 

Last edited by samr7; 10-18-2008 at 10:18 PM.
samr7 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 10-22-2008, 09:19 AM   #2
Newbie
 
Join Date: Aug 2008
Posts: 4
dinuxlt is an unknown quantity at this point
hi,

i get this errors:
[dinux@advancedit nohands-20081022]$ ./configure --prefix=/usr
./configure: line 1817: AM_MAINTAINER_MODE: command not found
./configure: line 1819: syntax error near unexpected token `ON'
./configure: line 1819: `DX_HTML_FEATURE(ON)'

do you have any advices?
I'm using linux in my car? (www.archlinux.org)
dinuxlt is offline   Reply With Quote
Old 10-22-2008, 04:00 PM   #3
Newbie
 
Join Date: Jul 2007
Posts: 17
Malo is an unknown quantity at this point
Wow.. I give all my support, but i'm not a great programmer.. i hope that someone join this project, because I was looking for this feature for so much time...
Malo is offline   Reply With Quote
Old 10-23-2008, 12:08 AM   #4
Maximum Bitrate
 
Join Date: Oct 2006
Posts: 707
Punky is on a distinguished road
does it auto connect? that'll be a super feature !
Punky is online now   Reply With Quote
Old 10-23-2008, 02:12 AM   #5
Newbie
 
Join Date: Aug 2008
Posts: 4
dinuxlt is an unknown quantity at this point
hi,

i get this errors:
[dinux@advancedit nohands-20081022]$ ./configure --prefix=/usr
./configure: line 1817: AM_MAINTAINER_MODE: command not found
./configure: line 1819: syntax error near unexpected token `ON'
./configure: line 1819: `DX_HTML_FEATURE(ON)'

do you have any advices?
I'm using linux in my car (www.archlinux.org)
dinuxlt is offline   Reply With Quote
Old 10-23-2008, 02:17 AM   #6
Newbie
 
Join Date: Aug 2008
Posts: 4
dinuxlt is an unknown quantity at this point
hi,



i get this errors:

[dinux@advancedit nohands-20081022]$ ./configure --prefix=/usr

./configure: line 1817: AM_MAINTAINER_MODE: command not found

./configure: line 1819: syntax error near unexpected token `ON'

./configure: line 1819: `DX_HTML_FEATURE(ON)'



do you have any advices?

I'm using archlinux in my car (www.archlinux.org)
dinuxlt is offline   Reply With Quote
Old 10-23-2008, 12:57 PM   #7
Newbie
 
samr7's Avatar
 
Join Date: Mar 2006
Posts: 41
samr7 is on a distinguished road
Quote: Originally Posted by Malo View Post
Wow.. I give all my support, but i'm not a great programmer.. i hope that someone join this project, because I was looking for this feature for so much time...

Thanks Malo, I hope so too.

You don't need to be able to program to help. If you can build it on your machine, or even try to build it and tell me why it won't build, this helps. If you can get as far as to test it with your phone, that helps a lot more.

Quote: Originally Posted by Punky View Post
does it auto connect? that'll be a super feature !

Hi Punky. What do you mean by auto-connection?

Auto-connection of _known_ devices, at least, is an implemented feature! It has also been tweaked to work following resume-from-hibernate, so if you leave hfconsole running with the phone attached when hibernating the PC, the phone is automatically re-attached when the PC is powered back on. It's a quick process too.

One of these days I'll post an action video on YouTube, but as soon as the user interface components are better integrated with nGhost.
samr7 is offline   Reply With Quote
Old 10-23-2008, 04:11 PM   #8
Newbie
 
Join Date: Aug 2008
Posts: 5
ertnec is an unknown quantity at this point
I'll give it a go building this on my setup (Gentoo AMD64 2.6.27), and report back if it works or not

**update**

Compiled fine, but...

Code:
** OpLatency: primary open took 40ms Create SCO socket: 93 Bluetooth Failure, hub shut down Create SCO socket: 93

Bluetooth just refuses to work full stop...

Last edited by ertnec; 10-23-2008 at 04:27 PM. Reason: update on building...
ertnec is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 10-23-2008, 05:35 PM   #9
Newbie
 
samr7's Avatar
 
Join Date: Mar 2006
Posts: 41
samr7 is on a distinguished road
Quote: Originally Posted by ertnec View Post
Code:
** OpLatency: primary open took 40ms Create SCO socket: 93 Bluetooth Failure, hub shut down Create SCO socket: 93

Bluetooth just refuses to work full stop...

Hm. Is your kernel built with SCO socket support? Gotta have that for the audio to work.

The error reporting is a bit lame right now, I'll see about having it make this condition more obvious.

samr7 is offline   Reply With Quote
Old 10-23-2008, 11:24 PM   #10
Maximum Bitrate
 
Join Date: Oct 2006
Posts: 707
Punky is on a distinguished road
Oh this is looking good, linux is finally picking up momentum, and hopefully we'll have a carpc dedicated linux soon. Great job!
Punky is online now   Reply With Quote
Old 10-24-2008, 03:16 PM   #11
Newbie
 
Join Date: Jul 2007
Posts: 17
Malo is an unknown quantity at this point
Oh Man! You are a GOD Wonderful Just compiled

I've got a Nokia 6680.. I start standalone and scan.. My mobile it's recognise. Then, i try to dial a number and.. Suprise The call start

Only one thing.. I can only hear noise, no real voice.. Only noise
But great job! It's like i've got bad amplification for the sound.. I'm sure it's only a little problem of configuration..
Malo is offline   Reply With Quote
Old 10-24-2008, 03:35 PM   #12
Newbie
 
Join Date: Jul 2007
Posts: 17
Malo is an unknown quantity at this point
And as your project page suggest.. My config is Archlinux 2.6.26 32bit on amd64.. And my usb dongle is D-Link Corp. DBT-122 Bluetooth adapter..
Malo is offline   Reply With Quote
Old 10-24-2008, 06:29 PM   #13
Newbie
 
samr7's Avatar
 
Join Date: Mar 2006
Posts: 41
samr7 is on a distinguished road
Quote: Originally Posted by Malo View Post
Only one thing.. I can only hear noise, no real voice.. Only noise
But great job! It's like i've got bad amplification for the sound.. I'm sure it's only a little problem of configuration..

Hi Malo,

I'm glad it sorta worked for you! Sorry the audio quality is stinking. Have you tried running the feedback test mode or the DSP test mode?
samr7 is offline   Reply With Quote
Old 10-25-2008, 12:04 PM   #14
Newbie
 
Join Date: Jul 2007
Posts: 17
Malo is an unknown quantity at this point
I made some tests.. I set up my pc audio level with the feedback test mode, i can speak into the micropone (mic line source) and hear myself in the speakers. Then i tried to make a call (a free call to my GSM service provider ) but i still hear only noise from the speaker. I'm not english, so it's difficult for me explain exactly what I get.. I know that when I call my service provider there is a recorded voice that tell me some information.. When I use the pc as headset, i only hear bass tone, noise and I can understand only some pieces of the recorded voice. Any suggestion?

I can tell you also that i hear noise when I press the mobile phone button.. The pc doesn't reproduce correctly digit tones.. Everything that i should hear from the headset it's.. like crappy, broken. I hope you understand me

Then i tried to have a call where I spoke into the microphone of the pc and hear from another phone that a was calling.. I get no sound . It's like what i spoke into the mic is not send to mobile micropone..

And I notice others minor bugs.. When I call the mobile the caller number is showed correctly, but when I dial a new number from the QT interfaces, the last recevied called number is displayed, otherwise the telefone dial the correct number.
I don't know if it's a bug only of the QT interface or of the rest of the backend.

Also, if I hadn't recevied call with the QT interfaces connected, when i dial a number nothing is displayed next to "dialing". I think that the bug it's related with what i wrote before.

And another little bug is that I can't reject incaming call.. I click reject, but nothing appens. Otherwise, if i make a call and press "Hang Up", it works

Another thing.. It could be possible to see a sort of "history" of associated phones, and the name of the telephones.. Having something like "MyMobileBTName (AA:BB:CCD:EE)". I cheked "auto-reconnect" option in the settings, and it's listed last connected mobile. Having a history of mobile i can try to connect to the one listed also when the mobile is in hidden bluetooth mode.

Last, i have other suggestion, but they are a very minor thing. A sort of integration, into nghost, with GAMMU to get my telephone phonebook (contacts) and SMS?
But i thik that it could be a feature that i want only after a stable version of this HFP plugin.

Again.. Nice job man . This project it's looking so interesting
I hope i can call soon someone trought my pc
Malo is offline   Reply With Quote
Old 10-25-2008, 02:12 PM   #15
Newbie
 
samr7's Avatar
 
Join Date: Mar 2006
Posts: 41
samr7 is on a distinguished road
Quote: Originally Posted by Malo View Post
I made some tests.. I set up my pc audio level with the feedback test mode, i can speak into the micropone (mic line source) and hear myself in the speakers. Then i tried to make a call (a free call to my GSM service provider ) but i still hear only noise from the speaker. I'm not english, so it's difficult for me explain exactly what I get.. I know that when I call my service provider there is a recorded voice that tell me some information.. When I use the pc as headset, i only hear bass tone, noise and I can understand only some pieces of the recorded voice. Any suggestion?

I can tell you also that i hear noise when I press the mobile phone button.. The pc doesn't reproduce correctly digit tones.. Everything that i should hear from the headset it's.. like crappy, broken. I hope you understand me

Then i tried to have a call where I spoke into the microphone of the pc and hear from another phone that a was calling.. I get no sound . It's like what i spoke into the mic is not send to mobile micropone..

Hmm.

The last time I had a problem where the test modes would work, but audio to and from the phone wouldn't, it was because the audio buffering parameters were unsuitable. The buffer fill level data is used for rate matching and to decide when to drop data or add silence padding. What console output do you get immediately after you attach the mobile phone audio? There should be a table like this:

Code:
Pump: packet size = 24 Pump: input max fill = 340 Pump: bot packet size = 170 Pump: bot min fill = 320 Pump: bot max fill = 490 Pump: top packet size = 24 Pump: top min fill = 320 Pump: top max fill = 400 Pump: watchdog timeout = 500

If the "bot packet size" is < 100 samples, you might consider increasing the packet size and output buffer settings in the audio device tab of the configuration screen. In general, tweaking those parameters can help a _lot_. I'd rather it be more automatic than it currently is though. :-(

Another possibility that I have not yet had to explore has to do with your Bluetooth module's voice coding configuration. When you run (as root) the hciconfig command as below, what do you get?

Code:
ricer trunk # hciconfig hci0 voice hci0: Type: USB BD Address: 00:16:CB:0B:DA:D7 ACL MTU: 384:8 SCO MTU: 64:8 Voice setting: 0x0060 (Default Condition) Input Coding: Linear Input Data Format: 2's complement Input Sample Size: 16 bit # of bits padding at MSB: 0 Air Coding Format: CVSD

If the input format is not 2's complement and 16-bit, then we might have issues. The HFP app needs to ask the HCI and verify this stuff by itself, but I've never encountered a situation where it hasn't been configured this way from the beginning.

Quote: Originally Posted by Malo View Post
And I notice others minor bugs.. When I call the mobile the caller number is showed correctly, but when I dial a new number from the QT interfaces, the last recevied called number is displayed, otherwise the telefone dial the correct number.
I don't know if it's a bug only of the QT interface or of the rest of the backend.

Also, if I hadn't recevied call with the QT interfaces connected, when i dial a number nothing is displayed next to "dialing". I think that the bug it's related with what i wrote before.

And another little bug is that I can't reject incaming call.. I click reject, but nothing appens. Otherwise, if i make a call and press "Hang Up", it works

The Qt GUI isn't meant to be the main interface. Instead, what you ought to do is 'make install' and then run hfconsole. It does require Python and a few Python binding packages, but it's the designated path forward right now.

As for phone number display, the Qt GUI most certainly has some bugs. However, the way that the backend manages caller ID and outbound phone number information needs to be revised a little bit.

As for the reject call feature in the Qt GUI, it is hard coded to use the AT+CHLD=0 command, a.k.a. User Declare User Busy, which may or may not be supported by your phone. This is certainly a bug, and there is a more commonly used way to reject calls that it should be using instead. I think I may have put that in there to test the UDUB command.

Quote: Originally Posted by Malo View Post
Another thing.. It could be possible to see a sort of "history" of associated phones, and the name of the telephones.. Having something like "MyMobileBTName (AA:BB:CCD:EE)". I cheked "auto-reconnect" option in the settings, and it's listed last connected mobile. Having a history of mobile i can try to connect to the one listed also when the mobile is in hidden bluetooth mode.

Last, i have other suggestion, but they are a very minor thing. A sort of integration, into nghost, with GAMMU to get my telephone phonebook (contacts) and SMS?
But i thik that it could be a feature that i want only after a stable version of this HFP plugin.

These are both very good ideas. I'll need to spend some time learning how Gammu works, but having an off-the-shelf package to do contacts and SMS like that is going to lead to something that's pretty cool.

Unless somebody else wants to volunteer to do this integration?

The hfconsole program is written in Python, and uses D-Bus to control hfpd. It is very high level, but has a part in configuring just about every aspect of the hands-free profile service, including the audio pipeline. It could be easily extended with Gammu's Python bindings, and should have enough control, if needed, to disconnect the HFP link while the SPP link is open to perform Gammu tasks.

Quote: Originally Posted by Malo View Post
Again.. Nice job man . This project it's looking so interesting
I hope i can call soon someone trought my pc

Thank you for your kind words. Personally, the lack of a good hands-free is frustrating. Parrot devices are really high quality, but they don't do anything we shouldn't already be able to do with a (more capable) PC loaded with the right software.
samr7 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions on getting FREE wireless internet from T-Mobile using GPRS bankingdom Wireless Communications 296 10-12-2008 10:54 PM
Proper Bluetooth phone application (Paid or free) f1racr Wireless Communications 2 06-28-2008 10:41 PM
Free Bluetooth Headset for people in L.A. Rafster Off Topic 0 06-18-2008 01:14 AM
Getting free internet from my Telus mobility free incoming call plan(just an idea) nobb Wireless Communications 0 02-15-2007 11:12 AM



All times are GMT -5. The time now is 12:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics