250 likes | 1.04k Views
Mobile Broadband Driver Development for Windows 7. Malayala Srinivasan (Srini) Senior Program Manager Lead Wireless WAN - Microsoft IDC r.malayala.srinivasan@microsoft.com. Agenda. Session Goals Mobile Broadband in Windows 7 Driver Design Challenges Driver Development Stages
E N D
Mobile Broadband Driver Development for Windows 7 Malayala Srinivasan (Srini) Senior Program Manager Lead Wireless WAN - Microsoft IDC r.malayala.srinivasan@microsoft.com
Agenda • Session Goals • Mobile Broadband in Windows 7 • Driver Design Challenges • Driver Development Stages • Call to Action
Session Goals • This session is targeted for the Mobile Broadband driver developer community and will: • Introduce Mobile Broadband (MB) driver development for Windows 7 • Identify and prepare for key driver design areas in Windows 7 • Help in getting ready for MB driver development in Windows 7
Terminology • Mobile Broadband is also referred as • Wireless WAN • WWAN • MB • VAN UI – View Available Networks UI is • Windows Vista’s “Connect to network” UI equivalent in Windows 7 • Launched either through “Connect To” or “Network Tray Icon” • Mobile Broadband Driver is also referred as • IHV Miniport Driver • MB Driver • Miniport Driver
Mobile Broadband in Windows 7 • Driver developers must use the “Mobile Broadband Driver Model Specification” for Windows 7 • Supports packet-switched data connectivity over the Wireless WAN (3GPP / 3GPP2) devices • Based on NDIS6.20 miniport driver model • Control path designed for slow response devices (AT command based) • Data path optimized for Wireless WAN devices • New logo program for Mobile Broadband devices in Windows 7 • New APIs for Mobile Broadband user-mode application development in Windows 7
Windows 7 Mobile Broadband Architecture Provided by: Microsoft View Available Network UI Connection Flow Experience UI Properties UI 3rd Party Connection Manager ISV Command Line Interface User Mode IHV Mobile Broadband API OEM Profiles WWAN Service Session 0 NDISUIO Kernel Mode Mobile Broadband Driver Model WWAN Miniport Driver WWAN Miniport Driver MB Miniport Driver
NDIS6.20 Data Path Optimizations for MB Devices Windows Vista Windows 7 TCP/IP Stack TCP/IP Stack NDIS 6.0 NDIS 6.20 Send / Receive Send / Receive 802.3 Frames IP Frames IHV Miniport Driver IHV Miniport Driver DHCP Emulation ARP Emulation • Windows 7 IHV Miniport Drivers for Mobile Broadband can: • Take advantage of raw IP support in send/receive path • Eliminate DHCP and ARP spoofing in miniport drivers
Control Path Functionalities • Mobile Broadband Driver Model defines the following control path functionalities for the IHV drivers • Device State Management • Connectivity Management • Radio Control • SMS (Short Message Services) • PIN • Provisioned Contexts • Service Activation • Vendor Specific
Control Path for Mobile Broadband Drivers • WWAN Service uses NDIS OIDs for control requests (SET or QUERY) to miniport drivers. • Miniport drivers can respond asynchronously to WWAN Service. • Device state changes can be notified to WWAN service using event notification by miniport drivers
Asynchronous Response WWAN Service Miniport Driver NdisOidRequest • Designed for slow responding AT command based devices • Initiated by WWAN Service • 2 Types : SET or QUERY • RequestId is Non-NULL Oid = OID_WWAN_CONNECT RequestHandle = 0x12345678 RequestId = 0x0000F00D … AT Cmd(s) to Device Return NDIS_STATUS_INDICATION_REQUIRED Device Responds NdisMIndicateStatusEx StatusCode = NDIS_STATUS_WWAN_CONTEXT_STATE DestinationHandle = 0x12345678 RequestId = 0x0000F00D ActivationState = WwanActivationStateActivated …
Event Notification • Used for device or network state changes • Initiated by driver • Request Id = NULL WWAN Service Miniport Driver Device / Network state change NdisMIndicateStatusEx StatusCode = NDIS_STATUS_WWAN_CONTEXT_STATE RequestId = 0x0 ActivationState = WwanActivationStateDeactivated …
Custom IHV Features 3rd Party Apps / Connection Managers Set VendorSpecific • Framework provides vendor-specific OID for driver developers to implement IHV specific features • WWAN Service provides a pass-through control path for Windows 7 applications to communicate with IHV drivers OnEventNotification WWAN Service NDIS_STATUS_WWAN_ VENDOR_SPECIFIC OID_WWAN_VENDOR_SPECIFIC MB Miniport Driver
OID Handler Implementation • Understand AT commands and response from device. • Responding to each OID may require sending multiple AT commands to device. • Incorrect string processing in kernel mode may result in fatal failures. • See “Using Safe String Functions” in the WDKhttp://msdn.microsoft.com/en-us/library/aa489552.aspx • Partner with your Connection Manager application developer or firmware engineer to get more insight on AT command semantics. • Some OID requests may require using device-specific AT commands. • Some OID responses (e.g, network error code, service activation, and raw IP handling) may require firmware changes. Partner with your device firmware team to get firmware changed.
Asynchronous OID Handling • WWAN Service may send multiple OIDs without waiting for the completion of the current OID request. • Driver developers should design query OID handlers to send the requests to the device without serializing. • For out-of-sequence device responses, use command tag in the response to associate the response with the corresponding request.
IHV and Operator-specific Commands • Use OID_WWAN_VENDOR_SPECIFIC to implement custom features. For example: • SIM Tool Kit (STK) Commands • USSD Commands • Phonebook Commands • Voice Commands • Firmware-specific commands • And more … • Use OID_WWAN_SERVICE_ACTIVATION to implement operator-specific service activation.
High Level Tasks • Stage * Available at the time of Windows 7 Beta Test the driver in each stage
Development Best Practices • Plan and implement the following items early in the development cycle of a Mobile Broadband driver : • Log the AT commands and responses in a file. Helps in debugging and root cause analysis. • Use Event Tracing to log configuration and network issues. • NdisWriteErrorLogEntry DDI for logging driver-related errors • NdisWriteEventLogEntry DDI for logging generic or network-related issues • Use the optional description member “StringsList” to log meaningful and actionable information regarding the error.
Call To Action • Migrate existing NDIS 5.x mobile broadband drivers to NDIS 6.0 • Helps in moving to NDIS 6.20-based Mobile Broadband Miniport model. • MB devices must be NDIS 6.20-based to get logo. • Prepare for testing commercially deployed Mobile Broadband device solutions in Windows 7. • Get ready for Windows 7-based driver development. • WDK will be available at the time of Windows 7 Beta. • Review Mobile Broadband device logo requirements and send us feedback. • Contact us at win7mb@microsoft.com
Resources • Mobile Broadband Logo Requirements on https://winqual.microsoft.com/ • Log in, click on the Logopoint link on the left side menu, and search for “MBN” requirements. • WDK Documentation on MSDN • Porting NDIS 5.x Drivers to NDIS 6.0http://msdn.microsoft.com/hi-in/library/ms795567(en-us).aspx • IP Helperhttp://msdn.microsoft.com/hi-in/library/bb742902(en-us).aspx • Check the Windows 7 Beta release for additional resources: • WDK documentation • Mobile Broadband Driver Model Specification • Mobile Broadband Driver Test App (WwanDriverTestApp) • NDIS 6.20 • SDK documentation • Mobile Broadband API Specification • Windows Logo Kit (WLK) • Mobile Broadband Logo Tests • WHDC Web site at http://www.microsoft.com/whdc/default.mspx • Mobile Broadband Driver Development White Paper