|
mUPnP for Objective-C
|
mUPnP for C is a development package for UPnP™ [^1] (Universal Plug and Play) developers. It provides a set of APIs to create UPnP™ devices and control points quickly and easily. This README file provides an overview of the package, its contents, and instructions on how to set up and use it.
The UPnP™ architecture is designed to enable the discovery and control of networked devices and services, such as media servers and players, within a home network. UPnP™ is based on several standard protocols, including GENA, SSDP, SOAP, HTTPU, and HTTP. To create UPnP™ devices, you need to understand and implement these protocols.

mUPnP for C simplifies this process by handling these protocols automatically. It allows developers to focus on creating their devices and control points without worrying about the underlying protocol details.
mUPnP for C runs on Unix-like systems, macOS/iOS, Windows, and, since 3.1.0, on ESP32 microcontrollers as an ESP-IDF component.
mupnp_net_setipv6enabled(true).dataType and defaultValue in C and Objective-C.make distcheck passes, and CMake options (now MUPNP_*) take effect.See the [ChangeLog](ChangeLog) for details, including a struct change in mUpnpSocket that requires rebuilding dependent code.
bool handling from C++, and Xcode 27 project fixes.See the [ChangeLog](ChangeLog) for details, including one API change: mupnp_xml_attributelist_set() now returns bool.
mUPnP for C is supported from IPA, INFORMATION-TECHNOLOGY PROMOTION AGENCY, JAPAN, as a project of Mitoh Program 2004.
To build the library and samples, you need to have the following tools installed on your system:
mUPnP for C is distributed as an Automake project, and so you can install the libary from the source codes with the following commands:
For platforms that support Homebrew, you can easily install using the following brew commands:
For MacOSX, I have released a wrapper class for Objective-C on Cocoa. Currently, the framework supports only basic functions of the control point. Please use the standard C library if you need to use all functions of mUPnP for C.
The bundled Xcode projects build with Xcode 27 and target macOS 12.0 / iOS 15.0 or later.
The repository can be used directly as an ESP-IDF component with Espressif's managed Expat dependency. The port targets ESP32 with one active Wi-Fi station interface and IPv4; the build baseline is ESP-IDF v5.5.5 (>=5.5,<6.0).
To try the Wi-Fi control-point example:
To use mUPnP in your own application, place this repository at <project>/components/mupnp (for example, as a Git submodule pinned to the 3.1.1 tag), add REQUIRES mupnp to your component, and include <mupnp/upnp.h>.
Limited control-point hardware testing on an ESP32 DevKitC-VE is reported. Device hosting, other ESP32-family targets, IPv6, Ethernet, and long-duration operation have not been validated yet. See the ESP-IDF guide for required sdkconfig settings, lifetime and memory notes, and a hardware validation checklist.
For Windows platforms, mUPnP includes platform projects for Visual Studio 2005. Please check the platform directories, mupnp/*/win32/vs2005, to use the projects. On WindowsCE, mUPnP does not have platform projects, but a contributor has verified that the source codes compile normally.
To develop UPnP devices or control point applications using mUPnP for C, please check the following developer's documentation.
mUPnP for C releases the wrapper library for Objective-C to use the UPnP library on iOS and MacOSX platforms too. Please check the following developer's documentation to know the wrapper library in more detail.
mUPnP for C is used in a variety of consumer products. While not exhaustive, the following is a list of notable implementations.
Nokia engineers contributed to the improvement of the initial mUPnP for C release. Nokia developed the UPnP/AV Control Point application, Media Streamer, for the Nokia 770 Internet Tablet. The application is based on mUPnP for C, incorporating custom patches by Nokia.

The VIERA Remote is a TV remote control app for Panasonic VIERA TVs (plasma and LCD models). It allows users to control channels, switch inputs, and adjust the volume directly from an iPhone, iPod touch, or iPad (iOS 4.2 or later). mUPnP for C functions as the UPnP framework for this app.

REGZA is Toshiba’s former AV equipment brand. mUPnP for C is embedded in REGZA televisions, enabling seamless media streaming and connectivity.

[^1]: UPnP™ is a certification mark of the UPnP™ Implementers Corporation.