UPNP - Universal Plug and Play

What is UPnP?

UPnP (Universal Plug and Play) is a set of networking protocols that allows devices on a network to discover each other and establish functional network services automatically, without manual configuration.

Why is UPnP useful?

  • Automatically discovering devices (smart TVs, printers, routers)

  • Enabling seamless communication between devices

  • Reducing manual setup for port forwarding, media sharing, and device control

How it works

  • Device joins network: A UPnP-enabled device connects to the local network

  • Discovery via SSDP: Sends multicast messages announcing presence

  • Description exchange: Other devices retrieve device capabilities (usually XML)

  • Control: Devices send commands using SOAP over HTTP

  • Eventing: Devices subscribe and receive state change notifications

  • Presentation: Optional web interface for user interaction

Where is UPnP used?

  • Home networks (smart TVs, gaming consoles, media servers)

  • IoT devices (smart lights, thermostats, cameras)

  • Printers and scanners

  • Routers (automatic port forwarding)

  • Streaming and file sharing applications

Which OSI layer does this protocol belong to?

  • UPnP uses HTTP, SOAP, and XML—all application-layer protocols

  • Manages device discovery, service description, control commands, event notifications

  • High-level functions performed by applications

What is SSDP’s role in UPnP?

  • SSDP is the discovery protocol within UPnP

  • Devices advertise themselves using NOTIFY messages

  • Control points (clients) search for devices using M-SEARCH

What devices typically support UPnP?

  • Smart TVs and media players

  • Network printers

  • Game consoles (PlayStation, Xbox)

  • IP cameras

  • Routers

  • Home automation hubs

  • Streaming servers (e.g., Plex, DLNA)

Can UPnP work across subnets or VLANs?

No, UPnP is designed for local LANs only. SSDP uses multicast, which generally does not cross routers unless special relay/proxy setups are in place.

What are the main components of UPnP architecture?

  • Devices – Provide services (e.g., media server, printer)

  • Control Points – Clients that discover and control devices

  • Services – XML-defined interfaces describing functionality

  • Description – Device metadata in XML format

  • Control – Clients send SOAP commands

  • Eventing – Devices notify clients about state changes (optional)

  • Presentation – Optional web UI for user interaction

What happens if two devices provide the same UPnP service?

Clients differentiate them by: * Unique UUIDs * USN field * Different service description URLs

Is UPnP only for home networks?

Mostly yes. UPnP is designed for LAN environments and does not scale well in: * WAN environments * Segmented networks without multicast forwarding

  • In this section, you are going to learn

  • Terminology

  • Version Info

S.No

Version

RFC

Year

contribution/core ideas

1

UPnP 1.0

UPnP Device Architecture 1.0

2000

Original version; defines discovery, description, control, and eventing using SSDP, HTTP, XML, and SOAP.

2

UPnP 1.1

UPnP Device Architecture 1.1

2008

Adds features like device security, IPv6 support, and improved eventing.

3

UPnP ISO Standard

ISO/IEC 29341

present

International standardization of UPnP protocols, covering device and service templates in a modular format.

  • setup

  • setup

UPNP M SEARCH Packet

S.No

Packet Components

Description

Size(Bytes)

1

M-SEARCH Packet

Sent by a control point (like a client or app) to actively search for UPnP devices or services on the network.

~150250 Bytes

Request Line

M-SEARCH * HTTP/1.1

2530

HOST

Multicast address and port (239.255.255.250:1900)

30

MAN

Method type, always “ssdp:discover”

25

MX

Maximum wait time before response (in seconds)

10

ST

Search Target (device/service type)

2050

USER-AGENT / SERVER

OS and UPnP version

4060

EXT

Optional placeholder for future extensions

5

UPNP NOTIFY Packet

2

NOTIFY Packet

Sent by UPnP devices to announce their presence (ssdp:alive) or departure (ssdp:byebye) on the network.

~200300 Bytes

Request Line

NOTIFY * HTTP/1.1

2530

HOST

Multicast address and port

30

NT

Notification Type (device/service type)

2050

NTS

Notification Sub Type (e.g., ssdp:alive, ssdp:byebye)

20

USN

Unique Service Name (UUID + service type)

50100

LOCATION

URL to device description

50100

CACHE-CONTROL

Cache duration for advertisement

25

SERVER

OS and UPnP version

4060

UPNP HTTP RESPONSE Packet

3

HTTP 200 OK Response

Sent by a UPnP device in response to an M-SEARCH request, providing details about the device or service.

~200300 Bytes

Status Line

HTTP/1.1 200 OK

1520

CACHE-CONTROL

Cache duration

25

DATE

Timestamp of response

30

EXT

Optional extension header

5

LOCATION

URL to device description

50100

SERVER

OS and UPnP version

4060

ST

Search Target

2050

USN

Unique Service Name

50100

CONTENT-LENGTH

Usually 0 for SSDP

20

S.No

Use Case

Description

1

Media Streaming

Enables devices like smart TVs, game consoles, and speakers to discover and stream content from media servers.

2

Printer Sharing

Allows network printers to be automatically discovered and used by any device on the network.

3

Internet Gateway Configuration (IGD)

Automatically configures port forwarding on routers for applications like gaming, VoIP, and P2P.

4

Smart Home Automation

Facilitates communication between smart devices like lights, thermostats, and sensors.

5

Device Discovery

Automatically detects and identifies new devices on the network without manual setup.

6

Remote Access

Enables remote control and monitoring of devices via UPnP-enabled apps.

7

Firmware Updates

Devices can advertise and retrieve firmware updates from a central server.

8

Network Audio Systems

Synchronizes and controls multi-room audio systems over the local network.

9

Gaming Consoles

Consoles like Xbox and PlayStation use UPnP to open ports and connect to online services.

10

Security Cameras

Allows IP cameras to be discovered and accessed by NVRs or mobile apps without manual IP configuration.

S.No

UPNP features

Description

1

Zero Configuration

Devices can connect and configure themselves automatically without user input.

2

Auto Discovery

Devices automatically discover each other on the network using SSDP.

3

Device Control

Devices can expose control interfaces (via SOAP) for remote management.

4

Service Advertisement

Devices announce their presence and capabilities to the network.

