Subtitle: Why adding Bluetooth Stack with USB doesn’t always add Bluetooth USB
Argh, one of my junior engineers just gleefully exclaimed to me “Anyway, I WIN! :-)” Now that just burns, but I take comfort in the fact that she got lucky.
We were both adding Bluetooth support to different workspaces that supported the same board. My project finished building before hers so I asked her to test my project. The USB Dongle that she was using didn’t work with my OS image; it popped up the little dialog asking for the driver to use.   So her project finished building and she tried it, and it worked just like it was meant to work.
We compared notes on what we both had added. She added:
·         Bluetooth Stack with Universal Loadable Driver
·         Bluetooth Stack with Integrated USB Driver
I added:
·         Bluetooth Stack with Integrated UART Driver
·         Bluetooth Stack with Integrated USB Driver
·         Bluetooth Stack with Universal Loadable Driver
Sure it seems silly to add the universal loadable driver and the others but I wanted to make sure that it worked for my customer. I thought that I was adding more than they needed, but that wouldn’t matter. I was wrong.
So I looked into reginit.ini for the registry settings for the USB Bluetooth. It wasn’t there. I searched for BTH and found that the USB settings would have been added if CE_MODULES_BTHUSB is set. I thought that should have been set since I added the USB Driver and a check of ceconfig.h confirmed that it wasn’t set.
Digging further, I looked at Public\CEBASE\OAK\MISC\winceos.bat, and found the problem.   The problem is that in winceos.bat, the catalog components under Bluetooth Protocol Stack with Transport Driver Support become mutually exclusive. That is that the logic in winceos.bat only includes the first driver that it looks for and finds set, the first on is the UART driver. So really the catalog components should be a set as choose one of, not choose any of. That would make the catalog consistent with the batch files that that process the SYSGEN variables.
The articles listed in Summary of Platform Builder Catalog Posts to be of help.
Copyright © 2008 – Bruce Eitman
All Rights Reserved