Discussing the nuts and bolts of software development

Tuesday, April 24, 2007


Bluetooth Handsfree Profile Support for Windows Mobile 5 - The Series (Part 1)

Bluetooth Handsfree Profile Support for Windows Mobile 5 - Part 1

Have you ever run into the question of what mechanisms are there for supporting Bluetooth on your WM5 device? What has Microsoft provided to extend the Handsfree profile functionality? How can I use the Audio Gateway?

Very good questions. In this series of articles about Bluetooth support, I'm going to try to fill in the holes. This series is geared towards developers who have experimented with the Audio Gateway and are scratching their heads as to how to get into this "black box".

Microsoft supports Bluetooth with an architecture known as the "Audio Gateway." It consists of the core itself, the Services interface, AT Command Extension Module, Phone Extension Module, and Network Component. All of these components interact with the Core that signals the Bluetooth stack of commands and state changes. To read up on the Audio Gateway architecture, trickle into the MSDN website and search for "Bluetooth Audio Gateway."

Now, as a developer, you're wondering, "How do I get into this darn thing and make it do what I want it to do?"

There are a few ways to interact with the Audio Gateway (which I'll refer to as the "AG").

Firstly, from a services standpoint, Services.exe and the underlying layer of IOCTL calls the core support call enumerations to control the AG. I've listed the constants below. They are also in the .h file. The constants are pretty self-explanatory, so I won't go into much detail about them. Basically, there is the AG service, which we can start, stop and refresh. If the service has started and a Bluetooth device has been paired with the WM5 device, a service level connection must be established with the device as to signal different commands via AT Commands (to be discussed later), which we can start and stop as well. On top of that, the AG can route audio to the Bluetooth headset.

// You can find these within service.h

#define IOCTL_AG_OPEN_AUDIO 0x01
#define IOCTL_AG_SET_MIC_VOL 0x05
#define IOCTL_AG_GET_MIC_VOL 0x07

So, by simply calling these defines within a IOCTL call, you'll be able to achieve basic services support. Note that some defines require you to pass in values. I don't want to go into too much detail about this, since we're just scratching the surface, and I'm hoping as the reader you're asking yourself, "When does the fun really start?"

HANDLE msAGHandle = ::CreateFile( L"BAG0:", 0, 0, 0, OPEN_EXISTING, 0, 0 );
// log something with GetLastError();

BOOL result = ::DeviceIoControl( msAGHandle, IOCTL_SERVICE_STOP, 0, 0, 0, 0, 0, 0 );
if ( FALSE == result )
// log something

::CloseHandle( msAGHandle );

Aside from the services layer, it has been hypothesized (however not actually confirmed by me) that we can replace the AT Command Extension Module to override the AG core of AT command reception and AT command processing. What happens in the AG core, once paired and a service level connection has been established, is if an AT command is received, the core will first "ask" the AT Command Extension Module if it would like to handle this command. If the AT Command Extension Module wishes to handle the command, it returns, from the interface call, "true", otherwise "false" to signal that the core does its own processing.

So how do you replace the AT Command Extension Module?

Easy. There are two ways to replace this module. In the Windows directory of your WM5 device, a file called "btagext.dll" exposes an interface (interface description to come) which the core dynamically links to. You can replace this file with your own file to override the AT command processing. Replacing the file can get a little messy if one doesn't have the proper access rights to overwrite Windows dlls.

Another way is to edit the registry so that the AT Command Extension Module path points to your dll. First, copy your AT Command Extension DLL onto the device, edit the registry path "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Bluetooth\\AudioGateway\\BTAGExtModule" with your DLL path, restart the device or restart the AG service and... Voila!

So what does your custom AT Command Extension Module have to override?

The "btagext.dll" exposes these commands:
typedef DWORD (*PFN_SendATCommand) (LPSTR szCommand, DWORD cbCommand);
BOOL BthAGATHandler(LPSTR szCommand, DWORD cbCommand);
void BthAGATSetCallback(PFN_SendATCommand pfn);
DWORD BthAGOnVoiceTag(BOOL fOn);

I leave it up to you to explore how you can replace the AT Command Extension Module. Take a look at the MSDN Website for further details about these methods. Since we are supporting the Handsfree profile, search the Bluetooth website for the .pdf file for a list of AT commands to support... Or stay tuned for a description of these AT commands.

OK, now for the really fun stuff.

I know some of you are in the same boat as I was, saying to yourself, "I've paired and authenticated with the device, so how do I use the AG to route audio? I can route audio via the IOCTL calls but I can't do any other in-call processing. Some libraries offered in WinCE are not exposed to me, e.g. the Network component (for network signalling), so I can't signal different in-call states."

Personally, I've never gotten around to using the AG service, since specific libraries in the WM5 PPC and Smartphone SDK weren't included in my version and, simply put, I had no mechanism to control the AG service besides the service component via IOCTL calls.

What to do, what to do?! Hey lets build our own Audio Gateway! Yeah! That'll be fun!

To be continued....

Hello Quan Nguyen,

I want to post one TAPI 2.0 related query to you, but as I am not getting any other way to reach I am posting it here.

I am trying to implement 3 way cell conference, I almost did it but problem is to check whether it is supported (enabled) by TSP or not.
I did check it same with lineGetCallStatus() and lineGetAddressCaps() but it doesn't give proper values into appropriate fields. Is there any way to check service availability of cell conference before adding the call to cellconference.

any help would be helpful to me, as I stuck here and it creates problem with behavior where cell conference is not enabled by TSP.
Hi Paresh,
There should be a way to query the line capabilities...
Try using TSPI_lineGetDevCaps or methods related to tapi to get the line device capabilities...

Hope that helps

- Xoẹt xoẹt.

Đòn công kích của Thượng Quan Uyển Nhi và Dịch Thiến rất mạnh thân thể của hai nàng sau đó lui về phía sau hơn nghìn thước, một ngụm máu tươi sau đó được phun ra, cả hai kinh ngạc nhìn hắc bào nam tử phía trước:

- Xoẹt xoẹt xoẹt.

Một thanh âm xé giódongtam
mu private
tim phong tro
nhac san cuc manh
tổng đài tư vấn luật
văn phòng luật
tổng đài tư vấn luật
dịch vụ thành lập công ty
chém gió
trung tâm ngoại ngữ truyền tới, ngay sau đó Yêu Huyên, Bàn Thiên Lão Ma, Kim Long, Hỏa Lão đã tới bên cạnh Nhạc Thành.

- Nhạc tộc trưởng, cả hai vừa tới đúng lúc.

Hoàng Vũ sau khi nhìn thấy thì khuôn mặt nở ra một nụ cười, có Nhạc Thành tới, nàng biết mình tuyệt đối được an toàn.

- Bàn Thiên Lão Ma, Kim Long, Nam Tương Tư, đem mọi người vây lại cho ta.

Nhạc Thành khẽ nói với đám người Bàn Thiên Lão Ma.

tuyet that
bai viet that doc va la
any help would be helpful to me
I like it, Thank you !
Với những hình nền anime đẹp với rất nhiều thể loại. Vô số góc ảnh đẹp và độc đáo đã tạo nên một thế giới anime lung linh, sinh động. Chuyên mục này đã sưu tập được rất nhiều hình nền anime đẹp, cá tính, dễ thương, lạnh lùng, lãng mạn,…Các bạn thoải mái tham quan. Và chọn cho mình những hình ảnh anime đẹp nhất nhé.
Với những hình nền anime đẹp với rất nhiều thể loại. Vô số góc ảnh đẹp và độc đáo đã tạo nên một thế giới anime lung linh, sinh động. Chuyên mục này đã sưu tập được rất nhiều hình nền anime đẹp, cá tính, dễ thương, lạnh lùng, lãng mạn,…Các bạn thoải mái tham quan. Và chọn cho mình những hình ảnh anime đẹp nhất nhé.
I recommend you to take a look at these advices if you want to know how to brainstorm good college essay topics. It will help you to get a high grade
AOL gold is the no.1 computer software to connect email, browsing and search the content online all at one place. you should download AOL gold desktop to use its features from AOL gold download.
Whenever you face any issues or problems regarding renewing your subscription of Norton setup antivirus software or cannot find Norton product key then visit norton.comset/setup with product key. Norton product key is important for future reference. It has various types of versions. Norton 360 is an advanced version of the Norton setup. It includes several types of features other than Norton setup. to start accessing Norton 360 security software, then visit Norton 360 Product key.
there should be a way by which you can resolve this easily
what you have to do just download Mcafee Security in your system and then follow the instruction showed by Mcafee.
Quickbooks provides tech assistance services like Quickbooks payroll support, Quickbooks tech support, Quickbooks chat support, etc for your support as in case you need any assistance regarding Quickbooks issues you can contact any of these tech services and ask for Quickbooks assistance.
Quickbooks support is a tech help assistance provider for the issues in quickbooks like installation error, setup fails, login id fails, etc and in order to fix them you need to contact quickbooks support and they will provide you quickbooks customer support number and from there you will get Quickbooks support
Geek squad provides various tech assistance related services for there users as in case you face any issue in your tech assistance devices hardware and software you can contact Geek squad tech support and ask them for Geek squad support or in case you want to install the new hardware you can contact them and they will visit you at your place for assistance.
read this thread how to screen share on discord and solve your errors within few steps, and this is easy and only way.
As we know that, there are a number of programs that can be used to open a DLL file such as Microsoft Windows, Microsoft Visual FoxPro and etc. It stands for the dynamic link library file. It is used to store and execute different types of functionalities to run that particular program. For more information visit open dll files windows 7 download.

Using print test page, is a way to communicate printer directly to the computer devices. It is the best way to deal out with. Because it directly send it to the printer driver to determine exact problem inside printer.

Quickbooks support is a tech help assistance provider for the issues in quickbooks like installation error, setup fails, login id fails, etc and in order to fix them you need to contact quickbooks support and they will provide you quickbooks customer support number and from there you will get Quickbooks support
asus login is one of the best router that the best features to modify your network as per your requirements.
accounting solutions information and other things are presented here QuickBooks tech support
The myprepaidcenter is famous among users due to its applicability with any Visa or Master – Prepaid Debit Card, Credit Card and Gift Cards
You can make use of Quickbooks File Doctor if you getting any error while opening a specific file in Quickbooks or you have faced any kind of data damage.
Are you interested in aarp account then this website is for you www.my aarpmedicare.com
دانلود سریال موچین از سنتر دانلود

دانلود سریال موچین

خرید سرور مجازی ارزان از سرودیتا

فروشگاه فایل فروشگاه فایل
دکان فایل
Quickbooks desktop 2019 provides accounting software to the users where you can connect with quickbooks software from any where with just an internet connection at quickbooks online.if you have any query you can contact with us quickbooks help our support team available 24*7.
Great job. It's necessary for your readers to find new posts. Moreover, I read that for bloggers it's important to ho personal life.
If you are not a blogger but a student you can follow my recommendation It's a writing service. https://300writers.com/do-my-excel-assignment.html
If you have got into trouble, the best Easy $500 Payday Loans solution will be to apply for a short-term loan online, which will provide you with the necessary amount of 600 Payday Loans No Credit Check money quickly. As a bonus you will get high-quality service and the chance to save much time.
If you ask me, honestly I would really love to use Coursework Writing Services and Bluetooth handsfree. Thank you for providing us this amazing blog post.
We have a helpful team of experts is available 24/7 to provide support for users.We are here to help contact us. HP support number sbcglobal helpline
Thank you for this useful article. I found in it much valuable information. I study informational technology at my college and I need Problem Solution Essay Writing Help cause I can't handle it by myself.
HDhub4u Tamil produces HD and a high quality print of newly-launched films to this's clients. This particular site is actually known for offering Telugu movies on the very next day of the release of films. hdhub4u has been building a name for themselves since the website's begging in year 2017.
WatchCartoonOnline has the server of its situated inside European nations. It offers globally organizations inconspicuously English talking nations, aside from the US, UK, and Australia, to administer several examples. The internet website has been thought of to face individual time that continues on for an interesting span.
since the website's begging in year 2017. F5 Zones

Thanks for sharing this.,
Leanpitch provides online training in agile coach during this lockdown period everyone can use it wisely.

icp acc training

agile coach training
Thanks for the post I really like the article about Bluetooth support even I had a query about it but after reading the post now my query is clear. Well just like here the issue about Bluetooth is resolved we're working on Quickbooks where we resolve quickbooks error code 6129 0 similarly.
quickbooks error 6147 is a common error that many QB customers run across when restoring or accessing their corporate files over a network.fro all the details regarding this error go to the mentioned site

Thanks for the post. It was really helpful. Quickbooks tool hub is a great tool that fixes a lot of issues. You should check out quickbooks tool hub download to know more

When QuickBooks is in multi-user mode, the Quickbooks error code h202 appears. The alert suggests that there is a problem connecting to the corporate file or folder, or that QuickBooks needs help. You can also utilize the QuickBooks File Doctor Tool to resolve the issue.
QuickBooks error 404 is simply a runtime error and it occur because of different variables it hinders business activities significantly hence it is crucial to troubleshooting this errors on immediate basic to prevent if from recurring

The following is a summary of the QuickBooks error 404 information. You should also be able to resolve the problem successfully after reading this article carefully. Should you have any questions regarding technical support, you should contact a professional
The preservation of the item mechanics in the game also means that the most useful unique or set D2R Ladder Items familiar to old players are still very precious in Diablo 2 Resurrected. In this game, the drop of items is completely random, you never know what kind of loot you will get next time you kill a monster. The drop probability of some precious items may be only one in a million.
Wonderful post. Good work

I am Scott D Cook, cofounder of Accounting Def

I am david warner games journalist with 15 years' experience, beginning my career on Edge magazine before working for a wide range of outlets, including Ars Technica, Eurogamer, GamesRadar< Gamespot, the Guardian, IGN, the New Statesman, Polygon, and Vice. I was the editor of Kotaku UK, the UK arm of Kotaku, for three years before joining PC Gamer.I refer white motherbaord for gaming
Nice to read your Content. Keep sharing your thoughts. Also Read My Blog
As a CA working in a US city, I have utilized numerous tools to troubleshoot QuickBooks error codes. In my experience, QuickBooks Tool Hub has proven to be the most effective tool for resolving such issues. Having personally used this tool, I highly recommend it for anyone facing QuickBooks error codes.
I really like how you presented this topic. I'm sure it'll help a lot of people better grasp it. I like your dedication. I adore so many aspects of this blog. I can't wait to see what you come up with next. Thank you for taking the time to write this.
Traffic Lawyer Fairfax VA
Abogado De Divorcio En Virginia
Nice post. I used to be checking continuously this blog and I am inspired!
I reckon something truly special in this website.
I am impressed with this internet site, very I am a big fan.
Absolutely indited subject matter, Really enjoyed reading through.
I'm so glad I found this blog post on the Bluetooth Handsfree Profile (HFP)! As a tech enthusiast and someone who's always on the go, the convenience and safety of hands-free communication are paramount, and HFP plays a crucial role in achieving that.New York State Retirement Divorce
Most of our lending partners instant payday loans provide many other options for borrowers. If you need more money to pay for your unplanned expenses, consider installment loans in IL. The minimum amount you can borrow with an installment loan is $1,000, but the Cash Advance Guaranteed maximum amount is $5,000.
Clarke Traffic Lawyer
The article "Bluetooth Handsfree Profile Support for Windows Mobile 5 - The Series (Part 1)" provides a detailed and engaging overview of the technology, aimed at both beginners and tech enthusiasts. It uses clear and understandable language, engaging writing style, and practical applications to demonstrate how to implement it in real-life scenarios. Visual aids like diagrams and screenshots enhance understanding. Future expansions and interactive elements could keep the content relevant. The article encourages readers to look forward to Part 2, providing more insightful content on the topic. Overall, it offers a comprehensive view of Bluetooth Handsfree Profile Support in Windows Mobile 5.
With its Cherry MX key switches, separate media controls, and cosy wrist rest, this mechanical keyboard is a pleasure to use. With its per-key RGB backlighting, you can customise it to your heart's content.

Abogado Accidentes de Camiones

This is a well-written and informative article about the Bluetooth Handsfree Profile support for Windows Mobile 5. It's evident that the author has done thorough research on the topic and provides valuable insights for readers.

The handsfree feature is an essential aspect of any mobile device, and having proper support for it on Windows Mobile 5 is crucial. This article does an excellent job of explaining what the Handsfree Profile is, how it works, and the benefits it brings to Windows Mobile 5 users.

One of the highlights of this article is the discussion on the compatibility of Bluetooth Handsfree Profile with Windows Mobile 5. The author outlines the devices and brands that support this feature, making it easier for readers to make an informed decision.

Additionally, the article touches upon the potential limitations or issues that users may face when using Bluetooth Handsfree Profile on Windows Mobile 5. It's great to see the author addressing these concerns and providing possible solutions or workarounds.

Overall, this blog comment is a great addition to the article, as it appreciates the author's effort and highlights the key points covered. Well done!

abogado Baltimore flsa


The review of "Bluetooth Handsfree Profile Support for Windows Mobile 5 - The Series (Part 1)" applauds its comprehensive exploration of Bluetooth technology on Windows Mobile 5. The article's detailed insights into the Handsfree Profile support are commended for their depth and clarity. The review appreciates the structured series format, making complex technical information accessible for readers. The practical applications and potential benefits discussed enhance the article's relevance for tech enthusiasts and professionals. In summary, a positively reviewed Part 1 that sets the stage for an informative series on Bluetooth technology for Windows Mobile 5. divorce lawyers richmond va

truck accident lawyers
The review provides a detailed analysis of the Bluetooth Handsfree Profile support for Windows Mobile 5 - The Series, highlighting its features, functionality, and compatibility. It emphasizes the seamless integration of the profile, enhancing user experience by allowing hands-free communication and device control. The review also discusses the ease of setup and configuration, allowing users to quickly connect their devices and enjoy the convenience of hands-free communication. The review is informative and well-researched, addressing potential issues and limitations. Overall, the review offers valuable insights into the Bluetooth Handsfree Profile support for Windows Mobile 5 - The Series, offering a comprehensive overview of its features, functionality, and ease of use, making it a must-read for users seeking a hands-free communication solution.
Amazing, Your blogs are really good and informative. The Series, offering a comprehensive overview of its features, functionality, and ease of use, making it a must-read for users seeking a hands-free communication solution find a bankruptcy attorney near me. I got a lots of useful information in your blogs. It is very great and useful to all. Keeps sharing more useful blog....
Bluetooth Handsfree Profile Support for Windows Mobile 5 - The Series (Part 1)" offers a comprehensive exploration of Bluetooth capabilities in Windows Mobile 5 devices. In just four lines, it sets the stage for an informative series, catering to tech enthusiasts seeking in-depth knowledge and troubleshooting tips. This concise introduction promises valuable insights into maximizing hands-free functionality on mobile devices, making it a must-read for Windows Mobile users.abogado dui henrico va
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?