Category: Bluetooth

  • Broadcom Bluetooth Stack SDK Now Free

    In an amazing about-face, Broadcom have released their Bluetooth SDK (Both the desktop and Windows CE versions) for free on their website, all you need to do is provide some basic information to register and you’ll receive a download link via email. In many ways the Broadcom stack has always been ahead of the Microsoft version in terms of supported profiles, the real stopper has been the need to purchase the SDK to develop for it.


    Thanks to forum member Robert83 for the heads-up!


    It will be interesting to see how this affects the balance of stacks on new devices, now that both have an accessible programming model, however each stack is not without it’s faults – lack of radio control for Broadcom and fewer profiles supported by Microsoft for example.

  • Windows Mobile 5.0 Bluetooth Virtual Serial Ports

    Among the fairly modest enhancements to the Microsoft Bluetooth stack in Windows Mobile 5.0 is a new unified system for assigning virtual COM ports. Previously this was only exposed to the user via OEM provided plugins. Very often you were limited to a single incoming and outgoing port. The Pairing process on Windows Mobile 5.0 now does a service discovery and allows the user to choose which services they wish to use, when “Serial Port” is ticked in the list you can then use the new interface on the “COM Ports” tab to create a virtual COM port for the device.


    All of the settings are stored in the registry so that you can also programmatically query what ports are setup and to which devices they map. The magic happens at:


    HKEY_LOCAL_MACHINESOFTWAREMicrosoftBluetoothSerialPorts


    This key contains a multi-string value containing all of the available COM ports on the system. This should have been setup by the OEM so that it does not contain reserved COM port identifiers. For example on my iMate K-Jam this value contains:-


    COM6


    COM7


    Below this key there will be a key for each device setup with a virtual COM port, the key will be named with an 8 byte hexadecimal device id (16 characters). This contains values with settings for the port such as Encryption etc. The most useful is “Port”, a string value containing the COM port name e.g. “COM6”. Each device can have only one virtual COM port assigned, so if you run through the “New Outgoing Port” sequence for the same device it will overwrite your previous settings. The pairing information for the device is stored in a similarly named key under:-


    HKEY_LOCAL_MACHINESOFTWAREMicrosoftBluetoothDevice


    You can query the values under the device key (again 16 chars for the device id) to retrieve the device name and class of device. When you retrieve paired devices with 32feet.net using BluetoothClient.DiscoverDevices it reads this information for you into a BluetoothDeviceInfo instance.


    This new mechanism means that rather than using the awkward RegisterDevice method for registering a virtual COM port (InTheHand.IO.Ports.BluetoothSerialPort in 32feet.net) you can configure the settings through the registry in such a way that they are visible to device user and don’t conflict with other ports.


     

  • Bluetooth Experience Icon Program

    The Bluetooth SIG have introduced a new branding initiative to help clarify what functionality a Bluetooth device supports using a number of simple icons for popular applications of Bluetooth. The current 5 icons are:-



    • Print (Hard Copy Replacement Profile, Basic Print Profile)
    • Input (Human Input Device Profile)
    • Headset (Headset Profile, Handsfree Profile)
    • Transfer (Object Push Profile, OBEX FTP)
    • Music (Advanced Audio Distribution Profile, Audio Video Remote Control Profile)

    Each has specific requirements which must be met for the product to display the icon. It should help to make it possible to identify what functionality a device provides. Windows Mobile 5.0 currently supports the requirements of the Input, Headset and Music icons. It doesn’t qualify for Transfer since OBEX FTP is not supported, it is a Windows CE component which is not included in the Windows Mobile platform. And as we know Windows Mobile has no printing support out of the box, however if you have a Bluetooth printer which supports Object Push you can beam Contacts, Appointments and Text/HTML documents to your printer.

  • Stop Broadcom Stack Displaying Browser

    One of the features of the Broadcom stack is that when you attempt to connect to a virtual COM port it will show the user the Bluetooth Manager and ask them to select a paired device to connect to. You can suppress this and have it always connect to the last used device. You’ll need to write to the registry key:-


    HKLM/Software/Widcomm/BTConfig/AutoConnect/0008


    Create a DWORD value named BTBrowserEnabled and set the value to 0. If you want to re-enable this feature you can reset the value to 1.

  • 32feet.NET v2.0 Beta 1 Available

    I’ve posted a Beta build of 32feet.NET to the Files section of the site. Please read the file description for a high-level list of changes. This release is the first to be built against .NET v2.0 and will resolve issues encountered with using the v1.x library from a .NET v2.0 VB project. It also consolidates the previously separate dlls into a single dll (InTheHand.Net.Personal.dll) which reduces the overall footprint to 83kb for Infrared, Bluetooth, Object Exchange and Forms functionality. If you are at MEDC and would like to see this version in action, Nick Landry will be using it as part of his session on Thursday at 11:15 “APP335 Tablet PCs and Smartphones: Working Hand-in-Hand to Enable Your Mobile Workforce”.

  • Bluetooth Profiles

    This is a post I’ve been meaning to do for a couple of years and just never got around to it. The table below is an attempt to document the Bluetooth profiles supported on various flavours of Windows. Because Windows CE is modular don’t expect every CE device to support all the possible profiles, this table gives an indication of what the platform creators had available to them. In order to conserve space I’ve made copious use of acronyms (and initialisations), the current release versions of all of these profiles are documented on the public Bluetooth website.






























































































































































    XP SP2 Vista CE.NET 4.2 WM 2003 WM 2003 SE CE 5.0 WM 5.0 WM 5.0 AKU1 WM 5.0 AKU2
    A2DP                 Y
    AVRCP                 Y
    HFP   ?  o o o/Y Y Y Yp Y
    HSP   ?  Y o o/Y Y Y Yp Y
    HID Y Y Y     Y Y Y Y
    FTP     Y     Y      
    PAN Y Y     Y      
    LAP     Y     Y      
    BPP                  
    HCRP Y Y              
    DUN Yc Yc Y Ys Ys Y Ys Ys Ys
    OPP Y Y Y Y Y Y Y Y Y
    SPP Y Y Y Y Y Y Y Y Y
    c = Client support, s = Server support, o = OEM implemented, p = adds phonebook support, ? Vista recognises these profiles but they don’t seem to be used.


    What I haven’t attempted to do is compare the profiles available on 3rd Party stacks, that would be a little more complex 🙂

  • Any Port in a Storm

    A user posted an important observation on the Bluetooth COM support in Windows Mobile 5 here on the microsoft.public.pocketpc.developer newsgroup. The problem is that while the system allows you to create virtual COM ports for all your paired devices which support Serial Port Profile, most of the time this will fail because the COM port you pick is already in use, on many devices you can have just 2 virtual COM ports. I’ve posted a few of my thoughts in the thread linked above, but while there are things that Microsoft can work to improve there are also a few things that developers can do to avoid the problem:-



    • Don’t rely on the control panel for setting up ports, use the RegisterDevice route (or BluetoothSerialPort in 32Feet.net) to just register a port for the duration you need it (and possibly reuse the same port name). This also allows you to use a different port prefix since few COMx: ports are available out of the box.

    • Don’t use serial ports. Unless you need your device to be accessible by a legacy app then you can avoid using virtual COM ports altogether and work directly with Sockets (again 32Feet.net will allow you to setup these connections easily). The downside with this approach is it applies only to the Microsoft Bluetooth Stack, as the programming model for the main alternative from Broadcom is essentially based around ports. However based on the first batch of devices released with Windows Mobile 5.0 the Broadcom stack is a lot less common.

  • Divert system audio to a Bluetooth headset

    In the Windows Mobile 5.0 audio gateway implementation there are a couple of control codes to turn on audio routing through the bluetooth headset/handsfree device. I’ve only tried this with a couple of devices and had mixed (That’s a really bad audio pun sorry!) results but here’s a library to allow you to try it yourself. In theory it may work on some 2003 Second Edition devices too. I’d be interested to hear your feedback.


    To set audio routing just call


    InTheHand.Net.Handsfree.AudioGateway.RouteAudioToHandsfree = true;


    And set to false to return to normal audio use.


    Once fully tested and documented this will make it into the 32Feet package.

    InTheHand.Net.Handsfree.zip (2.54 KB)

  • AKU 2 = Woohoo

    Some great news from Jason Langridge – not only will AKU 2 introduce the long awaited messaging feature pack, but also introduce the A2DP (Advanced Audio Distribution Profile) Bluetooth profile to support mono and stereo audio devices such as headphones and some advanced car kits. ETA is early 2006 depending on individual OEM schedules for ROM updates.

  • Developer Developer Developer Day Session

    The agenda for DDD Day II has now been published and for some crazy reason folks voted for my Bluetooth with .NET session 🙂 I’ll be covering both the Bluetooth and Object Exchange components of the 32feet.NET suite, I wont touch on the IrDA part, but the code would be almost exactly the same. We’ll walk through discovery, client and server connections and sending/receiving objects, hopefully with some audience participation.


    It’s a great priviledge to be selected along with such a great selection of excellent speakers so I have a lot to live up to! I now have to attempt to make my demonstration application absolutely bullet proof since it inexplicably failed when I gave a short session at the MVP Summit. But it wasn’t my code at fault honestly, it worked fine during lunch afterwards (I had several witnesses), obviously a result of the the sinister EM radiation around the Redmond campus… 🙂