Hi Phani, there are currently three known problem areas in our IVI 
implementation of HFP:

1) The Russelville bluetooth isn't capable of handling sco audio connections 
via bluetooth. It's an infineon chip configuration issue that we're working on. 
The tentative solution is to use an external bluetooth device like a Rocketfisk 
USB-to-BT dongle.
2) HFP doesn't work with PulseAudio at the moment, it only works with straight 
ALSA (you have to set the audio device to plughw:0). 
3) The pairing process is still pretty buggy. The HandsFree app leaves pairing 
up to the bluez daemon and the gnome bluetooth applet. The two main problems 
are :
 a) the applet doesn't work with some phones: iphone and blackberry for 
example. It seems to have a very rigid expectation of what the pairing steps 
are, and if a phone deviates even a little, the whole process fails.
 b) bluez doesn't always realize that it isn't paired anymore, which causes 
connection issues (it should try to re-pair but since it thinks its paired it 
just tries and fails to connect).

Here are some more detailed workaround instructions:

[ One Time Setup (Platform Config) ]

To get HFP online, you need these packages: hfp, bluez, bluetooth-ivi, and 
bluez-gnome.

The hfp nohands program actually won't work out of the box since by default 
it's configured to use pulseaudio, and audio will only work correctly with 
ALSA. You can change the settings from the GUI, or better yet, just create the 
settings file manually from a terminal. Use vi to open it and fill it with the 
following contents (do this before starting hfconsole, if you've already 
started hfconsole then an instance of hfpd has already been created and you'll 
need to kill it so that these changes will take effect, "killall hfpd").

as user moblin, type:

%> vi /home/moblin/.hfpdrc

# Local settings file for hfpd
# Automatically generated, comments will be lost

[audio]
driver = ALSA
driveropts = plughw:0

[dsp]
denoise = false
echocancel_ms = 0

Next you need to configure the platform to use the USB-to-BT dongle instead of 
the timberdale bluetooth controller. All you have to do is kill the 
hciattach_ivi process and the timberdale bluetooth controller should go away. 
This process is started on boot, so if you disable the service it shouldn't 
start anymore. Run this command (as root) to disable the bluetooth-ivi service:

as user root, type:
%> /sbin/chkconfig --del bluetooth-ivi

[ Once Per Phone Setup (Cell Phone Pairing) ]

In order for the handsfree application to control your cell phone, you first 
have to pair with it. There are two methods for doing this.

METHOD1 - Pairing using Gnome bluetooth applet:

      1 Right click the applet icon and select "setup new device"
      2 After a few seconds (20 seconds tops) the list of available devices 
should appear
      3 Select the cell phone you want to use and click "forward"
      4 A pairing request should appear on the cell phone and some kind of 
message should appear asking if you want to pair with the Russelville, select 
yes on the phone.
      5 The cell phone should then ask for a 4 digit security code. The gnome 
applet autogenerates this code and displays it on the screen. Type this code in 
and accept on the phone.
      6 The cell phone should now be paired with the Russelville.

METHOD2 - Pairing from a terminal shell (do this if the applet fails):

First get the mac address of the cell phone:

As user root, type:
%> hcitool scan
Scanning ...
        00:23:12:a2:f3:26       My iPhone

Then, using the mac address, erase any existing pairing from bluez's memory by 
using the btkillpair script installed with the bluetooth-ivi package (sometimes 
bluez doesn't realize that the pairing was lost, so you need to reset it).

As user root, type:
%> btkillpair 00:23:12:A2:F3:26

Then, using the mac address, pair with the phone using the agent script 
installed with the bluetooth-ivi package:

As user root, type:
%> btsimple-agent hci0 00:23:12:A2:F3:26
RequestPinCode (/org/bluez/1581/hci0/dev_00_23_12_A2_F3_26)
Enter PIN Code: 1234
Release
New device (/org/bluez/1581/hci0/dev_00_23_12_A2_F3_26)
%>

It will ask you to input a pin code, so do it. Then you accept the pairing 
request on the cell phone itself, type in the pin code, and you're good.

Connecting to the phone using handsfree:

Now that your phone is paired, there's one last thing you need to do to get HFP 
working. The HandsFree program is started via Applications->Office->HandsFree. 
On the first run the application won't be configured to use any specific cell 
phoens, so you'll have to have it add yours in. Click the "Search for Device" 
button on the top left. A dialog will appear that runs a device scan. You need 
to select your phone from the list and click "Add". Once you add it, handsfree 
will connect to your phone. It also saves its mac address so that the next time 
you start it will automatically reconnect to your phone. If this step works, 
then your finished setting up.

If, however, your phone refuses to show up in the handsfree dialer's device 
list (even though you've already paired with it), you can just manually add 
your phone to the handsfree program's history cache. Let's say the mac addr of 
your phone is 00:23:12:a2:f3:26, and its name is "My iPhone". Edit the 
following file and add the following line to the [history] section (or copy 
as-is if the file is empty):

as user moblin, type:
%> vi /home/moblin/.hfconsolerc

 [history]
002312a2f326 = My iPhone

Now restart the handsfree application. Click the "Search for Device" button 
again and open the device discovery window. This time, however, click the 
"History" button. The window should switch to the list of devices that 
handsfree found in the .hfconsolerc file. Select your phone and click add. It 
should immediately try to connect. Once it connects, handsfree will set it to 
automatically reconnect on next start and you should be good to go.

[ Once Per Boot Setup (configuring the USB-to-BT dongle ]

You also need to configure the new bluetooth dongle so that it can handle HFP 
correctly. Run these two commands (as root) before starting the nohands dialer 
(needs to be done once after each boot):

as user root, type:

%> /usr/sbin/hciconfig hci0 voice 0x0060
%> /usr/sbin/hciconfig hci0 scomtu 64:8

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Friday, July 31, 2009 6:23 AM
To: [email protected]
Subject: [Moblin Dev] Reg Moblin Bluez

Hello all,
I am trying to use the HFP application released with the Moblin-IVI
alpha-2 version. I was able to pair with a phone successfully and could
connect to it using the Handsfree application. If I disconnect from the
phone and try to connect back from the phone, I was never successful. I
have changed the hci class to name to handsfree, but still no success. I
am attaching the hci-dump. Let me know if any one understands the issue.

One more issue I am facing is that there is some issue with the PA and
it always crashes and I could never hear any Audio over sco on the
target. Let me know if anyone has faced a similar problem and got over
it.

Thanks.

Best Regards,
Phani
*+918041381429

 <<hci_dump.txt>> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com
_______________________________________________
Moblin dev Mailing List
[email protected]

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to