5

Event Notification

Devices can send updates when their state changes (via GENA).

6

Content Sharing

Media servers can share content with clients like TVs and speakers.

7

Port Mapping (IGD)

Automatically opens ports on routers for applications like games or VoIP.

8

Standardized Architecture

Uses XML-based device and service descriptions for interoperability.

9

Extensibility

New device and service types can be defined and integrated easily.

10

Cross-Platform Support

Works across different operating systems and hardware platforms.

Zero Configuration - Testcases

S.No

Test Case

Description

Expected Result

1

UPnP Device Boot

Power on UPnP device

Sends SSDP NOTIFY messages

2

UPnP Device Discovery

Send M-SEARCH

Device responds with HTTP 200 OK

3

Device Description Retrieval

Fetch device description XML

Valid XML with device metadata

4

Service Description Retrieval

Fetch service description

Valid SCPD XML

5

Control Action Execution

Send SOAP action

Device executes and responds

6

Event Subscription

Subscribe to service

Device returns SID and timeout

7

Event Notification

Change state variable

Sends NOTIFY to subscriber

8

Presentation URL Access

Open presentation URL

Web interface loads

9

Device Re-announcement

Wait for periodic NOTIFY

Device re-announces presence

10

Device Departure

Power off device

Sends ssdp:byebye or times out

11

Multiple Device Discovery

Connect multiple devices

All respond to M-SEARCH

12

Device Type Filtering

Search for specific device type

Only matching devices respond

13

Service Type Filtering

Search for specific service type

Only matching services respond

14

Invalid SSDP Request

Send malformed M-SEARCH

No response or error

15

SSDP TTL Test

Set TTL < 1

No responses

16

SSDP MX Value Test

Vary MX value

Delayed responses

17

SSDP Over TCP

Attempt SSDP over TCP

Fails (UDP only)

18

SSDP Logging

Enable logs

Logs show discovery

19

UPnP Control Point Retry

Retry M-SEARCH

Devices respond

20

UPnP Eventing Timeout

Wait for timeout

Subscription expires

21

UPnP Device with Multiple Services

Discover multi-service device

All services listed

22

UPnP Response Validation

Check headers

Must include LOCATION, ST, USN

23

UPnP with NAT

Devices behind NAT

Local discovery works

24

UPnP with VLANs

Devices on different VLANs

No discovery unless routed

25

UPnP with Wi-Fi Isolation

Enable AP isolation

Devices not discovered

26

UPnP with IGMP Snooping

Enable IGMP snooping

Multicast may be blocked

27

UPnP with VPN

Use VPN client

Discovery may fail

28

UPnP with Proxy

Use HTTP proxy

UPnP bypasses proxy

29

UPnP with Docker

Run UPnP in container

Discovery depends on network mode

30

UPnP with Virtual Machines

Use VM on bridged/NAT

Bridged: works; NAT: may fail

31

UPnP with Smart TVs

Use smart TV

TV responds to M-SEARCH

32

UPnP with Media Players

Use VLC, Kodi

Devices discovered

33

UPnP with Printers

Use network printer

Printer responds if UPnP-enabled

34

UPnP with IoT Devices

Use smart plugs/cameras

Devices respond if UPnP-enabled

35

UPnP with Gaming Consoles

Use Xbox/PS

Consoles respond

36

UPnP with Mobile Apps

Use UPnP app

Devices discovered

37

UPnP with Python

Use miniupnpc or ssdp.py

Devices discovered

38

UPnP with Node.js

Use node-ssdp

Devices respond

39

UPnP with Java

Use Cling library

Devices discovered

40

UPnP with Windows

Use Windows Media Player

Discovers DLNA/UPnP devices

41

UPnP with Linux

Use gupnp-tools or gssdp-discover

Devices listed

42

UPnP with macOS

Use VLC or Finder

Devices discovered

43

UPnP with Wireshark

Capture SSDP packets

SSDP visible on UDP 1900

44

UPnP with Nmap

Use nmap –script upnp-info

Devices and services listed

45

UPnP Service Control

Send Set/Get commands

Device responds with result

46

UPnP Service Eventing

Monitor state changes

NOTIFY messages received

47

UPnP Device Removal

Remove device from network

Control point removes it

48

UPnP Device Renaming

Change friendly name

Control point updates name

49

UPnP Device Conflict

Two devices same UUID

One changes UUID

50

UPnP Security Test

Send malformed SOAP

Device handles gracefully

Auto Discovery - Testcases

S.No

Test Case

Description

Expected Result

1

Device Advertisement

Power on UPnP device

Sends SSDP NOTIFY messages

2

Control Point Search

Send M-SEARCH

Device responds with HTTP 200 OK

3

Periodic Re-Advertisement

Wait for periodic NOTIFY

Device re-announces presence

4

Device Departure

Power off device

Sends ssdp:byebye or times out

5

Multiple Device Discovery

Connect multiple devices

All respond to M-SEARCH

6

Device Type Filtering

Search for specific device type

Only matching devices respond

7

Service Type Filtering

Search for specific service type

Only matching services respond

8

SSDP TTL Test

Set TTL < 1

No responses

9

SSDP MX Value Test

Vary MX value

Responses delayed accordingly

10

SSDP Over TCP

Attempt SSDP over TCP

Fails (UDP only)

11

SSDP Multicast Listening

Monitor 239.255.255.250:1900

SSDP traffic visible

12

SSDP Packet Loss

Drop SSDP packets

Some devices not discovered

13

SSDP Retry Mechanism

Retry M-SEARCH

Devices respond

14

SSDP Logging

Enable logs

Logs show discovery events

15

SSDP Spoofing

Send spoofed NOTIFY

Control point logs or ignores

16

SSDP Flooding

Send rapid M-SEARCH

Devices may throttle or ignore

17

SSDP Response Validation

Check headers

Must include LOCATION, ST, USN

18

SSDP with VLANs

Devices on different VLANs

No discovery unless routed

19

SSDP with Wi-Fi Isolation

Enable AP isolation

Devices not discovered

20

SSDP with IGMP Snooping

Enable IGMP snooping

Multicast may be blocked

21

SSDP with VPN

Use VPN client

Discovery may fail

22

SSDP with NAT

