Link to home
Start Free TrialLog in
Avatar of tdenniso
tdenniso

asked on

BlueTooth Device Discovery - Using C#

I'm attempting to perform device discovery using C#. I've found many valuable references on how to do this on the web and in books. The problem is, all of them are written  assuming the programmer is using C++. While Java, VB and CSharp and not an issue for me, translating the code from the pointer heavy world of C++ to CSharp is taking more time than it's worth.

Does anyone know of any good examples of Bluetooth programming using c#. Anything specific to device discovery would be most appreciated.

Thanks!
Tom
Avatar of Fahad Mukhtar
Fahad Mukhtar
Flag of Pakistan image

Avatar of tdenniso
tdenniso

ASKER

Hi Desp

I've been looking at the article on DevX and it's been helpful for the actual comm port communications, however, it does not go into the device discovery steps. It assumes you know the device you want to connect with and connect to it via the Bluetooth control panel.

On the other, I think that's written in C++ as well, and it seems to be only a sinippet at that.

Thanks!
Tom
Tom:
I just started down the same path, could you do a quick post of what you've found so far?  Which books and examples are the best?
Thanks
sorry, could not help that much..
All:

I was able to finally find something that was pretty helpful. I am still working through some of the details, but this code is in C#:

http://www.opennetcf.org/sourcebrowse/browse.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Net

Tom
The above code is pretty much what I need. However, there are some CONSTANT definitins that are missing. For example, for the WSAQUERYSET struct, I need to know what the contant value is for NS_BTH. I have found definitions for other NS_X constants, but not the one for Bluetooth. Anyone have any idea where this could be located?
tom,
were you able to obtain the values for the  constants and get the code from opennetcf.org working?
Also what books and other links have you used for WinCE development using C#
Thanks
Amit
ASKER CERTIFIED SOLUTION
Avatar of GhostMod
GhostMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial