The Bluetooth stack is natively supported by Windows Embedded CE, and can be integrated to your runtime image. This required of course a Bluetooth controller that can be either a Serial, USB,… dongle. Based on this stack you can enable Bluetooth capabilities to your device and applications, using the Bluetooth API. Enabling Bluetooth in your applications is not straightforward, as it requires to implement mechanism for at least the discovery and pairing with other devices (paired devices are trusted devices).
A Windows Embedded CE device can either connect to services provided by other devices or host service for other devices.
Profiles:
On a Bluetooth device, the different remote or local services provided by the Bluetooth stack are called profiles. The Bluetooth specifications provides a complete definition of the different Bluetooth profiles that can be enabled on a Bluetooth device. Unfortunately Microsoft do not provide all the profiles listed in this specifications, but only a subset is accessible like:
- Service Discovery Protocol (SDP) used to discover the other Bluetooth enabled devices in the range of your device
- Serial Server Profile (SPP) providing a serial interface for communication between two devices
- Object Push (OPP) to send files to other devices, can be used to send business card
- File Transfer Protocol (FTP) to provide an access (push or get) to a remote file system
- Personal Area Networking (PAN) to enable IP support to communicate through the bluetooth connection
- Dial Up Networking (DUN) to perform network connection to remote servers
- …
Existing Bluetooth Manager:
When using Bluetooth, you need a Bluetooth Manager that will allow user (or applications) to support the discovery of the in range Bluetooth devices and provide access to the remote and local Bluetooth profiles.
- Microsoft provides by default a very basic Bluetooth manager for the discovery and pairing to remote devices.
- Adeneo provides a Bluetooth Manager with an interesting layered architecture that provide a way to easily integrate in your applications the Bluetooth support. A GUI illustrates how their Bluetooth engine works. More details on their product is available here. They also provide a version compatible and certified for Windows Mobile 5.0 (Product Reference).
Required System Components:
To enable the Bluetooth on your platform, it will requires the following components in your OSDesign:
- USB Host Support (or Serial Port Support)
- Bluetooth Stack with Integrated CSR Chipset Driver
- Bluetooth Stack with Integrated USB Driver (or UART-Only Driver)
Sample source code:
You can find some sample source code for the Bluetooth handling :
_WINCEROOT\PUBLIC\COMMON\OAK\DRIVERS\BLUETOOTH\SAMPLE
- Nicolas
No comments:
Post a Comment