Devices behind NAT

Local discovery works

23

SSDP with Proxy

Use HTTP proxy

SSDP bypasses proxy

24

SSDP with Docker

Run UPnP in container

Discovery depends on network mode

25

SSDP with Virtual Machines

Use VM on bridged/NAT

Bridged: works; NAT: may fail

26

SSDP with Smart TVs

Use smart TV

TV responds to M-SEARCH

27

SSDP with Media Players

Use VLC, Kodi

Devices discovered

28

SSDP with Printers

Use network printer

Printer responds if UPnP-enabled

29

SSDP with IoT Devices

Use smart plugs/cameras

Devices respond if UPnP-enabled

30

SSDP with Gaming Consoles

Use Xbox/PS

Consoles respond

31

SSDP with Mobile Apps

Use UPnP app

Devices discovered

32

SSDP with Python

Use miniupnpc or ssdp.py

Devices discovered

33

SSDP with Node.js

Use node-ssdp

Devices respond

34

SSDP with Java

Use Cling library

Devices discovered

35

SSDP with Windows

Use Windows Media Player

Discovers DLNA/UPnP devices

36

SSDP with Linux

Use gssdp-discover

Devices listed

37

SSDP with macOS

Use VLC or Finder

Devices discovered

38

SSDP with Wireshark

Capture SSDP packets

SSDP visible on UDP 1900

39

SSDP with Nmap

Use nmap –script upnp-info

Devices and services listed

40

SSDP with Bonjour

Coexist with mDNS

No interference

41

SSDP with IPv6

Use IPv6 multicast

Devices respond (if supported)

42

SSDP on Dual Stack

Use IPv4 and IPv6

Dual responses

43

SSDP with Hostname Conflict

Two devices same name

One renames

44

SSDP with Long Device Names

Use long friendly names

Control point handles gracefully

45

SSDP with Unicode

Use non-ASCII names

Displayed correctly

46

SSDP with Multiple Interfaces

Device with Wi-Fi + Ethernet

Both interfaces advertise

47

SSDP with Multiple Services

Device with many services

All services listed

48

SSDP with Service Update

Change service info

Control point updates

49

SSDP with Service Removal

Remove service

Control point removes it

50

SSDP with Service Conflict

Two services same type

Both listed with unique USNs

Device Control - Testcases

S.No

Test Case

Description

Expected Result

1

Device Discovery

Discover UPnP-enabled devices on the network

Devices are listed

2

Device Description Retrieval

Retrieve device description XML

XML is parsed successfully

3

Service Discovery

Discover services offered by a device

Services are listed

4

Action Invocation

Invoke a control action (e.g., Play, Stop)

Action executes successfully

5

State Variable Query

Query a devices state variable

Correct value returned

6

Device Control via SOAP

Send SOAP request to control device

Device responds correctly

7

Invalid Action Request

Send invalid action to device

Error response received

8

Device Control Timeout

Simulate timeout during control

Timeout handled gracefully

9

Device Control with Authentication

Control device requiring auth

Authenticated and action succeeds

10

Device Control without Authentication

Attempt control without auth

Access denied

11

Device Control with Incorrect Auth

Use wrong credentials

Access denied

12

Device Control with Network Delay

Simulate network latency

Control still succeeds or retries

13

Device Control with Packet Loss

Simulate packet loss

Retries or fails gracefully

14

Device Control with Fragmented Packets

Send fragmented control messages

Device handles fragments correctly

15

Device Control with Malformed XML

Send malformed SOAP/XML

Device returns error

16

Device Control with Unsupported Action

Request unsupported action

Device returns error

17

Device Control Logging

Log control actions

Logs are generated

18

Device Control Audit Trail

Verify audit trail of actions

Actions are recorded

19

Device Control via Mobile App

Control device from mobile

Action succeeds

20

Device Control via Web Interface

Control device from browser

Action succeeds

21

Device Control via Voice Assistant

Control device via Alexa/Google

Action succeeds

22

Device Control with Multiple Clients

Control from multiple sources

All actions processed correctly

23

Device Control with Concurrent Requests

Send simultaneous control requests

Device handles concurrency

24

Device Control with Role-Based Access

Restrict actions by user role

Access enforced

25

Device Control with Scheduled Actions

Schedule future actions

Actions execute on time

26

Device Control with Event Subscription

Subscribe to device events

Events received correctly

27

Device Control with Event Notification

Receive state change notifications

Notifications received

28

Device Control with Device Removal

Remove device during control

Control fails gracefully

29

Device Control with Device Reboot

Reboot device mid-session

Session re-establishes

30

Device Control with Firmware Update

Update device firmware

Control resumes post-update

31

Device Control with Device Grouping

Control grouped devices

All devices respond

32

Device Control with Device Unavailable

Control offline device

Error returned

33

Device Control with Device Reconnect

Reconnect device and retry

Control succeeds

34

Device Control with Device Rename

Rename device and control

Control still works

35

Device Control with Device IP Change

Change IP and retry control

Device rediscovered and controlled

36

Device Control with SSDP Discovery

Use SSDP to discover devices

Devices found

37

Device Control with SSDP Timeout

SSDP response delayed

Retry or timeout handled

38

Device Control with SSDP Flood

Flood SSDP requests

Device handles load

39

Device Control with SSDP Spoofing

Spoof SSDP response

Spoof detected or ignored

40

Device Control with Secure UPnP

Use secure UPnP (e.g., UPnP IGD v2)

Secure control succeeds

41

Device Control with IPv6

Control device over IPv6

Action succeeds

42

Device Control with NAT Traversal

Control device behind NAT

Action succeeds via IGD

43

Device Control with Port Mapping

Add port mapping via UPnP

Mapping succeeds

44

Device Control with Port Mapping Removal

Remove port mapping

Mapping removed

45

Device Control with Invalid Port Mapping

Add invalid mapping

Error returned

46

Device Control with Device Type Filtering

Filter by device type (e.g., MediaServer)

Only matching devices shown

47

Device Control with Service Type Filtering

Filter by service type

Only matching services shown

48

Device Control with Device Capabilities Query

Query supported actions

Capabilities listed

49

Device Control with Device Reset

Reset device to factory settings

Device resets and rejoins

50

Device Control with Custom Action

Invoke vendor-specific action

Action executes successfully

Service Advertisement - Testcases

S.No

Test Case

Description

Expected Result

1

UPnP Service Discovery

Discover available UPnP services on the network

Services are listed successfully

2

UPnP Device Advertisement

Advertise device presence using UPnP

Device appears in network browser

3

UPnP Service Advertisement

Advertise service availability

Service is discoverable by other devices

4

SSDP Alive Message Transmission

Send SSDP alive message periodically

Alive message received by control point

5

SSDP ByeBye Message Transmission

Send SSDP byebye message on shutdown

Device/service removed from list

6

UPnP Device Description Retrieval

Retrieve device description XML

XML retrieved and parsed successfully

7

UPnP Service Description Retrieval

Retrieve service description XML

XML retrieved and parsed successfully

8

UPnP Advertisement Interval Check

Verify advertisement interval compliance

Interval matches UPnP specification

9

UPnP Advertisement on IP Change

Re-advertise service after IP address change

Service re-advertised correctly

10

UPnP Advertisement on Reboot

Advertise service after device reboot

Service advertised successfully

11

UPnP Advertisement with TTL

Advertise with correct Time-To-Live (TTL) value

TTL value respected

12

UPnP Advertisement on Network Join

Advertise service when joining a new network

Service visible on new network

13

UPnP Advertisement on Interface Up

Advertise when network interface becomes active

Advertisement sent

14

UPnP Advertisement on Interface Down

Stop advertisement when interface goes down

Advertisement stopped

15

UPnP Advertisement with Multiple NICs

Advertise on all active network interfaces

Services visible on all interfaces

16

UPnP Advertisement with IPv6

Advertise using IPv6 multicast

Advertisement received over IPv6

17

UPnP Advertisement with IPv4

Advertise using IPv4 multicast

Advertisement received over IPv4

18

UPnP Advertisement Security Check

Ensure no sensitive data in advertisements

Advertisement sanitized

19

UPnP Advertisement Rate Limiting

Prevent flooding of advertisements

Rate limiting enforced

20

UPnP Advertisement Logging

Log all advertisement events

Logs generated correctly

21

UPnP Advertisement on NAT

Advertise service behind NAT

Service discoverable via NAT traversal

22

UPnP Advertisement with Firewall Enabled

Advertise with firewall rules in place

Advertisement not blocked

23

UPnP Advertisement with Custom Port

Advertise using non-default port

Service still discoverable

24

UPnP Advertisement with Invalid XML

Send malformed device/service description

Error handled gracefully

25

UPnP Advertisement with Large Payload

Advertise with large description payload

Advertisement processed correctly

26

UPnP Advertisement with Multiple Services

Advertise multiple services from one device

All services listed

27

UPnP Advertisement with Device Hierarchy

Advertise device with embedded devices

Hierarchy parsed correctly

28

UPnP Advertisement with Dynamic IP

Handle IP address change during session

Advertisement updated

29

UPnP Advertisement with Duplicate UUID

Advertise with duplicate UUID

Conflict detected

30

UPnP Advertisement with Invalid UUID

Advertise with malformed UUID

Advertisement rejected

31

UPnP Advertisement with Expired TTL

TTL expires without refresh

Service removed from list

32

UPnP Advertisement with SSDP Flood

Send excessive SSDP messages

Flood detected and mitigated

33

UPnP Advertisement with SSDP Multicast

Use correct multicast address for SSDP

Advertisement received

34

UPnP Advertisement with SSDP Unicast

Send SSDP response via unicast

Response received correctly

35

UPnP Advertisement with Device Removal

Remove device and send byebye message

Device removed from control point

36

UPnP Advertisement with Service Removal

Remove service and send byebye message

Service removed from control point

37

UPnP Advertisement with Network Congestion

Advertise under high network load

Advertisement still received

38

UPnP Advertisement with VLAN

Advertise across VLANs

Advertisement visible across VLANs

39

UPnP Advertisement with VPN

Advertise over VPN

Advertisement received over VPN

40

UPnP Advertisement with Proxy

Advertise through proxy

Advertisement forwarded correctly

41

UPnP Advertisement with Device Alias

Advertise with alternate device name

Alias displayed correctly

42

UPnP Advertisement with Service Versioning

Advertise service with version info

Version recognized

43

UPnP Advertisement with Custom Schema

Use custom schema in service description

Schema parsed correctly

44

UPnP Advertisement with HTTP/1.1

Use HTTP/1.1 for description retrieval

Description retrieved

45

UPnP Advertisement with HTTPS

Use HTTPS for secure description retrieval

Secure connection established

46

UPnP Advertisement with Authentication

Require authentication for service access

Authenticated successfully

47

UPnP Advertisement with Access Control

Restrict service visibility based on ACL

Access controlled

48

UPnP Advertisement with Device Grouping

Group devices under a single advertisement

Grouping displayed correctly

49

UPnP Advertisement with Event Subscriptions

Advertise support for event subscriptions

Subscriptions accepted

50

UPnP Advertisement Compliance Test

Validate against UPnP specification

Advertisement passes compliance checks

Event Notification - Testcases

S.No

Test Case

Description

Expected Result

1

Event Subscription Request

Subscribe to a devices service events

Subscription accepted

2

Event Notification Delivery

Receive notification on state change

Notification received

3

Event Notification Format

Validate XML format of notification

Format is correct

4

Event Notification with Multiple Variables

Notify multiple state changes

All changes included

5

Event Notification with No Change

No state change occurs

No notification sent

6

Event Notification with Invalid Callback URL

Use invalid callback URL

Subscription fails

7

Event Notification with Expired Subscription

Let subscription expire

No further notifications sent

8

Event Notification Renewal

Renew subscription before expiry

Subscription extended

9

Event Notification Unsubscribe

Unsubscribe from events

Notifications stop

10

Event Notification with Network Delay

Simulate delay in delivery

Notification eventually received

11

Event Notification with Packet Loss

Simulate packet loss

Notification may be missed

12

Event Notification Retry

Retry sending failed notification

Retry succeeds

13

Event Notification with Malformed XML

Send malformed event message

Client rejects message

14

Event Notification with Invalid SID

Use invalid subscription ID

Notification rejected

15

Event Notification with Multiple Subscribers

Notify multiple clients

All receive notifications

16

Event Notification with Concurrent Events

Trigger multiple events simultaneously

All notifications sent

17

Event Notification Logging

Log all event notifications

Logs generated

18

Event Notification with Device Reboot

Reboot device mid-subscription

Subscription re-established

19

Event Notification with Control Point Reboot

Reboot client

Re-subscription required

20

Event Notification with Service Removal

Remove service during subscription

Subscription terminated

21

Event Notification with Service Restart

Restart service

Subscription re-established

22

Event Notification with SSDP Re-Discovery

Rediscover device after reboot

Subscription re-initiated

23

Event Notification with Secure Callback

Use HTTPS callback URL

Notification delivered securely

24

Event Notification with Unauthorized Callback

Use unauthorized URL

Subscription denied

25

Event Notification with Event Filtering

Subscribe to specific events

Only selected events received

26

Event Notification with Event Throttling

Limit frequency of notifications

Throttling enforced

27

Event Notification with Event Aggregation

Aggregate multiple changes

Single notification sent

28

Event Notification with Event Burst

Trigger rapid state changes

All notifications handled

29

Event Notification with Device Group

Notify from grouped devices

Notifications received from all

30

Event Notification with Device Offline

Device goes offline

Subscription fails or ends

31

Event Notification with Device Rename

Rename device

Subscription remains valid

32

Event Notification with Device IP Change

Change device IP

Subscription re-established

33

Event Notification with IPv6

Use IPv6 for notifications

Notification received

34

Event Notification with NAT Traversal

Notify through NAT

Notification received

35

Event Notification with Firewall

Notify through firewall

Notification received or blocked

36

Event Notification with Event History

Retrieve past events

History available (if supported)

37

Event Notification with Event Acknowledgment

Acknowledge receipt

Acknowledgment processed

38

Event Notification with Event Priority

Prioritize critical events

High-priority events delivered first

39

Event Notification with Event Compression

Compress event payload

Notification received and decompressed

40

Event Notification with Event Encryption

Encrypt event data

Notification decrypted successfully

41

Event Notification with Event Signing

Sign event messages

Signature verified

42

Event Notification with Event Replay Protection

Prevent replayed events

Duplicate ignored

43

Event Notification with Event Timestamp

Include timestamp in event

Timestamp validated

44

Event Notification with Event Sequence Number

Include sequence number

Order verified

45

Event Notification with Event Loss Detection

Detect missed events

Client requests resync

46

Event Notification with Event Recovery

Recover from missed events

State re-synced

47

Event Notification with Event Subscription Timeout

Let subscription expire without renewal

Subscription ends

48

Event Notification with Event Subscription Refresh

Refresh subscription periodically

Subscription maintained

49

Event Notification with Event Subscription Conflict

Handle duplicate subscriptions

Conflict resolved

50

Event Notification with Event Subscription Limit

Exceed max subscriptions

New subscription denied

Content Sharing - Testcases

S.No

Test Case

Description

Expected Result

1

Media Server Discovery

Discover UPnP media servers

Servers are listed

2

Media Renderer Discovery

Discover UPnP media renderers

Renderers are listed

3

Content Directory Browsing

Browse shared content (audio/video/images)

Content is displayed

4

Content Metadata Retrieval

Retrieve metadata (title, artist, etc.)

Metadata is accurate

5

Content Streaming

Stream media from server to renderer

Playback starts successfully

6

Content Pause/Resume

Pause and resume playback

Playback resumes correctly

7

Content Stop

Stop media playback

Playback stops

8

Content Seek

Seek to a specific timestamp

Playback jumps to correct position

9

Content Format Support

Play various media formats (MP4, MP3, etc.)

Supported formats play correctly

10

Unsupported Format Handling

Attempt to play unsupported format

Error or fallback occurs

11

Content Sharing with Permissions

Share content with access control

Only authorized users access content

12

Content Sharing without Permissions

Share content openly

All users can access

13

Content Sharing with Large Files

Share large media files

Playback is smooth

14

Content Sharing with Network Delay

Simulate latency

Playback buffers or adjusts

15

Content Sharing with Packet Loss

Simulate packet loss

Playback retries or degrades gracefully

16

Content Sharing with Multiple Clients

Stream to multiple devices

All clients receive stream

17

Content Sharing with Concurrent Streams

Stream different content to different devices

Streams handled correctly

18

Content Sharing with Mobile Device

Share content from mobile

Content is accessible

19

Content Sharing with Smart TV

Stream to smart TV

Playback succeeds

20

Content Sharing with PC

Stream from PC to other devices

Playback succeeds

21

Content Sharing with NAS

Share content from network storage

Content is accessible

22

Content Sharing with DLNA Devices

Interoperate with DLNA-certified devices

Content shared successfully

23

Content Sharing with Device Reboot

Reboot server mid-stream

Stream resumes or reconnects

24

Content Sharing with Device Disconnect

Disconnect renderer mid-stream

Stream stops gracefully

25

Content Sharing with Device Reconnect

Reconnect renderer

Stream resumes

26

Content Sharing with Device Rename

Rename device

Device still discoverable

27

Content Sharing with Device IP Change

Change IP address

Device rediscovered

28

Content Sharing with SSDP Discovery

Discover devices via SSDP

Devices listed

29

Content Sharing with SSDP Timeout

Delay SSDP response

Discovery retries or fails

30

Content Sharing with SSDP Flood

Flood network with SSDP

Devices handle load

31

Content Sharing with Secure Sharing

Use HTTPS or encryption

Content shared securely

32

Content Sharing with Logging

Log sharing activity

Logs generated

33

Content Sharing with Audit Trail

Track content access

Access recorded

34

Content Sharing with Parental Controls

Restrict access to certain content

Restrictions enforced

35

Content Sharing with Content Filtering

Filter by type/genre

Only matching content shown

36

Content Sharing with Search

Search for specific content

Results returned accurately

37

Content Sharing with Thumbnails

Display media thumbnails

Thumbnails load correctly

38

Content Sharing with Subtitles

Stream content with subtitles

Subtitles displayed

39

Content Sharing with Playlist Support

Play content in sequence

Playlist plays correctly

40

Content Sharing with Repeat/Shuffle

Enable repeat or shuffle

Playback follows mode

41

Content Sharing with Album Art

Display album art

Art shown correctly

42

Content Sharing with Metadata Editing

Edit content metadata

Changes reflected

43

Content Sharing with Content Upload

Upload new content to server

Content becomes available

44

Content Sharing with Content Deletion

Delete shared content

Content removed from list

45

Content Sharing with Content Update

Update existing content

Changes reflected

46

Content Sharing with Bandwidth Limiting

Limit stream bandwidth

Playback adapts

47

Content Sharing with QoS

Prioritize media traffic

Stream quality maintained

48

Content Sharing with Event Notification

Notify on new content

Notification received

49

Content Sharing with Device Grouping

Share content to grouped devices

All devices play content

50

Content Sharing with Scheduled Playback

Schedule content to play at a time

Playback starts on schedule

Port Mapping - Testcases

S.No

Test Case

Description

Expected Result

1

Add Port Mapping

Add a new port mapping via UPnP IGD

Port mapping added successfully

2

Delete Port Mapping

Remove an existing port mapping

Port mapping deleted successfully

3

Get Specific Port Mapping Entry

Retrieve details of a specific port mapping

Correct entry returned

4

Get Generic Port Mapping Entry

Retrieve a list of port mappings

List returned successfully

5

Port Mapping with TCP Protocol

Add TCP port mapping

TCP port mapped successfully

6

Port Mapping with UDP Protocol

Add UDP port mapping

UDP port mapped successfully

7

Port Mapping with Invalid Port

Attempt to map an invalid port number

Error returned

8

Port Mapping with Duplicate Entry

Add a mapping that already exists

Duplicate entry rejected

9

Port Mapping with External Host

Add mapping with external host specified

Mapping added with external host

10

Port Mapping with Lease Duration

Add mapping with lease time

Mapping expires after lease duration

11

Port Mapping Renewal

Renew an existing port mapping

Lease extended successfully

12

Port Mapping Expiry

Wait for lease to expire

Mapping removed automatically

13

Port Mapping with Description

Add mapping with a description

Description stored correctly

14

Port Mapping with Max Entries

Add mappings up to device limit

All entries accepted

15

Port Mapping Beyond Limit

Add mapping beyond supported limit

Mapping rejected

16

Port Mapping on Reboot

Check persistence after device reboot

Mapping retained or removed per config

17

Port Mapping with NAT Enabled

Add mapping behind NAT

Mapping works through NAT

18

Port Mapping with Firewall Enabled

Add mapping with firewall active

Mapping allowed through firewall

19

Port Mapping with Invalid Protocol

Use unsupported protocol

Error returned

20

Port Mapping with Reserved Port

Attempt to map a reserved port

Mapping rejected

21

Port Mapping with External Port Conflict

Add mapping with already used external port

Conflict detected

22

Port Mapping with Internal Port Conflict

Add mapping with already used internal port

Conflict handled

23

Port Mapping with Port Range

Add mapping for a range of ports

Range mapped successfully

24

Port Mapping with IPv6

Attempt mapping with IPv6 address

Mapping accepted or rejected

25

Port Mapping with IPv4

Add mapping with IPv4 address

Mapping successful

26

Port Mapping with Invalid IP

Use malformed IP address

Error returned

27

Port Mapping with Loopback Address

Use 127.0.0.1 as internal client

Mapping rejected

28

Port Mapping with Broadcast Address

Use broadcast address

Mapping rejected

29

Port Mapping with Zero Port

Use port 0

Mapping rejected

30

Port Mapping with Max Port Number

Use port 65535

Mapping accepted

31

Port Mapping with Logging Enabled

Enable logging for port mapping

Logs generated

32

Port Mapping with Logging Disabled

Disable logging

No logs generated

33

Port Mapping with Invalid Lease Time

Use negative or zero lease time

Mapping rejected

34

Port Mapping with Long Description

Use long string in description

Description truncated or accepted

35

Port Mapping with Special Characters

Use special characters in description

Characters handled correctly

36

Port Mapping with Device Alias

Use alias instead of IP

Mapping resolved correctly

37

Port Mapping with Hostname

Use hostname instead of IP

Hostname resolved

38

Port Mapping with DNS Resolution

Test DNS resolution for internal client

DNS resolved correctly

39

Port Mapping with Dynamic IP

Internal client has dynamic IP

Mapping updated or fails

40

Port Mapping with Static IP

Internal client has static IP

Mapping successful

41

Port Mapping with Interface Change

Network interface changes

Mapping updated accordingly

42

Port Mapping with Interface Down

Interface goes down

Mapping removed or disabled

43

Port Mapping with Interface Up

Interface comes up

Mapping re-established

44

Port Mapping with Multiple Interfaces

Add mapping on multiple interfaces

Mapping applied to all

45

Port Mapping with VPN

Add mapping over VPN

Mapping successful or blocked

46

Port Mapping with VLAN

Add mapping in VLAN environment

Mapping successful

47

Port Mapping with Proxy

Add mapping through proxy

Mapping behavior verified

48

Port Mapping with UPnP Disabled

Try mapping when UPnP is disabled

Mapping fails

49

Port Mapping with IGD v1

Test with IGD version 1

Mapping successful

50

Port Mapping with IGD v2

Test with IGD version 2

Mapping successful

Standardized Architecture - Testcases

S.No

Test Case

Description

Expected Result

1

Device Description Compliance

Validate device description XML against UPnP schema

XML is valid

2

Service Description Compliance

Validate service description XML

XML is valid

3

SSDP Discovery Compliance

Use SSDP for device/service discovery

Devices/services discovered

4

SOAP Action Format Compliance

Send SOAP requests in standard format

Device processes request

5

GENA Eventing Compliance

Subscribe and receive events using GENA

Events received correctly

6

Device Type Naming Convention

Use standard device type URNs

Device recognized

7

Service Type Naming Convention

Use standard service type URNs

Service recognized

8

Device Hierarchy Structure

Validate root and embedded device structure

Structure is correct

9

Action List Format

Validate action list in service description

