Developing Great Devices for Windows PCs

Download Report

Transcript Developing Great Devices for Windows PCs

Developing Great Devices
for Windows PCs
Kosar A. Jaff
Product Unit Manager
Windows
Device Experience Group
Microsoft Corporation
Key Topics
 Evolution of PCs and Devices
 Old Problems, New solutions
– Advances in Device Driver Models, Installation
 New Problems, New solutions
– Advances in Connectivity
 The Microsoft® Windows® PC’s Role
– Create opportunity, Advance the Experience
 Calls to Action
– What you can do today on Windows XP
– What you can do to get ready for Longhorn
© 2004 Microsoft Corporation
The PC of Today
Advanced CPUs -- Multiple Cores, 64-bit
Lots of memory – many threads, tasks
Lots of storage – easily expandable
Power friendly – on demand on/off/sleep
Rich Connectivity – any bus, any radio
Dependable Protocols – secure, powerful
Dependable Platforms – easy, stable
© 2004 Microsoft Corporation
The Power of a Distributed System
 Powerful computational elements on a heterogeneous network
–
–
–
–
Marching to Moore’s and Metcalfe’s Drumbeats
Ex: 64-bit base data width  powerful machines at every price point
Ex: Multiple cores, HyperThreaded CPUs
Ex: Multiple radios / system (Bluetooth, UWB, 802.11x, WiMax)
 Everything is connected
– From the PC to the tiniest device
– From Local connectivity to broad web-based connectivity
– Ex: Microsoft SPOT-based Watch -- small, connected, and smart
 Smart System Software & Protocols Link It All Together
– Applications need not know if devices are near or far
– Devices can depend on rich computational elements
– Standardized protocols == massive interoperability
 A whole new ecosystem, a whole new business model
– Spreads the power of the PC platform across a broad network
– Scale from local connectivity to local networks to the web
© 2004 Microsoft Corporation
Device Connectivity Landscape
32-bit
System
Advances
64-bit
Wired
Device Functionality
Wireless
USB 2.0
Built-in Isoch,
Rich Ecosystem,
Software Support
Ease of Use
Simplified
Ad-Hoc Nets
IEEE 1394
USB 1.x
MBOA
802.15.3
Advanced
Wireless
Devices
Simple
installation
Bluetooth
Automation/
Control
Rich Protocols
(web services)
IP Devices
Connectivity Complexity (Device models,
Bus Speeds, Transfer Types, Ease of Use)
© 2004 Microsoft Corporation
The Device of Today
 Critical question: where should I invest?
– On standardized connectivity: invest in functionality
– Ex: USB 2.0-based TV Tuner encoding to WMV
– Ex: USB 2.0-based Hard Drive for AV uses
– Ex: Bluetooth Audio Devices decoding SBC
– On emerging connectivity: invest in the basics
– Ex: Networked devices using UPnP – Ease of Deployment
– Ex: Wireless USB using UWB – security, PnP
 The Windows PC can help …
© 2004 Microsoft Corporation
The Windows PC and Devices…
 Connects & Controls any device flawlessly
– Good today (USB, 1394, Bluetooth, etc.)
– Quality Quality Quality – WHQL, HCTs
– Windows “Longhorn” – Devices “Just Work”
 Finds Any Device
– Discovery & Association Can Improve
– Windows “PnP-X” Technologies – PnP Reinvented
 Can offer services to other computers & devices
– Good today for PC-to-PC (e.g., File & Print Sharing, SMB)
– Opportunities for PC-to-Device
– Windows “Network Connected Devices” initiative (NCD)
© 2004 Microsoft Corporation
Our Investments in Devices
Windows PCs
Investments We Are Making
Connects & Controls
Any Device Flawlessly
32-bit and 64-bit ready (Porting Tools, Whitepapers)
Windows Driver Framework (WDF)
Consistent Device Installation (CDI)
Built-in Device Association Experience (Windows)
Built-in Device Experiences (Bluetooth, Wireless USB)
Rich APIs for new technologies (WSDAPI, etc.)
Finds Any Device
Plug and Play Extensions (PnP-X)
Function Discovery (FD)
Built-in FD Providers (UPnP SSDP, WS-Discovery, etc.)
Built-in drivers for Bluetooth, Wireless USB, WiFi “busses”
Offer services
Web Services for Devices (WSDAPI)
UPnP Content Directory Service (Windows Media Connect)
Built-in Windows Services (Various, e.g., SMB)
3rd Party services (Your Service)
© 2004 Microsoft Corporation
Advances in Driver Models
© 2004 Microsoft Corporation
Video -- Windows Driver Foundation
View video at
http://www.microsoft.com/whdc/shared/media/BetterDevices.wvx
© 2004 Microsoft Corporation
Windows Driver Model
Overview
 Generic Model – WDM introduced in 1996 with Win95 OSR 2.1
 Specific driver models – Mini-ports for popular devices classes
 WDM Features:
– Asynchronous and packet-based IO
– Layering of drivers
– Dynamic loading and unloading of drivers
– Plug and Play
– Power management
 Large device coverage
 Flexible
 Low-level high-performance interfaces
