PDA

View Full Version : Phone plugin using Windows BT Stack



Hadaak
01-13-2012, 03:18 PM
I'm not a developper but I can make my way through visual studio if I need something and after buying a soho card and an Andrea DA-350 microphone I feel the need for a decent phone solution in my car.
This post is an echo to a bt discussion going on in the CF 4.1 wish list.
Windows has decent BT support according to I quickly read today. So let's start something here. My idea might be total delirium but we need something.


Here are some notes on BT in win7. I've read on another post that HSP and HFP are the profiles needed for BT phone support. They are here. XP users will have to upgrade. As fas as i know Windows 7 never unpaired my Iphone for no reason as does Bluesoleil :-) and I don't need an complete-waste-of-time activation mechanism to use BT

So, any pro developpers out there?

We can do with an initial plugin which has a Dial pad, a dial/hangup button :rock:

http://wiki.topex.ro/images/thumb/0/03/Dial_pad.jpg/250px-Dial_pad.jpg




Bluetooth in Windows 7 (http://www.alanjmcf.me.uk/comms/bluetooth/Bluetooth%20in%20Windows%207.html#_Toc280003356)

Slide 12: Summary of what’s new in Windows 7

• Bluetooth Integration into Devices and Printers UX
• In-Box support for Bluetooth Audio
• Bluetooth v2.1 Support
• Improved Power Management
Bluetooth radio can enter Selective Suspend while connections are in sniff mode.
• USB Class Match for Bluetooth Dongles
In-box support for 100% of Bluetooth dongles.
Slide 13: Devices And Printers

Bluetooth Integration into Devices and Printers UX
• Pairing Wizard Launch Point
• Problem resolution entry point
• Photorealistic icons
• Collecting point for all devices
• Customizable context menus
• Device Stage for Windows Portable Devices (WPD)
Slide 15: Inbox Bluetooth Profile Support

Windows 7 added: A2DP, Handsfree, Headset, and AVRCP.
Previously: HID, Serial Port, OPP, PAN, DUN, and HCRP.
Slide 18: Extended Inquiry Response

(Remember that Device Discovery has: Step 1: Inquiry, Step 2: Name Discovery)
• Bluetooth v2.1’s Extended Inquiry Response (EIR) can combine steps 1 and 2.
• EIR Packet can provide, Local Name (Bluetooth Device Name), Service Class UUIDs, TX Power Level, Device ID, or Manufacturer Specific Data.
• Microsoft Windows uses EIR to supply its Bluetooth Device Name and to fetch Bluetooth Device Names.

Hadaak
01-13-2012, 04:58 PM
I found this and I'm playing with it right now :

Bluetooth PC Dialer, Outlook, Mobile Phone, Call, PC, Download (http://www.blueshareware.com/bluetooth_pc_dialer.asp)

Hadaak
01-13-2012, 04:59 PM
Direct out of the box support for all Bluetooth PC stacks (BlueSoleil, Microsoft, Toshiba, WidComm)

Hadaak
01-13-2012, 05:11 PM
and I don't care if phone support is done outside of CF for a start !

Louk
01-13-2012, 11:29 PM
I think the best approach is a plugin / app integrated in CF, and at first sight, this must be possible, using the libraries mentioned in the "no complain" thread (the BT framework library (http://www.btframework.com/download_net.htm), that costs at least a 100 us dollar to license or Mark's proposal, the 32 ft library (http://32feet.codeplex.com/)). Integrated, because I realy would like to stop whatever is playing when a phone call is coming in. And when the navigation app has something to say, it should attract the attention of the user without disturbing the phone conversation (e.g. with a beep or instructions at a lower volume).

With these library, you could support both XP (BlueSoleil drivers) and 7 (M$ drivers).

But actually I think that this should be done by Flux: Adding support for standard Windows 7 BT drivers to the existing phone app, using one of the libraries mentioned above. This would increases the overall quality and stability of CF.

And for the people who can't wait, use the out of the box solution mentioned in the previous post...

Mark
01-15-2012, 03:26 AM
Well I spent some time with the Wireless Communications Library (this: Wireless Communication Library - Bluetooth, WiFi, IrDA support for your applications (http://www.btframework.com/) ) and with the 32feet.net library and the news is not good. Yes, they both support most popular Bluetooth stacks, including the default Microsoft stack.

But the only Bluetooth stack which is supported for hands-free operations (what you have/want in Centrafuse) is Bluesoleil. READ THAT AGAIN. 32feet.net only provides the possibility of supporting the control functions of hand-free profile (answer/dial), but it provides no support at all for audio transfer. So you can control your phone, but all the audio stays on the phone.

The Wireless Communication Library DOES provide complete support for the hands-free profile (control/audio)...but only with the BlueSoleil stack. It does not support hands-free profile with Microsoft, Toshiba or WidComm. Nada. Zilch. Nothing.

So there you go. The other Bluetooth stack manufacturers simply do not expose the hands-free capability to 3rd party libraries/vendors. and without that, you can't build anything that will work with Centrafuse, Road/Ride Runner, or anything else.

I will continue to work with the WCL library to see what I can do, but the problems/incompatabilities associated with the BlueSoleil stack will probably continue to be present.

Mark

Hadaak
01-16-2012, 09:33 AM
thanks for the info, Mark. This does not look promising :-( But keep up the good work :-)

Hadaak
01-17-2012, 09:21 AM
OK. I'm still playing with my bluetooth connection. I went back to BS version 6 as 8 doesn't keep the connection. I'm using an ebay CSR chip based dongle and I noticed this behaviour:
- Audio streaming from phone to CarPC is prety good.
- Microphone recording (Andrea DA-350) is pretty good too.
But When using the phone it seems that data/audio transfer from bluetooth dongle to phone (Iphone 4) is crappy. People on the other side of the line says they don't hear me very well. When I record voice messages on my phone voice mail the message (caling my own number) starts fine but get scrambled after a few seconds.
I'm trying to find the culprit here. is it the microphone, the BT dongle, the BS stack, the Centrafuse implementation of the BS stack ????
Any hint on what' might be causing this ?
Next step is try another phone. I have an old Sony-Ericsson P990i lying in a drawer.
If isuse persists I'll get a Targus BT dongle as advised by Mark :(Targus Ultra Mini Bluetooth 2.0 Adaptor Network adapter - USB (http://www.google.com/products/catalog?hl=en&biw=1920&bih=1075&q=targus+bluetooth+adapters&gs_upl=5290l9223l0l9434l18l10l0l4l4l0l1342l3501l3-1.0.1.0.2l4l0&bav=on.2,or.r_gc.r_pw.,cf.osb&um=1&ie=UTF-8&tbm=shop&cid=12487601873440031384&sa=X&ei=m1b7TsnIMOGsiAKP8ontDg&ved=0CJUBEPMCMAQ)#)

Cool Hand
01-17-2012, 04:32 PM
I had a similar issue once. Very horrible sound over phone. Turned out the distance of the phone to the BT adapter was too big (3 meters outside the car) and the phone reception wasnt that well either.

Mark
01-17-2012, 06:14 PM
OK. I'm still playing with my bluetooth connection. I went back to BS version 6 as 8 doesn't keep the connection. I'm using an ebay CSR chip based dongle and I noticed this behaviour:
- Audio streaming from phone to CarPC is prety good.
- Microphone recording (Andrea DA-350) is pretty good too.
But When using the phone it seems that data/audio transfer from bluetooth dongle to phone (Iphone 4) is crappy. People on the other side of the line says they don't hear me very well. When I record voice messages on my phone voice mail the message (caling my own number) starts fine but get scrambled after a few seconds.
I'm trying to find the culprit here. is it the microphone, the BT dongle, the BS stack, the Centrafuse implementation of the BS stack ????
Any hint on what' might be causing this ?
Next step is try another phone. I have an old Sony-Ericsson P990i lying in a drawer.
If isuse persists I'll get a Targus BT dongle as advised by Mark :(Targus Ultra Mini Bluetooth 2.0 Adaptor Network adapter - USB (http://www.google.com/products/catalog?hl=en&biw=1920&bih=1075&q=targus+bluetooth+adapters&gs_upl=5290l9223l0l9434l18l10l0l4l4l0l1342l3501l3-1.0.1.0.2l4l0&bav=on.2,or.r_gc.r_pw.,cf.osb&um=1&ie=UTF-8&tbm=shop&cid=12487601873440031384&sa=X&ei=m1b7TsnIMOGsiAKP8ontDg&ved=0CJUBEPMCMAQ)#)

I wouldn't get my hopes up with the Targus dongle. I have 4 dongles (Targus, CSR, Broadcom and the one on my Asus MB). Using the latest BS stack (8.0.376 ?), with all of them (except the Asus), I get more or less identical audio performance. Using the standard Microsoft stack and Windows 7 headset mode, the Asus works about the same.

The point is, with my Droid Razr, they all work pretty well. The dongle may play a role, but the most likely culprit is the BlueSoleil stack's compatibility with the iPhone. I'm going to try and put out a little test app in a week or so. It will use the BlueSoleil stack too, and we can try and use it to isolate specific problem areas by rapidly changing the code to look at different behaviors. That's not really anything we can do with the phone app in Centrafuse because of it's heavy integration with the core.

I don't plan on doing anything with noise reduction and echo cancellation at this point. Those are audio issues and outside the scope of this effort. This is focused on getting consistent, reliable connectivity from the BT stack.

Cheers!

Mark

sebberry
01-17-2012, 08:18 PM
But the only Bluetooth stack which is supported for hands-free operations (what you have/want in Centrafuse) is Bluesoleil. READ THAT AGAIN. 32feet.net only provides the possibility of supporting the control functions of hand-free profile (answer/dial), but it provides no support at all for audio transfer. So you can control your phone, but all the audio stays on the phone.


I've had an idea - it's a compromise but better than nothing.

Don't all phones have a headset connection that supports audio out and mic in?

I realize it sort of defeats the purpose of BT, but it could work:

Bluetooth control is done via BT - answering, hanging up, etc. This would allow CF to pause or mute whatever music is being played via the internal player yet still allow spoken navigation commands to play through.

The cabin microphone would be wired to the phone's mic-in line, and the phone's output (to hear the person on the other end of the phone) would go to the car PC and be played through the car's speakers. If I'm not mistaken, phones have some built in echo cancellation?

You could even work some magic with a gadget like MJS's line in device - auto switch to Aux 4 when in a call so that the phone's audio output is sent to the PC. This would be good when using devices like Sirius or HD radio with the aux-in port.

Mark
01-17-2012, 09:34 PM
I've had an idea - it's a compromise but better than nothing.

Don't all phones have a headset connection that supports audio out and mic in?

I realize it sort of defeats the purpose of BT, but it could work:

Bluetooth control is done via BT - answering, hanging up, etc. This would allow CF to pause or mute whatever music is being played via the internal player yet still allow spoken navigation commands to play through.

The cabin microphone would be wired to the phone's mic-in line, and the phone's output (to hear the person on the other end of the phone) would go to the car PC and be played through the car's speakers. If I'm not mistaken, phones have some built in echo cancellation?

You could even work some magic with a gadget like MJS's line in device - auto switch to Aux 4 when in a call so that the phone's audio output is sent to the PC. This would be good when using devices like Sirius or HD radio with the aux-in port.

That may certainly be an option. There are several goals:

1. Develop some tools to help us diagnose connectivity and reliability issues as they pertain to the BlueSoleil stack. iPhone support being a high priority.
2. Identify which issues are specific to the stack (IVT responsibility), which issues are related to implementation (Centrafuse responsibility) and which are related to configuration (user responsibility).
3. Establish realistic expectations. The majority of users have unrealistic expectations about how BlueTooth should works on a PC. Whether that's due to marketing hype or a lack of information and education is irrelevant. Bluetooth on a PC is NOT the same as Bluetooth on a purpose-built platform, whether stand-alone (Parrot) or in the car. People need to know what to REALLY expect, then that expectation needs to be met. Part of that understanding is that BlueSoleil is the ONLY Bluetooth stack currently available that supports the hands-free profile for 3rd-party development. There is no other alternative.
4. As you suggested, develop some alternative apps so that users can pick and choose an implementation that might work better for them. They won't be true hands free, but they might provide an acceptable alternative.

The audio selector idea is one I've played with a little bit, and it's actually quite "doable". But it does involve the purchase of additional hardware and added system complexity, along with more wires and more space. There's always a trade-off it seems. Of course, you could just use a wired headset and eliminate the PC audio connection altogether. Cheaper, 100% reliable and no echo to worry about. :)

Mark

Hadaak
01-18-2012, 11:50 AM
Great news, Mark :-) Thanks for the effort.
I downloaded the bluesoleil cphone tool yesterday and I'm playing with it too.

BlueSoleil - Bluetooth Software,Bluetooth Driver,Bluetooth Dongle (http://www.bluesoleil.com/products/S0001201010120001.html)

Hadaak
01-18-2012, 04:19 PM
after several tests with an asus bt dongle (Asus BT-21 hacked to work with bluesoleil as d-link dbt-120 dongle) I found out the following:
Messages left for myself on my gsm provider voice mail are better when the car is at standstill. They are ok when doing 50 km/h but get scrambled when doing 100 km/h.
i'm testing with a SoHO PCI card and an andrea da-350 mic. In the last test I even used a second andrea da-350 mic with the out of the box wiring, no cutting or mixing with other wires, just right over the car seats to the trunk. I suspect the SOHO card to be a bit nifty about noise cancellation. My next step is to test without the SOHO card.
But the puzzle is voice recording works fine through the centrafuse plugin "voice notes" !!!! even at 100 km/h.

Hadaak
01-18-2012, 05:43 PM
just a note: I installed BS version 8.0.376.0 and it seems to hold the conection with the asus dongle.

Hadaak
01-18-2012, 08:25 PM
same result without the SOHO card.
And same result with Centrafuse phone app or BlueSoleil cPhoneTool 2.0.12.0.
Next step is testing another phone, a sonyericsson p990i.

MGD
02-02-2012, 03:12 PM
how about Toshiba Bluetooth Stack
Bluetooth stack - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Bluetooth_stack#Bluetooth_Toshiba_stack).
maybe CF could get API license from toshiba.

Mark
02-02-2012, 03:45 PM
how about Toshiba Bluetooth Stack
Bluetooth stack - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Bluetooth_stack#Bluetooth_Toshiba_stack).
maybe CF could get API license from toshiba.

Nope. I tried the developer trial and it doesn't expose the hands-free component to third-party apps. And it would be significantly more expensive to license. Not going to happen.

Mark

MGD
02-02-2012, 03:55 PM
Nope. I tried the developer trial and it doesn't expose the hands-free component to third-party apps. And it would be significantly more expensive to license. Not going to happen.

Mark

i think there no hope anymore

Mark
02-02-2012, 04:01 PM
i think there no hope anymore

Sure there is...buy a Droid :tongue:

Seriously, BlueSoliel will eventually work out it's issues with the iPhone and probably improve its overall audio stack performance, so there's always hope. But no real timeline for any of that.

Mark

Hadaak
02-06-2012, 09:39 PM
Mark,

Can you take a look here, please :

Bluetooth Driver Stack (http://msdn.microsoft.com/en-us/library/windows/hardware/ff536587(v=vs.85).aspx)

Mark
02-06-2012, 09:46 PM
Mark,

Can you take a look here, please :

Bluetooth Driver Stack (http://msdn.microsoft.com/en-us/library/windows/hardware/ff536587(v=vs.85).aspx)

Yeah, I'm not actually going to be writing my own BT stack. That's really beyond the scope of my capabilities (and interest).

Mark