1 / 38

Windows SideShow : Using the Universal Driver to Implement Devices

Windows SideShow : Using the Universal Driver to Implement Devices. Rick Swaney Senior Software Design Engineer PC|3. Agenda. Present options for developing a Windows SideShow compatible device Describe the universal driver Describe universal wire protocol and packet format

tallys
Download Presentation

Windows SideShow : Using the Universal Driver to Implement Devices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows SideShow: Using the Universal Driver to Implement Devices Rick Swaney Senior Software Design Engineer PC|3

  2. Agenda • Present options for developing a Windows SideShowcompatible device • Describe the universal driver • Describe universal wire protocol and packet format • Discuss the required handling of each command packet • Discuss the device requirements for specific transports • Questions

  3. Device Development Options Device Device Driver Bitmap or text display Custom Windows SideShow Platform Microprocessor-based Universal .NET Micro Framework solution

  4. Device Firmware Components Message transport Display Shell Endpoints Message processor Endpoints Content cache Input Device

  5. Universal Driver • Built on Windows user-mode driver framework (UMDF) • Structured as a common framework with multiple transport-level components • Supports multiple transport types • USB • Bluetooth • TCP/IP • SSL over TCP/IP • Uses a published wire protocol • Is extensible through pass-through input/output control code (IOCTL)

  6. Packet Format 31 16 0 header size (bytes) error packet type payload sequence number ACK/NAK flag (0 = ACK, 1 = NAK) response flag (0 = command, 1 = response) Payload format is determined by the packet type Strings are 16-bit Unicode with no terminating null Strings and arrays are preceded by an element count

  7. Message Protocol • First message must be a SYNC command from the PC • Resets sequence numbers • Verifies protocol version • Following a SYNC, either side can initiate an exchange • Every command message requires a response • Response header must match the command type and sequence number • An invalid command should produce a NAK response • Command sequence numbers must be consecutive • Each side maintains its own sequence number • An out-of-sequence command must produce a NAK response

  8. Message Protocol (cont.) • A device must be able to process incoming commands while waiting for a response • Depending on the underlying transport, a device might have to scan payload bytes for a SYNC command pattern

  9. Command Packet Functions

  10. Device Query Commands

  11. Device Capabilities • A device capability is defined by a property key (GUID + index) • The value is reported as a PropVariant • Standard device capabilities are defined by Microsoft • An OEM can define custom property groups

  12. Device Settings Commands

  13. User Assignment Models • Two user models • Console user: device is assigned to the current interactive user • Assigned user: device can be assigned to any logged-on user • An assigned-user device must implement the user selection • Maintains a list of logged-on users • Provides a user interface for switching users • Users are identified by their security identifiers (SID) • A console user is identified by SID (S-1-5-4) • A null user is identified by SID (S-1-0-0) • A device must support a single model

  14. User Control Commands

  15. User Assignment Sequence PC Device Query current user Return current user or console user SID (assigned user model) Report user log-in or log-out Request current user change Set current user

  16. Configuring Gadgets • Connecting a gadget associates it with a specific endpoint type • Both components are specified by GUIDs • Each gadget is associated with a separate endpoint instance • The connection allows a gadget to send content to the endpoint • A device optionally creates a cache for the content • The connection command provides gadget metadata • Name • Icons (16x16, 32x32, 48x48) • Cache policy • Online-only attribute

  17. Gadget Configuration Commands

  18. Pre-enabled Gadgets • A device can specify a list of gadgets to be enabled by default • The user does not need to go to Windows SideShow Control Panel to enable these gadgets • A pre-enabled gadget is a good choice if your device is closely associated with a gadget • Example: a Windows Media Center Edition (MCE) remote control and an MCE gadget

  19. Content Items • A content item is a unit of data formatted by a gadget for a specific endpoint • Typically represents a single page of viewable information • Can be any unit of information, such as an appointment or contact • Each content item has a unique content ID (32-bit unsigned integer) • The endpoint defines the ID semantics • Content ID zero is reserved for plain text glance data • Glance data is primary or summary data for the gadget, which is displayed on the device’s home page • Most devices cache content items so that they are viewable when the PC is off

  20. Content Control Commands • Sets the display order of the connected gadgets • AddContentItem • DeleteContentItem • DeleteAllContentItems

  21. User Notifications • A notification is a timely message that appears to the user • Typically displayed in a pop-up window • A notification command specifies • Source gadget • Notification title • Message text • Optional icon • Expiration time (64-bit FILETIME ) • Enable command allows a user to enable or disable notifications from the PC

  22. User Notification Commands

  23. Application Event Command • An application event is a message sent from an endpoint to a gadget • It notifies the gadget of a user action such as a button press, menu selection, or page navigation • An event command includes: • Endpoint ID • Gadget ID • Event type identifier • Event data • An endpoint defines the event types and data formats it can send • Microsoft reserves a range of event types for common events

  24. Pass-Through Command • Allows arbitrary data to be sent and received • Driver passes data as an opaque binary object • Implemented as a buffered read/write IOCTL • Is the only mechanism for an application other than a gadget to communicate with the device

  25. Other Commands

  26. Specific Transport Requirements • USB • Bluetooth • TCP/IP

  27. USB Transport Requirements

  28. USB Transport Requirements (cont.)

  29. Bluetooth Transport Requirements

  30. Bluetooth Transport Requirements (cont.)

  31. TCP/IP Transport Requirements

  32. TCP/IP Transport Requirements (cont.)

  33. Resources Windows Driver Kit: • Windows SideShow Specifications/Guidelines http://go.microsoft.com/fwlink/?LinkId=128397 Microsoft Download Center • Windows SideShow Device Simulator http://go.microsoft.com/fwlink/?LinkId=128399 MDSN • Simple Content Format Reference http://go.microsoft.com/fwlink/?LinkId=128400

  34. Resources (cont.) WHDC Web Site: • SideShowResources http://go.microsoft.com/fwlink/?LinkId=128403 • Universal Driver Protocol Specification http://go.microsoft.com/fwlink/?LinkId=128398 • Microsoft OS Descriptors http://go.microsoft.com/fwlink/?LinkId=128401 • PNP-X: Plug and Play Extensions for Windows Specification http://go.microsoft.com/fwlink/?LinkId=128402

  35. Related Sessions

  36. Appendix A: Standard Device Capabilities

  37. Appendix B: Bluetooth Service ID Example SideShow service ID {5d9dda39-1e82-49c7-a0d6-6507ba9287ef} Device MAC address0x00081b00881c Driver customservice ID {5d9dda39-1e82-49c7-1c88-001b0800873f} Service ID in memory39 da 9d 5d 82 1e c7 49 1c 88 00 1b 08 0087 ef Insert device address to generate a device-specific service ID

More Related