© 2004 Microsoft Corporation
New Model For Device
Class Support
64-bit Ready Base Model
Base Model
(PnP/PM/IO/Synch)
Device Specific
Extension (Packet,
Device I/O Control,
CDB processing)
Driver
© 2004 Microsoft Corporation
Windows Driver Foundation

WDF is the stepping stone to the
ideal driver model

WDF Contains
Static
Driver
Verifier
– A Model (independent of how it is
implemented)
– Framework (implementation of the
model)

Multiple frameworks
WDF
Model
– Kernel Mode Framework (a.k.a
Windows Driver Framework)
– User Mode Framework

User Mode
Framework
PREfast
Driver Verification Tools
Kernel
Mode
Framework
Device
Interface
Generation
– Static Driver Verifier
– PREfast for Drivers

Device Interface Generation

Driver Isolation to be made available
for kernel mode framework drivers
Driver Isolation
© 2004 Microsoft Corporation
WDF – Model

One conceptual model to learn for all (both kernel and user-mode) drivers

Model implies
–
–

Note that a framework may only implement a subset of the model
–

Object model, object hierarchies, state machines
Does not refer to DDIs, data structures etc.
E.g., User mode framework will not implement support for Interrupts
Supports rich and deep functionality (unlike WDM)
–
–
Intelligent defaulting
Fine-grained control at well-defined points in the PnP/PM state machine

Incremental development from simple to complex drivers

Extensible by device classes without duplication of functionality – by allowing
device-class specific driver extensions

Allows implementation in many languages (C, C++, C#)

Allows verification by static tools

Enables Driver Isolation

Model will evolve over time to add more functionality
© 2004 Microsoft Corporation
Advances in Device Installation
© 2004 Microsoft Corporation
Consistent Device Installation
 Longhorn will only install driver packages
using Plug and Play mechanisms
– Allows for a “trusted” package
– Windows can verify package integrity
– Able to track dependencies
– Uninstall and rollback more reliable
– Prevent unwanted side affects
 Provided tools and infrastructure works on
Windows 2000 and Windows XP
– Allows you to create packages today that will
migrate to Windows Longhorn
© 2004 Microsoft Corporation
CDI Architecture & Flow
Driver Store UI
(trust, EULA)
Update Install
UI
Finish Install
UI
User’s context
System context
Add Driver
Package to
Driver Store
Core Device
Install
© 2004 Microsoft Corporation
Device Install Process
 Driver Package Integrity and Validation
–
–
–
–
–
Happens in the user context
Ask user if they trust the publisher of the Driver Package
No UI if the user has chosen to always trust the publisher
EULA
Valid Driver Packages only
 Add Driver Package to the driver store
– Happens in the system context
 Core Device Install
– Happens in the system context
– No UI is possible in the system context
 Finish Install UI
– Happens in the user context
– Can ask questions or launch other processes
© 2004 Microsoft Corporation
Great Windows PC Experience
 Simpler
– No more Client Side verses Server Side
– Same rules apply to class/co-installers all of the time
 More user friendly
– No more CD prompts for the same Driver Package
– No more signature prompts for the same Driver Package
 More flexible
– You don’t have to be an administrator to install drivers
– Rules engine for checking the user’s driver install policy
– Domain administrators can push out drivers to lots of client machines
at once
 More secure
– Single security check at strategic point based on the rules engine
© 2004 Microsoft Corporation
Advances in Plug and Play
© 2004 Microsoft Corporation
Device Connectivity Taxonomy
Goals
– Consistent association/installation experience
– Easy migration from Physically associated to Logically
associated
All Devices
Backplane Devices
Protocol & Bus Devices
Physically-Associated
Devices
Logically-Associated
Devices
iSCSI
SCSI
ATA
SATA
AGP
PCI
Net
UWB
1394
USB
BT
© 2004 Microsoft Corporation
Historically: A dual approach
Disparate programming models
No single user experience
IP devices limited in adoption
Busses drive device adoption
Limitations in protocols
IP Network
Directly Connected
© 2004 Microsoft Corporation
Moving Fwd: A Single, Simple
Model
Common Driver Framework
Common Programming Models
Common User Experience
Common protocols
Extensible & Secure
IP Network
Directly Connected
© 2004 Microsoft Corporation
Device Connectivity Trends
 Easy Migration
– Wired Busses to Wireless Busses (Wireless USB)
– UPnP v1.0 to Web Services (Function Discovery)
– Bluetooth Profiles to PAN (IP over Bluetooth)
 Connectivity Quality
–
–
–
–
–
Reliable
Secure
Extensible
Consistent (User, Developer)
Scaleable (simple, complex)
 Heterogeneous Wireless Connectivity
– Fast at Near (UWB)
– Reliable at Far (Zigbee, WiMax, etc)
© 2004 Microsoft Corporation
Emerging Connectivity
Build on existing platforms
–Ex: USB  Wireless USB
–Ex: SP2 BT  BT Audio
Powerful Protocols
–Rich, Transport Independent
–Unleash new device power
Powerful Radios
–Ultra Wide Band, WiMax
–Zigbee
© 2004 Microsoft Corporation
Plug And Play
 First created for Windows 95
 Provides an infrastructure for
– Discovery
– Software Installation
– Configuration
– Starting Services and Loading Device Drivers
 Bus Drivers are responsible for dealing with
bus-specific issues
 Device class-specific driver stacks and
services responsible for hardware
abstraction
 Extensible
© 2004 Microsoft Corporation
PnP-X
PnP-X integrates network connected
devices into the PnP infrastructure
New Windows services and UI
components support special issues with
Device Association
–Associated device == has a PnP devnode
Bluetooth pairing experience will be our
starting point
© 2004 Microsoft Corporation
Windows Applications Drive Devices
Demo
Cameron Brodeur
Program Manager
Network Connected Devices
Microsoft Corporation
© 2004 Microsoft Corporation
Function Discovery
 Function Discovery (FD) is a new API that addresses
today’s problems by providing consistent interfaces
for
–
Resource discovery and metadata retrieval
–
–
–
–
–
Providers expose the underlying resources as Function
Instances (FIs)
Metadata retrieval
Activation
Notifications
Default management
 FD also adds the following new capabilities
–
–
API layering
Flexible schema for resource categorization
–
–
Resources are not tied to a single category
Resources can be “re-categorized” as needed
© 2004 Microsoft Corporation
Simple Service Discovery Protocol
(SSDP)

Used for discovery of UPnP devices
–
–
–
–
Users can’t use protocols; Some service needs to be running on the PC to
do something when it sees a device
First version of UPnP places a link in My Network Places
Vendors want to produce devices that do more than present HTML UI
Because of lack of PnP integration, you create built-in UPnP support for:
–
–
–
–
–
–
–
–


Mouse
Camera
Scanner
Speakers
Portable Media Player
Block Storage
Joystick
…Or any other device supported by Windows natively
UPnP natively supported as PnP Device (through enumeration)
Built-in Function Discovery Provider
© 2004 Microsoft Corporation
WS-Discovery
 WS-Discovery is our preferred discovery
protocol for future devices
– Aligned with web services efforts
– Less chatty than SSDP
– Will work well in the enterprise
 Built-in Function Discovery Provider
© 2004 Microsoft Corporation
Security

802.11x wireless devices may need WEP keys

PIN or other shared secret may be necessary for association

Want to leverage existing security infrastructures (ex., SSL)

Integration with Windows Connect Now

Once securely associated, higher level protocols will be
responsible for session security

Windows Association infrastructure assists in transfer of
secrets needed by higher level protocols

What you need to do:
–
–
Send mail to us at ncdinfo @ microsoft.com
Very cool stuff coming up here … stay tuned!
© 2004 Microsoft Corporation
Additional Platform Advances
 64-bit Programming (IA64, x64)
–
–
–
–
See the DDK 64-bit porting guide
See whitepaper on data alignment (MSDN)
WHQL Certify your drivers & test on 64-bit systems
Platform SDK Documentation
 Windows Connect Now (Easy Networking)
–
–
–
–
–
–
Painless WiFi network set up
Available now (XPSP2)
More info: fconfigure @ microsoft.com
Send us mail today!
Build WCN devices today!
Get the Networked Devices SDK!
© 2004 Microsoft Corporation
So Many Standards
How Microsoft Can Help
 Key areas to work on together:
–
–
–
–
Wireless USB on Ultra Wide Band
Bluetooth Devices Support in Windows
Networked devices using UPnP 1.0
Advanced Networked devices using Web Services
 Windows Hardware & Driver Central
– Great resources to build great devices: www.microsoft.com/whdc
 Devices Profile for Web Services
–
–
–
–
Contribute to the Spec!
Workshops going on now! – www.microsoft.com/webservices
This will be in Longhorn
You can get ahead of the curve now
 Networked Devices:
–
–
–
–
–
Send us email today! Ncdinfo @ microsoft.com
Beta Program for you to get early access to bits
Build great networked devices on Windows!
Ship great Applications for Networked Devices
UPnP, Web Services  great user experiences
© 2004 Microsoft Corporation
A New Wave of Device Innovation
Starting Now (SP2)
Through Longhorn Launch
and
Beyond
© 2004 Microsoft Corporation
Call to Action









Make your drivers 64-bit compatible today
Build great wireless devices for Windows PCs today
Build on Windows Wireless Support today (Bluetooth, WCN, etc)
Windows Driver Foundation (WDF)
Consistent Device Install (CDI)
Plug and Play Extensions (PnP-X)
Function Discovery (FD)
Develop Windows apps to drive net devices, as if locally attached
Build Web Services protocols in your advanced devices today
 Get the SDKs, come to the Workshops, use WHQL
… AND TOGETHER, LET’S STRIVE FOR…
Great new scenarios, happy customers, bigger markets
© 2004 Microsoft Corporation