UPnP Technology 2009/03/31 Hsin-Han Yang, Cheng-Yi Chien, Po-Cheng Huang.

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

UPnP Device Architecture. Networking is easy, except… Ad hoc networks don't have resources just for the sake of the network E.g., DHCP, DNS, directory,
Universal Plug and Play protocol (UPnP)
Certification Test Tool Jon Wheeler Test Lead Microsoft Corporation.
Web Service Architecture
TU/e Service Discovery Mechanisms: two case studies / IC2002 Service Discovery Mechanisms: Two case studies Control point Device UPnP Terminal Domain Host.
CSE 6331 © Leonidas Fegaras Web Services1 Web Services (adapted from Erdogan Dogdu's presentation) Leonidas Fegaras.
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
31242/32549 Advanced Internet Programming Advanced Java Programming
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Presenter: James Huang Date: Sept. 29,  HTTP and WWW  Bottle Web Framework  Request Routing  Sending Static Files  Handling HTML  HTTP Errors.
Telecooperation Technische Universität Darmstadt Copyrighted material; for TUD student use only Telecooperation P4: Internet Praktikum Q&A Session Telecooperation.
XML in the real world (2) SOAP. What is SOAP? ► SOAP stands for Simple Object Access Protocol ► SOAP is a communication protocol ► SOAP is for communication.
SOAP SOAP is a protocol for accessing a Web Service. SOAP stands for Simple Object Access Protocol * SOAP is a communication protocol * SOAP is for communication.
Topics Acronyms in Action SOAP 6 November 2008 CIS 340.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Lecture 5 Middleware: Peer-to-Peer Computing
A New Computing Paradigm. Overview of Web Services Over 66 percent of respondents to a 2001 InfoWorld magazine poll agreed that "Web services are likely.
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
Universal Plug and Play (UPnP) Presented by: Kamal Kamal Kamal Kamal Mohammad Atieh Mohammad Atieh.
The Computer Communication Lab (236340) Spring 2005 Universal Plug and Play on Mobile Phone With Qualcomm - Device -
Certification Test Tool Update Toby Nixon Program Manager Microsoft Corporation.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
IT 210 The Internet & World Wide Web introduction.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Universal Plug and Play Dirk Grunwald University of Colorado.
Device Servers Prasun Dewan Department of Computer Science University of North Carolina
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
CINEMA’s UbiComp Subsystem Stefan Berger and Henning Schulzrinne Department of Computer Science Columbia University
Enabling Workflow in UPnP Networks Andreas BobekUniversity of Rostock Faculty of Computer Science and Electrical Engineering Andreas Bobek, Hendrik Bohn,
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
Enabling Embedded Systems to access Internet Resources.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
UPnP & DLNA Speaker: Yi-Lei Chang Advisor: Dr. Kai-Wei Ke 2012/03/27 1.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Universal Plug and Play (UPnP) and XML Shridhar Bhat
IETF-50 UPnP Update Prakash Iyer Intel Corporation
Implementing Universal Plug And Play In Smart Objects And Intelligent Appliances Bengt Christensson CTO Axis Communications.
Doc.: IEEE /0961r0 Submission July 2012 Alex Ashley, NDS LtdSlide 1 Layer 2 Service Discovery Protocols Date: Authors:
Certification Test Tool Sarat Manni Test Lead Microsoft Corporation.
MediaServer:1 Device Template Version 1.01 Date: June 25, 2002 For UPnP™ Version 1.0 Status: Standardized DCP File from: MediaServer1.0.pdf Author: John.
MobileMAN Internal meetingHelsinki, June 8 th 2004 NETikos activity in MobileMAN project Veronica Vanni NETikos S.p.A.
UPnP Introduction 教授 : 逄愛君 組員 : 資訊三 張弘霖 資訊四 陳錦翰 資訊四 蔡旻諧.
Voice-based generic UPnP Control Point Andreas BobekUniversity of Rostock Faculty of Computer Science and Electrical Engineering Andreas Bobek, Hendrik.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
1 Web Services Web and Database Management System.
Integrating and Troubleshooting Citrix Access Gateway.
TCP/IP (Transmission Control Protocol / Internet Protocol)
Service Discovery Protocols Mobile Computing - CNT Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University.
UPnP AV Architecture - Generic Interface Design And Java Implementation Andreas BobekUniversity of Rostock Faculty of Computer Science and Electrical Engineering.
Basic Device Definition Version 1.0 Date: For UPnP™ Version 1.0 (Status: Template Design Complete) File from: BasicDevice-1.0.pdf Author: Scott.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
GENA (General Event Notification Architecture) RTLAB 이 남 지 2003/01/08.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
The Internet Technological Background. Topic Objectives At the end of this topic, you should be able to do the following: Able to define the Internet.
Ch 2. Application Layer Myungchul Kim
Preview of Universal Plug and Play RTLAB 배대호
UPnP Device Architecture
WWW and HTTP King Fahd University of Petroleum & Minerals
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
Sabri Kızanlık Ural Emekçi
Network Connected Devices
Implementation and validation of UPnP in a home networking environment
Universal Plug and Play protocol (UPnP)
JINI ICS 243F- Distributed Systems Middleware, Spring 2001
Presentation transcript:

UPnP Technology 2009/03/31 Hsin-Han Yang, Cheng-Yi Chien, Po-Cheng Huang

Outline What is UPnP? Why UPnP? Goals of UPnP UPnP Protocol Stack Steps to UPnP Networking Summary

What is UPnP? Universal Plug and Play Peer-to-peer network connectivity of intelligent appliances, wireless devices and PCs of all forms Zero-configuration, flexible networking Standard-based connectivity to ad-hoc or unmanaged networks Distributed Reduces footprint OS, language and media independent Uses IP, TCP, UDP, HTTP and XML

Why UPnP? share information among devices We need connectivity to remotely control devices, to move digital data in the form of audio, video and still images between devices, to share information among devices and with the World Wide Web, and to exchange structured and secure digital data to support electronic commerce. be able to interact with other Universal Plug and Play devices, regardless of platform. The choice of language and operating system will give vendors the flexibility to choose the best platform for their device and still be confident that their products will be able to interact with other Universal Plug and Play devices, regardless of platform. 4

More than Plug & Play A device can automatically join the network Obtain an IP address Convey its capabilities Learn about the presence and capabilities of other devices Use those capabilities Can leave the network smoothly 5

Goals Describe the protocols for communication between Control points Controller, usually client Device Controlled, usually server An actual device might contain both functions DeviceDevice ServiceService Control Point DeviceDevice ServiceService

UPnP Protocol Stack Vendor-specific physical net UPnP Device Architecture UDPUDP IPIP HTTPU/MUHTTPU/MU GENAGENASSDPSSDP SOAPSOAP HTTPHTTP HTTPHTTP GENAGENA TCPTCP UPnP Forum UPnP vendor

Steps to UPnP Networking 0 Control point and device get addresses 1 Control point finds interesting device 2 Control point learns about device capabilities 3 Control point invokes actions on device 4 Control point listens to state changes of device 5 Control point controls device and/or views device status using HTML UI 0 Addressing 1 Discovery 2 Description 5 Presentation 4 Eventing 3 Control

Steps to UPnP Networking 9 Service Action

Steps to UPnP Networking 0 Control point and device get addresses 1 Control point finds interesting device 2 Control point learns about device capabilities 3 Control point invokes actions on device 4 Control point listens to state changes of device 5 Control point controls device and/or views device status using HTML UI 0 Addressing 1 Discovery 2 Description 5 Presentation 4 Eventing 3 Control

0 Addressing Control point and device get address Use a DHCP server Else use Auto IP (Always looking for DHCP server) What is Auto IP? Pick an address in /16 range Check to see if it is used (ARP) Periodically check for DHCP server Use DNS if available Easier for a human to use

Steps to UPnP Networking 0 Control point and device get addresses 1 Control point finds interesting device 2 Control point learns about device capabilities 3 Control point invokes actions on device 4 Control point listens to state changes of device 5 Control point controls device and/or views device status using HTML UI 0 Addressing 1 Discovery 2 Description 5 Presentation 4 Eventing 3 Control

1 Discovery New device can advertise its services to control points Control point can search for the devices of interest Control point gets to know about the devices, its services and a pointer to a more detailed information 13

1 Discovery: Protocol Stack 14 UPnP vendor UPnP Forum UPnP Device Architecture UDPUDP IPIP HTTPMU (multicast) GENAGENASSDPSSDP HTTPU (unicast) SSDPSSDP

1 Discovery: Advertising New device multicasts a number of discovery messages to a standard multicast address using GENA Sends a cancellation message if device is going to become unavailable NOTIFY * HTTP/1.1 HOST: :1900 CACHE-CONTROL: max-age = seconds until advertisement expires LOCATION: URL for UPnP description for root device NT: search target NTS: ssdp:alive USN: advertisement UUID

1 Discovery: Search Control point multicasts a search message with a target equal to the type or identifier for a device or service Uses multicast variant of HTTP that has been extended using SSDP methods headers M-Search is a method defined by SSDP M-SEARCH * HTTP/1.1 HOST: :1900 MAN: "ssdp:discover" MX: seconds to delay response ST: search target

1 Discovery: Response Responses from devices contain discovery messages identical to those advertised by newly connected devices except that now they are unicast. 17 HTTP/ OK CACHE-CONTROL: max-age = seconds until advertisement expires LOCATION: URL for UPnP description for root device ST: search target USN: advertisement UUID

Steps to UPnP Networking 0 Control point and device get addresses 1 Control point finds interesting device Control point learns about device capabilities 2 Control point learns about device capabilities 3 Control point invokes actions on device 4 Control point listens to state changes of device 5 Control point controls device and/or views device status using HTML UI 0 Addressing 1 Discovery 2 Description 5 Presentation 4 Eventing 3 Control

2 Description Control point issues an HTTP GET request on the URL provided by the device in the discovery message to retrieve a description of the device and its capabilities. 19 UPnP vendor UPnP Forum UPnP Device Architecture IPIP HTTPHTTP TCPTCP

2 Description: Contents Device description Type Physical container Logical container For each service Type URL for description URL for control URL for eventing UI Icons URL for presentation Services Functional units within devices Service description Actions State variables Actual (vs. designed) implementation Expressed in XML

2 Description: Device (physics) Includes vendor-specific, manufacturer information like the model name and number, serial number, manufacturer name, URLs to vendor-specific Web-sites, etc. 21

2 Description: Device (physics) base URL for all relative URLs short user-friendly title manufacturer name URL to manufacturer site long user-friendly title model name model number URL to model site manufacturer's serial number uuid:UUID Unique Device Name Universal Product Code urn:schemas-upnp-org:device:deviceType urn:schemas-upnp-org:service:serviceType:v urn:upnp-org:serviceId:serviceID URL to service description URL for control URL for eventing Declarations for other services (if any) go here Description of embedded devices (if any) go here image/format horizontal pixels vertical pixels color depth URL to icon XML to declare other icons, if any, go here URL for presentation 1 0 base URL for all relative URLs short user-friendly title manufacturer name URL to manufacturer site long user-friendly title model name model number URL to model site manufacturer's serial number uuid:UUID Unique Device Name Universal Product Code urn:schemas-upnp-org:device:deviceType urn:schemas-upnp-org:service:serviceType:v urn:upnp-org:serviceId:serviceID URL to service description URL for control URL for eventing Declarations for other services (if any) go here Description of embedded devices (if any) go here image/format horizontal pixels vertical pixels color depth URL to icon XML to declare other icons, if any, go here URL for presentation 1 0

Example : Clock Device (physics) ClockDevice.java UPnPDevice Implement UPnPDevice SetupDeviceProperties()

2 Description: Device (logical) For each each service included in the device, the device description lists the service type, name, a URL for a service description, a URL for control, and a URL for eventing. 24

2 Description: Device (logical) base URL for all relative URLs short user-friendly title manufacturer name URL to manufacturer site long user-friendly title model name model number URL to model site manufacturer's serial number uuid:UUID Universal Product Code urn:schemas-upnp-org:device:deviceType :v urn:schemas-upnp-org:service:serviceType:v urn:upnp-org:serviceId:serviceID URL to service description URL for control URL for eventing Declarations for other services (if any) go here Description of embedded devices (if any) go here image/format horizontal pixels vertical pixels color depth URL to icon XML to declare other icons, if any, go here URL for presentation 1 0

Example : Clock Device (logical) TimeService.java UPnPService implements UPnPService

2 Description: Device (other) base URL for all relative URLs short user-friendly title manufacturer name URL to manufacturer site long user-friendly title model name model number URL to model site manufacturer's serial number uuid:UUID Universal Product Code urn:schemas-upnp-org:device:deviceType urn:schemas-upnp-org:service:serviceType:v urn:upnp-org:serviceId:serviceID URL to service description URL for control URL for eventing Declarations for other services (if any) go here Description of embedded devices (if any) go here image/format horizontal pixels vertical pixels color depth URL to icon XML to declare other icons, if any, go here URL for presentation 1 0

2 Description: Service (actions) A list of commands, or actions, the service responds to, and parameters, or arguments, for each action List of state variables that model the state of the services at run time, and are described in terms of their data type, range, and event characteristics

2 Description: Service (actions) actionName formalParameterName in xor out stateVariableName Declarations for other arguments (if any) go here Declarations for other actions (if any) go here variableName variable datatype default value minimum value maximum value increment value variableName variable data type default value some value some value Declarations for other state variables (if any) go here 1 0

Example : Clock Device (actions) GetTimeAction.java UPnPAction implements UPnPAction

2 Description: Service (variable) actionName formalParameterName in xor out stateVariableName Declarations for other arguments (if any) go here Declarations for other actions (if any) go here variableName variable datatype default value minimum value maximum value increment value variableName variable data type default value some value some value Declarations for other state variables (if any) go here 1 0

Example : Clock Device (actions) TimeStateVariable.java UPnPStateVariable implements UPnPStateVariable

Steps to UPnP Networking 0 Control point and device get addresses 1 Control point finds interesting device 2 Control point learns about device capabilities 3* Control point invokes actions on device 4 Control point listens to state changes of device 5 Control point controls device and/or views device status using HTML UI 0 Addressing 1 Discovery 2 Description 5 Presentation 4 Eventing 3 Control

Control point invokes actions on device 0 get address 1 discover device 2 retrieve description get URL for control 3 send actions to device Protocol stack UPnP vendor UPnP Forum UPnP Device Architecture IPIP SOAPSOAP HTTPHTTP TCPTCP

3 Control: What happens? Invoking actions is a kind of remote procedure call A control point sends the action to the devices service When the action has completed(or failed), the service returns any results or errors Polling for the value of state variable is a special case 35

Example : (Control Point) DriverProxy.java ServiceListener Implements ServiceListener

3 Control: SOAP Sidebar What is SOAP? XML and HTTP Simple Object Access Protocol defines the use of XML and HTTP for remote procedure calls SOAP defines additional HTTP headers, and to ensure that these are not confused with other HTTP extensions

3 Control: Invoke Action M-POST path of control URL HTTP/1.1 HOST: host of control URL:port of control URL CONTENT-TYPE: text/xml; charset="utf-8" MAN: ns=01 01-SOAPACTION: "urn:schemas-upnp-org:service:serviceType:v#actionName M-POST path of control URL HTTP/1.1 HOST: host of control URL:port of control URL CONTENT-TYPE: text/xml; charset="utf-8" MAN: ns=01 01-SOAPACTION: "urn:schemas-upnp-org:service:serviceType:v#actionName in arg value other in args and their values (if any) go here

3 Control: Action Result Service must respond within 30 seconds Actions that take longer than this should return early and send an event when it completes Out arguments must not be used to convey error information HTTP/ OK CONTENT-TYPE: text/xml; charset="utf-8" HTTP/ OK CONTENT-TYPE: text/xml; charset="utf-8" out arg value other out args and their values (if any) go here

3 Control: Query for variable Control point may also poll the service for the value of a state variable by sending a query message Query request is sent to control URL Uses SOAP A query message may query only one state variable Query will yield more up-to-date value than those received via eventing 40

Steps to UPnP Networking 0 Control point and device get addresses 1 Control point finds interesting device 2 Control point learns about device capabilities 3 Control point invokes actions on device 4 Control point listens to state changes of device 5 Control point controls device and/or views device status using HTML UI 0 Addressing 1 Discovery 2 Description 5 Presentation 4 Eventing 3 Control

4 Eventing Control point listens to state changes of device a 0 get address 1 discover device 2 retrieve descr get URL for eventing 4 subscribe to events from device Control point can renew subscription Control point can cancel subscription Protocol stack UPnP vendor UPnP Forum UPnP Device Architecture IPIP HTTPHTTP GENAGENA TCPTCP

4 Eventing 43

4 Eventing: GENA Sidebar What is GENA? General Event Notification Architecture Send and receive notifications using HTTP over TCP/IP and administratively-scoped multicast UDP. SUBSCRIBE to notifications UNSUBSCRIBE NOTIFY Of device availability Of state variable changes

4 Eventing: Subscribing Control point subscribes to receive messages of a services Sends a URL to receive event messages Subscribe, callback and NT are GENA headers Publisher sends a response to this message SUBSCRIBE publisher path HTTP/1.1 HOST: publisher host:publisher port CALLBACK: NT: upnp:event TIMEOUT: Second-requested subscription duration

4 Eventing: Subscription It gives the subscription id and the duration for which this subscription is valid Device immediately sends a special, initial event to control point with the value of all evented variables HTTP/ OK SID: uuid:subscription-UUID TIMEOUT: Second-actual subscription duration

4 Eventing: Publisher Publisher maintains a table Unique subscription identifier Delivery URL for event messages Event key. 0 for initial message Useful for error detection by subscriber Subscription duration Publisher may persist subscription across power failures Some state variables have large values and hence they are non-evented

4 Eventing: Notify The values of changed state variables to all the subscribers. The initial message contains all the state variables. NOTIFY delivery path HTTP/1.1 HOST: delivery host:delivery port CONTENT-TYPE: text/xml NT: upnp:event NTS: upnp:propchange SID: uuid:subscription-UUID SEQ: event key new value Other variable names and values (if any) go here

4 Eventing: Facts If the subscription is not renewed, the publisher ceases to sent event messages For renewal and unsubscription, subscriber just has to send SID The frequency of notification determines the traffic on the network The volatility of value of state variable determines the frequency of notifications If a subscriber misses a notification(missing key), it has to unsubscribe and then re-subscribe A message is sent even if that control point didnt cause change in state variables

Example : (Control Point) UPnPSubscriber.java Implement UPnPEventListener

Steps to UPnP Networking 0 Control point and device get addresses 1 Control point finds interesting device 2 Control point learns about device capabilities 3 Control point invokes actions on device 4 Control point listens to state changes of device 5 Control point controls device and/or views device status using HTML UI 0 Addressing 1 Discovery 2 Description 5 Presentation 4 Eventing 3 Control

5 Presentation Control point controls device and/or views device status using HTML UI 0 get address 1 discover device 2 retrieve descr get URL for presentation 5 load presentation page User can interact with the device Protocol stack UPnP vendor UPnP Device Architecture IPIP HTTPHTTP TCPTCP

Summary UPnP says 1. Just send data, not code (reduces testing) 2. Keep implementation private (API) 3. Agree on content / format of data UPnP is Web-based protocols Tailored by a Forum for device (service) types That are API, OS, physical network neutral For discovery, description, control, eventing And simple HTML UI too For more information Resources:

UPnP Bundle & Device Setup Domoware Website roject/showfiles.php?gr oup_id=118919id= Add External Jar device_all jar upnp_api jar upnpbaseextra bin.jar upnpbasedriver bin.jar

Homework Modify the Domoware UPnP Devices for adding new functionalities which can be controlled by UPnP Control Point. 4/21 TA 55

Thank You!