Actions listed correctly

10

State Variable Format

Validate state variable definitions

Variables defined correctly

11

Control URL Format

Use standard control URL structure

URL accepted

12

Event Subscription URL Format

Use standard eventSub URL

Subscription succeeds

13

Presentation URL Format

Use valid presentation URL

URL accessible

14

Device UUID Format

Use valid UUID for device

UUID recognized

15

Device Versioning

Use correct versioning in device type

Version accepted

16

Service Versioning

Use correct versioning in service type

Version accepted

17

Device Icon Format

Provide icon in standard format

Icon displayed

18

Device Friendly Name

Use human-readable device name

Name displayed correctly

19

Manufacturer Info Format

Include manufacturer details

Info parsed correctly

20

Model Info Format

Include model name and number

Info parsed correctly

21

URL Base Handling

Use and resolve URLBase correctly

URLs resolved properly

22

Device Control Flow

Follow standard control flow (discovery control)

Flow completes successfully

23

Event Notification Format

Use standard XML for events

Notification accepted

24

Subscription Timeout Handling

Handle subscription timeouts per spec

Timeout enforced

25

Action Argument Direction

Use correct direction (in/out)

Action executes correctly

26

Action Argument Data Types

Use standard UPnP data types

Types validated

27

State Variable SendEvents Attribute

Use correct sendEvents value

Eventing behaves as expected

28

State Variable Default Value

Use valid default values

Defaults applied

29

State Variable Allowed Value List

Use allowedValueList correctly

Validation succeeds

30

State Variable Allowed Value Range

Use allowedValueRange correctly

Validation succeeds

31

Device Control Point Compatibility

Interoperate with standard control points

Control succeeds

32

Device Interoperability

Interoperate with other UPnP devices

Communication succeeds

33

Service Action Execution

Execute standard service actions

Actions succeed

34

Service State Variable Query

Query state variables via control point

Values returned

35

Device Removal Handling

Remove device from network

Control point updates list

36

Device Rejoin Handling

Rejoin device to network

Device rediscovered

37

Device Description Update

Update device description

Changes reflected

38

Service Description Update

Update service description

Changes reflected

39

SSDP ByeBye Message Handling

Handle device departure

Device removed from list

40

SSDP Alive Message Handling

Handle device announcement

Device added to list

41

SSDP MX Value Handling

Respect MX delay in discovery

Responses staggered

42

SSDP Search Target Handling

Use correct ST values

Matching devices respond

43

SSDP USN Format

Use correct USN format

Device identified

44

SOAP Fault Handling

Return standard SOAP faults

Faults parsed correctly

45

GENA Subscription Renewal

Renew event subscription

Subscription extended

46

GENA Unsubscribe Handling

Unsubscribe from events

Events stop

47

GENA Notification Retry

Retry failed notifications

Retry succeeds

48

Device Capability Advertisement

Advertise supported services

Capabilities listed

49

Device Capability Filtering

Filter devices by type/capability

Only matching devices shown

50

Architecture Compliance Test

Run full UPnP architecture compliance test

Device passes all checks

Extensibility - Testcases

S.No

Test Case

Description

Expected Result

1

Add New UPnP Service

Add a new custom UPnP service to a device

Service added and advertised successfully

2

Add New UPnP Device

Add a new device type to the UPnP network

Device recognized and listed

3

Extend Device Description XML

Add new fields to device description

Fields parsed without error

4

Extend Service Description XML

Add new actions/state variables to service description

Extensions accepted

5

Add Vendor-Specific Action

Add a custom action to a standard service

Action executed successfully

6

Add Vendor-Specific State Variable

Add a custom state variable

Variable recognized and updated

7

Extend SSDP Advertisement

Include custom headers in SSDP messages

Headers received and parsed

8

Extend Control URL

Use extended control URL for new services

Control point accesses service successfully

9

Extend Event Subscription URL

Use extended event subscription URL

Subscriptions handled correctly

10

Add New Device Icon

Add custom icon to device description

Icon displayed in control point

11

Add New Device Category

Define a new device category

Category recognized

12

Add New Service Category

Define a new service category

Category recognized

13

Extend UPnP Schema

Use extended XML schema

Schema validated successfully

14

Add Custom Device Capabilities

Add new capabilities to existing device

Capabilities advertised

15

Add Custom Service Capabilities

Add new capabilities to existing service

Capabilities advertised

16

Extend Device Hierarchy

Add embedded devices dynamically

Hierarchy updated and visible

17

Extend Device Lifecycle

Add lifecycle hooks for new device types

Hooks triggered correctly

18

Extend Service Lifecycle

Add lifecycle hooks for new services

Hooks triggered correctly

19

Add New Event Types

Define and trigger new event types

Events received by subscribers

20

Add New Action Parameters

Add extra parameters to existing actions

Parameters handled correctly

21

Add New State Variable Types

Use new data types for state variables

Types parsed and validated

22

Extend UPnP Error Codes

Define custom error codes

Errors handled gracefully

23

Extend UPnP Logging

Add logging for new services

Logs generated correctly

24

Add New Device Templates

Use templates for dynamic device creation

Devices instantiated from templates

25

Add New Service Templates

Use templates for dynamic service creation

Services instantiated from templates

26

Extend Device Discovery

Discover new device types

Devices discovered successfully

27

Extend Service Discovery

Discover new service types

Services discovered successfully

28

Extend Device Control

Control new device types

Control commands executed

29

Extend Service Control

Control new service types

Control commands executed

30

Extend Device Events

Subscribe to events from new device types

Events received

31

Extend Service Events

Subscribe to events from new service types

Events received

32

Add New Device Icons

Add multiple icons for different resolutions

Icons displayed correctly

33

Extend UPnP Version Support

Add support for newer UPnP versions

Version compatibility maintained

34

Extend Device Security

Add security features to new device types

Security features enforced

35

Extend Service Security

Add security features to new service types

Security features enforced

36

Add Device Metadata

Add metadata tags to devices

Metadata displayed in control point

37

Add Service Metadata

Add metadata tags to services

Metadata displayed in control point

38

Extend Device Configuration

Add configuration options to new devices

Configuration applied successfully

39

Extend Service Configuration

Add configuration options to new services

