Compartilhar via


Bluetooth

Anil Dhawan has written a managed Bluetooth library for Windows Mobile that makes it painfully easy to write Bluetooth apps.  Even better, the source code is available under a shared source license.   I used it as the basis for a two-player Spacewar game for WM5.0 that runs over Bluetooth.

- Jason Fuller

Comments

  • Anonymous
    October 07, 2005
    What does shared source license entail? Can I use it to make commercial apps?

  • Anonymous
    October 08, 2005
    ...while on the topic of Bluetooth... I think your readers may be interested in this:
    http://32feet.net/

  • Anonymous
    October 10, 2005
    The comment has been removed

  • Anonymous
    October 10, 2005
    Will this only work with the Microsoft BT Stack? What about Widcomm?

  • Anonymous
    October 31, 2005
    The comment has been removed

  • Anonymous
    November 07, 2005
    Is there some sample or library can use bluetooth on PC windows?

  • Anonymous
    January 14, 2006
    The comment has been removed

  • Anonymous
    February 04, 2006
    Can anyone tell me where I can bluetooth tech support?

    I have an HP 6210 all in one printer. It is fed via my bluetooth Printeradapter. I can send docs just fine, however, I can't seem to send faxes. But, if I am hardwired, I can send faxes from computer to printer to send.

    Suggestions for resources? HP won't even discuss bluetooth.

  • Anonymous
    March 05, 2006
    MICROSOFT WINDOWS MOBILE IS DANGERIOUS.

    SECURITY ALERT.

    Windows Mobiles when bluetooth is set to "OFF" is still DISCOVERABLE when using bluetooth scanners.

    SECURITY ALERT

  • Anonymous
    March 06, 2006
    Moo, which device are you using?  There are two competing bluetooth stacks.  One is made by Broadcom and the other is made by Microsoft.  I can't speak to the broadcom stack, but on the MS stack we have 3 settings:
    1) Off
    2) Connectable
    3) Discoverable

    When the stack is "Off" the Bluetooth radio isn't even powered.  It would surprise me greatly if it was visible to bluetooth scanners in this mode.  

    When the stack is connectable, it is supposed to be visible to devices it has bonded with, but should reject any advances made by unbonded devices.  

    It's only when it's discoverable that other devices should be able to connect to it.

    By default, we turn on to connectable, not discoverable.

    Mike

  • Anonymous
    March 06, 2006
    I wanted to elaborate on Mike's comment about what it means for the BT stack to be in "connectable" mode.

    When the device is connectable but not discoverable, no device will be able to find it during inquiry.  The inquiry is typically done to pair two devices.  If a device knows your BT address somehow (either it is paired to you, or previously remembered your BT address from when you were discoverable, etc) it will be able to connect to you.

    When it is in the "OFF" state the radio is powered off and is definately not discoverable to other devices.

  • Anonymous
    May 23, 2006
    Does anybody have a simple application using those Bluetooth classes?...The thing is that I've got the bluetooth classes but I don't know how to use them.

  • Anonymous
    August 15, 2006
    The problem I'm having with bluetooth is:
     1.  The two different stacks make writing commercial software excessively difficult.  Am I going to need two libraries and do a run-time selection?
     2.  All of the information I've seen is based on CE.  All the questions I've seen are people wanting to connect to bluetooth devices from desktops.  Ms doesn't seem to understand the uses of people want to make of the technology.
     3.  Microsoft's library is undocumented, no sample code and doesn't work on XP.  Not good.

  • Anonymous
    August 18, 2006
    Does anyone know how to "discover devices" using the MS library? I've been only able to find examples of listing already "paired" devices.

  • Anonymous
    October 29, 2006
    Does anyone know where in the registry you can set the BT mode on WM5 in standby mode?

  • Anonymous
    February 18, 2007
    c'mon guys, For developers doing serious software development it doesn't make sense to restrict them to the Microsoft stack.  Why should we have to purchase a third party Bluetooth stack in order to use Microsoft code???  This has gone on for too long! Microsoft, please come to the party and co-operate with developers by providing either source or a library that will handle the Widcomm stack devices. To be perfectly frank, I've been a loyal supporter of Microsoft CF - I've made a considerable investment in both MS software and in the learning curve for CF development but I'm just about at the stage now of changing to J2ME or other development platforms for mobile devices.  When you buy a set of serious development tools (e.g. VS2005 Pro) you don't expect to have to go out and spend further $$$ on libraries that should be part of the development kit.  One of the "selling points" for VS was bluetooth device development and sample code to use it productively. Let's stop annoying developers and provide the code for other stack s PLEASE!

  • Anonymous
    February 19, 2007
    The comment has been removed

  • Anonymous
    March 08, 2007
    Hi - Am trying to get an answer to this question: is there an L2CAP API available now on Windows Mobile? We want to create an implementation of JSR82 for Windows Mobile - there used not be an API for L2CAP in either Windows Mobile or Windows. There's now one in Vista, but what about WM? Any information at all much appreciated! Cheers, Sean

  • Anonymous
    March 09, 2007
    The comment has been removed

  • Anonymous
    March 22, 2007
    I totally agree with what previous writer (Eric) said. In a project, i need to use bluetooth both for audio and for sending data. So Microsoft stack in xp won't work (because of lack of support for audio). Coping with the widcomm stack is difficult (as i am not really used to c++). A wrapper DLL would do the thing and save time for us developers.

  • Anonymous
    April 03, 2007
    i am using a HP Pocket PC with WM5.0. I am having a bluetooth mobile printer. Can any one please guide me to write some code in C# to print some data from Pocket PC using bluetooth.

  • Anonymous
    June 12, 2007
    hello, I have a hp ipaq rw6815, and I programmed a basic program for it. I wanna connect this program with hyper terminal via bluetooth to make chat. can you write how can I do? thanks..

  • Anonymous
    July 27, 2007
    I also want to print to a bluetooth printer I have a IPAQ 6945 and want to print to a Zebra Cameo 3 printer. Please can some giude me ?

  • Anonymous
    November 08, 2007
    I am trying to understand if a BT app someone did is working only for the BT stack it was writeen for MSFT or BRCM

  • Anonymous
    November 17, 2007
    Regarding the problem of two different Bluetooth stacks--Widcomm and Microsoft, I would recommend the following to Microsoft--- IMPROVE THE MICROSOFT BLUETOOTH STACK! The Microsoft stack in XPSP2 doesn't even support Bluetooth audio! Why not? Everyone has a Bluetooth headset these days, an increasing number have Bluetooth stereo headphones, people will want these to interface with their computers. Why is that not possible with the Microsoft stack (on XP)? If the Microsoft stack improved so that it had all the functionality of the Widcomm stack, there would be no more need for the latter. Makers of Bluetooth dongles would not purchase the Widcomm software (very confusing as it is, as different dongles come with different versions), if the computer OS came with the same BT functionality. If the hardware manufacturers ceased including the Widcomm stack with their dongles, if there was no advantage to the Widcomm over the Microsoft stack, the use of the Widcomm stack would cease, which would make Bluetooth development much easier, with one stack to deal with for Windows. If the Microsoft stack continues to be inferior, continues to lack basic functionality like audio, manufacturers will continue to purchase and include the Widcomm stack, and users will continue to use it. So, it's in your court, Microsoft! I don't know if the Microsoft Bluetooth stack has improved in Vista. If it has, that's not enough though. Many users are still using XP, probably more than use Vista. You really need to improve the BT stack in XP!

  • Anonymous
    November 18, 2007
    Hi I want to develope application for WM 5.0 can anyone guide me how to do this I am trying to use Microsoft shared dll but there is now help available on net so that any one can use this help to build own application so can any one tell me how to use microsoft shared  library for Bluetooth

  • Anonymous
    April 25, 2008
    Before we go into MS support/widcom support whatever, I don't even see BT support in the emulator under Mobile 6.0 or pocket pc 5.0 development SDK/VS 2008 prof. What use is giving a socket support and programming support etc if we can't even test it using SDK and device emulator? Is MS working on this? ETA? Thanks Mani

  • Anonymous
    December 21, 2008
    Hi, Bluetooth for Device Emulator has been recently released !!! IT REALLY WORKS !!! See http://code.google.com/p/bthmsdevemul/

  • Anonymous
    December 23, 2008
    Regarding the problem of two different Bluetooth stacks: I agree with Eric, the whole point of the .NET framework is portability, and Bluetooth stack differences should be transparent for portable applications. The wrapper library for interfacing to any stack SHOULD be a part of the framework... but since it's not (at least yet) What I believe Microsoft should do is support Peter Foot's 32feet.NET project and make it grow into the Bluetooth API all developers in this forum need! Meanwhile, how can I know which devices or brands use which stack? That way I'll know where my programs might work...

  • Anonymous
    March 10, 2009
    The comment has been removed

  • Anonymous
    April 08, 2009
    The comment has been removed