Windows Mobile 6.5 Hardware Control APIs
The Windows Mobile 6.5 Software Development Kit (SDK) provided developers with specialized Win32 APIs, COM interfaces, and managed wrappers through the .NET Compact Framework to interface directly with device hardware. Rather than relying on direct hardware memory access, the platform utilized abstraction layers to manage system power, GPS, notification lights, cellular and wireless radios, and multimedia capture devices safely across diverse OEM hardware configurations.
GPS Intermediate Driver (GPSID)
To solve the issue of multiple applications needing simultaneous
access to a single hardware COM port, the Windows Mobile 6.5 SDK
provided the GPS Intermediate Driver (GPSID) API. Found primarily in
gpsapi.h, this set of functions allowed applications to
query location data concurrently. Key functions included:
GPSOpenDevice: Initializes and retrieves a handle to the GPS hardware.GPSGetPosition: Retrieves the latest parsed NMEA data, including latitude, longitude, altitude, and speed.GPSCloseDevice: Releases the handle and powers down the GPS receiver if no other applications are using it.
Notification LED and Vibration APIs
Hardware notification mechanisms such as LEDs and vibration motors
were exposed through lower-level system functions in
coredll.dll and shell extensions:
- Notification LED API (
nled.h): Enabled querying and adjusting the behavior of device status lights viaNLedGetDeviceInfoandNLedSetDevice. Developers could configure blink rates, cycle times, and colors (if supported by hardware). - Vibration API (
aygshell.h): Controlled the internal haptic motor usingVibrateandVibrateStopto trigger sensory feedback for alerts and incoming communications.
Power Management API
Power consumption was critical on Windows Mobile devices. The Power Management API provided granular control over device hardware states, allowing developers to keep critical subsystems alive without fully draining the battery:
SetSystemPowerState: Forced the device into specific states, such as full-on, user-idle, or suspended.SetDevicePower: Directly altered the power state of individual peripheral drivers (e.g., turning off a display or dimming backlights).RequestPowerNotifications: Registered an application to receive event notifications via message queues when battery levels dropped or the power source changed.
Radio and Connectivity APIs
Windows Mobile 6.5 split radio hardware control across distinct subsystem APIs:
- Bluetooth API (
bthutil.hand Winsock): Hardware states were controlled using functions likeBthSetModeto switch between Off, Connectable, and Discoverable. Developers used standard Winsock extensions for RFCOMM communication and device pairing. - Telephony API (TAPI) & Radio Interface Layer (RIL): TAPI handled cellular calls and line management. The RIL was largely OEM-facing, though privileged applications could interact with the cellular modem directly to query signal strength, switch bands, or manage the Subscriber Identity Module (SIM).
- Wireless Zero Configuration (WZC): Allowed developers to control the 802.11 Wi-Fi radio, scan for access points, and programmatically bind to networks.
Camera Capture and DirectShow
Camera hardware was handled primarily through the DirectShow multimedia architecture, complemented by simpler UI wrapper APIs:
- DirectShow Filters: Provided frame-level access to the camera hardware buffer for viewfinder rendering and real-time image processing.
SHCameraCapture(aygshell.h): Offered a standard system dialog that abstracted the underlying camera hardware, allowing applications to capture still photos or record video without writing custom video capture drivers.
State and Notification Broker (SNAPI)
While not an active hardware driver itself, SNAPI allowed applications to monitor hardware states without polling devices. Using registry-based notifications, applications could monitor changes to battery level, headset insertion, dock status, keyboard slider positions, and network signal strength.