Configuration applied successfully

40

Add Device Update Mechanism

Add OTA update support for new devices

Updates applied successfully

41

Add Service Update Mechanism

Add OTA update support for new services

Updates applied successfully

42

Extend Device Logging

Add logging for new device types

Logs generated

43

Extend Service Logging

Add logging for new service types

Logs generated

44

Add Device Debug Interface

Add debug interface for new devices

Debug info accessible

45

Add Service Debug Interface

Add debug interface for new services

Debug info accessible

46

Extend Device UI

Add UI elements for new device types

UI rendered correctly

47

Extend Service UI

Add UI elements for new service types

UI rendered correctly

48

Add Device Localization

Add multi-language support for new devices

Localized content displayed

49

Add Service Localization

Add multi-language support for new services

Localized content displayed

50

Validate Extensibility Compliance

Validate all extensions against UPnP standards

Extensions pass compliance checks

Cross Platform Support - Testcases

S.No

Test Case

Description

Expected Result

1

UPnP on Windows

Test UPnP functionality on Windows OS

UPnP services discovered and controlled

2

UPnP on macOS

Test UPnP functionality on macOS

UPnP services discovered and controlled

3

UPnP on Linux

Test UPnP functionality on Linux

UPnP services discovered and controlled

4

UPnP on Android

Test UPnP functionality on Android devices

UPnP services discovered and controlled

5

UPnP on iOS

Test UPnP functionality on iOS devices

UPnP services discovered and controlled

6

UPnP on Smart TVs

Test UPnP discovery on smart TVs

Services listed and accessible

7

UPnP on Game Consoles

Test UPnP on PlayStation/Xbox

NAT type open, services accessible

8

UPnP on IoT Devices

Test UPnP on smart home devices

Devices discoverable and manageable

9

UPnP on Routers

Test UPnP port mapping on various routers

Port mappings applied successfully

10

UPnP on Virtual Machines

Test UPnP in VM environments

Services discovered within VM

11

UPnP on Docker Containers

Test UPnP in containerized environments

Services discovered if network allows

12

UPnP on IPv4 Networks

Test UPnP over IPv4

Services discovered and controlled

13

UPnP on IPv6 Networks

Test UPnP over IPv6

Services discovered and controlled

14

UPnP on Dual Stack Networks

Test UPnP on dual stack (IPv4 + IPv6)

Services work on both stacks

15

UPnP on Wi-Fi

Test UPnP over wireless networks

Services discovered wirelessly

16

UPnP on Ethernet

Test UPnP over wired networks

Services discovered over LAN

17

UPnP on Mobile Hotspot

Test UPnP over mobile hotspot

Services discovered if supported

18

UPnP on VPN

Test UPnP over VPN connections

Services may be blocked or tunneled

19

UPnP on VLAN

Test UPnP across VLANs

Services discovered if multicast allowed

20

UPnP on Mesh Networks

Test UPnP in mesh Wi-Fi setups

Services discovered across mesh nodes

21

UPnP on Different OS Versions

Test UPnP on multiple OS versions

Consistent behavior across versions

22

UPnP on Different Hardware Architectures

Test UPnP on ARM, x86, etc.

Services work across architectures

23

UPnP on Different Browsers

Test UPnP web interfaces across browsers

Interfaces render and function correctly

24

UPnP on Different Media Players

Test UPnP streaming on VLC, Kodi, etc.

Media streams successfully

25

UPnP on NAS Devices

Test UPnP on network-attached storage

NAS services discoverable

26

UPnP on Printers

Test UPnP discovery of network printers

Printers listed and accessible

27

UPnP on Smart Speakers

Test UPnP on Alexa, Google Home, etc.

Devices discoverable and controllable

28

UPnP on Surveillance Systems

Test UPnP on IP cameras

Cameras discoverable and streamable

29

UPnP on Media Servers

Test UPnP on DLNA/UPnP media servers

Content browsable and playable

30

UPnP on Home Automation Hubs

Test UPnP on hubs like SmartThings, Home Assistant

Devices integrated successfully

31

UPnP on Cloud-Connected Devices

Test UPnP on devices with cloud sync

Local discovery works independently

32

UPnP on Guest Networks

Test UPnP on isolated guest networks

Services not discoverable (as expected)

33

UPnP on Public Networks

Test UPnP on public Wi-Fi

Services not discoverable (as expected)

34

UPnP on Enterprise Networks

Test UPnP in corporate environments

Services blocked or restricted

35

UPnP on Home Networks

Test UPnP in typical home setups

Services discovered and controlled

36

UPnP on Mixed OS Environments

Test UPnP across Windows, macOS, Linux simultaneously

Cross-platform discovery works

37

UPnP on Multilingual Systems

Test UPnP UI in different languages

UI displays correctly

38

UPnP on Accessibility Tools

Test UPnP UI with screen readers

Accessible interface

39

UPnP on Battery-Powered Devices

Test UPnP on mobile/tablet devices

Services discovered with power optimization

40

UPnP on Devices with Limited Resources

Test UPnP on low-memory/CPU devices

Services function with minimal overhead

41

UPnP on Devices with Custom Firmware

Test UPnP on OpenWRT, DD-WRT, etc.

Services discovered and managed

42

UPnP on Devices with Manufacturer Firmware

Test UPnP on stock firmware

Services behave as expected

43

UPnP on Devices with Security Software

Test UPnP with antivirus/firewall enabled

Services not blocked

44

UPnP on Devices with Parental Controls

Test UPnP with content filtering

Services filtered or allowed per policy

45

UPnP on Devices with Multiple NICs

Test UPnP on devices with multiple network interfaces

Services advertised on all interfaces

46

UPnP on Devices with Bridged Networks

Test UPnP on bridged network setups

Services discovered across bridges

47

UPnP on Devices with NAT

Test UPnP port mapping behind NAT

Mapping successful

48

UPnP on Devices with Static IP

Test UPnP with static IP configuration

Services advertised correctly

49

UPnP on Devices with Dynamic IP

Test UPnP with DHCP-assigned IP

Services updated dynamically

50

UPnP Cross-Platform Compliance Check

Validate UPnP behavior across all platforms

Consistent and compliant behavior

  • Reference links