enable bluetooth via c#

K

keith

Hey all,
Anyone have any idea how to enable bluetooth (widcomm and\or
microsoft stack) in a c# app. I know I can write to the registry
through p\invoke and coredll, but just changing
HKLM\SOFTWARE\WIDCOMM\General\btconfig\StackMode value definetly isn't
the answer. And I noticed with the Microsoft stack that a btd_handle
registry string is created, asides changes in
HKLM...BluetoothStatusFlag and HKLM...ServerStatus. Is there some other
api that has some sort of 'blue tooth power on' call? Any starting
points would be well appreciated.
Thanks, Keith
 
C

crino

For MS stack

[DllImport("BthUtil.dll")]
private static extern int BthSetMode(RadioMode dwMode );

[DllImport("BthUtil.dll")]
private static extern int BthGetMode(ref RadioMode dwMode );


/// Bluetooth states.
public enum RadioMode
{
/// Bluetooth off.
Off,
/// Bluetooth is on but not discoverable.
On,
/// Bluetooth is on and discoverable.
Discoverable,
}

I'm finding API for Widcomm driver....anyone can help me??
 
T

Tim Johnson

We sell an SDK for the Widcomm bluetooth stack (see our website). We don't
offer the radio-on/off feature either since it's buried in the stack in some
hidden way for some reason. But I do know if you set the StackMode it
affects how the radio comes up *next time*. So if you reboot after setting
it how you want you'll get what you expect. Not pretty, but it works.

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


crino said:
For MS stack

[DllImport("BthUtil.dll")]
private static extern int BthSetMode(RadioMode dwMode );

[DllImport("BthUtil.dll")]
private static extern int BthGetMode(ref RadioMode dwMode );


/// Bluetooth states.
public enum RadioMode
{
/// Bluetooth off.
Off,
/// Bluetooth is on but not discoverable.
On,
/// Bluetooth is on and discoverable.
Discoverable,
}

I'm finding API for Widcomm driver....anyone can help me??


keith said:
Hey all,
Anyone have any idea how to enable bluetooth (widcomm and\or
microsoft stack) in a c# app. I know I can write to the registry
through p\invoke and coredll, but just changing
HKLM\SOFTWARE\WIDCOMM\General\btconfig\StackMode value definetly isn't
the answer. And I noticed with the Microsoft stack that a btd_handle
registry string is created, asides changes in
HKLM...BluetoothStatusFlag and HKLM...ServerStatus. Is there some other
api that has some sort of 'blue tooth power on' call? Any starting
points would be well appreciated.
Thanks, Keith
 
K

keith

Thanks i'll try that.
To answer your ?, I thought I saw that the api (and the entire sdk) had
to be bought from widcomm, maybe? I could be wrong.
 
T

Tim Johnson

They have their own SDK which last I checked was about $1250 per
stack-version. Ours is $750 for all stack versions, plus I answer tech
support emails faster :). Our SDK does not require theirs and can be
obtained directly from our website. Our SDK does require their stack be on
the device (we don't offer a replacement stack in other words).

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625
 
T

Tim Johnson

Also, if you're using an IPAQ you can get radio on/off capability in the
iPAQUtil.dll which you can get by becoming an HP iPAQ Developer, at
www.ipaqdeveloper.com . We have a FAQ about it on our site.

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625
 

rek

Joined
Aug 4, 2006
Messages
1
Reaction score
0
Can you tell me are you solve that problem?

keith said:
Hey all,
Anyone have any idea how to enable bluetooth (widcomm and\or
microsoft stack) in a c# app. I know I can write to the registry
through p\invoke and coredll, but just changing
HKLM\SOFTWARE\WIDCOMM\General\btconfig\StackMode value definetly isn't
the answer. And I noticed with the Microsoft stack that a btd_handle
registry string is created, asides changes in
HKLM...BluetoothStatusFlag and HKLM...ServerStatus. Is there some other
api that has some sort of 'blue tooth power on' call? Any starting
points would be well appreciated.
Thanks, Keith


Can you tell me are you solve that problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top