manishraj

Hi all,

I wonder if its possible to detect the availability of Blootooth/IRDA support on my Windows Mobile device and also the status of same, I mean is that On or Off.

Is there any API provided on the SDK or is there any Registry location where I need to read to varify its availability and its status.

I am looking this for my Windows Mobile 5.0 Smartphone device project

Thanks in advance.

Manish Raj




Re: Smart Devices General Detection blootooth and IRDA support on the device

Amit Zinner

Hi Manish.

I just run into the same problem.

Did you find a solution to the problem

Regards,

Amit





Re: Smart Devices General Detection blootooth and IRDA support on the device

Christopher Fairbairn

Hi,

There is not one standard API for use with bluetooth stacks.

If your device is using the Microsoft bluetooth stack you can query for the current hardware status by calling a native function called BthGetMode as documented here http://msdn2.microsoft.com/en-us/library/ms837409.aspx.

A managed wrapper for this function is available in the following MSDN article http://msdn2.microsoft.com/en-us/library/aa455170.aspx.

To detect if the device has bluetooth capabilities you may be able to use the named event mentioned in the following document http://msdn2.microsoft.com/en-us/library/ms900283.aspx. Alternativly try creating a bluetooth socket via the winsock apis. If it fails then it's likely the device does not use the Microsoft bluetooth stack.

If you are using a device with the Widcomm stack you would have to have a look at the SDK they provide for download from their website (search these forums for links to it). It has methods available to query the hardware status etc as well.

I have no experience detecting or controlling IRDA hardware so am not much help there.

Hope this helps,

Christopher Fairbairn






Re: Smart Devices General Detection blootooth and IRDA support on the device

TimbNZ

Have a look at 32feet.net you can get a library from here for doing IRDA and BT comms stuff