⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 use_upnp_library.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>  <title></title>  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><div class="toc"><div class="tocheader toctoggle" id="toc__header">Table of Contents</div><div id="toc__inside"><ul class="toc"><li class="level1"><div class="li"><span class="li"><a href="#using_upnp_library" class="toc">Using UPNP Library</a></span></div><ul class="toc"><li class="level2"><div class="li"><span class="li"><a href="#build_the_library" class="toc">Build the Library</a></span></div></li><li class="level2"><div class="li"><span class="li"><a href="#run_upnp_samples" class="toc">Run UPNP Samples</a></span></div></li></ul></li></ul></div></div><h1><a name="using_upnp_library" id="using_upnp_library">Using UPNP Library</a></h1><div class="level1"><p> The home website of linux UPNP <acronym title="Software Development Kit">SDK</acronym>: &ldquo;<a href="http://upnp.sourceforge.net/" class="urlextern" title="http://upnp.sourceforge.net/"  rel="nofollow">libupng</a>&rdquo; released v1.3.1 in Mar-2006. And there is a post on the website, saying:</p><p>&ldquo;As of 2005-2006, the original developers did not have the time to work on libupnp any more and nobody expressed interest in taking over development of the main project. As a result, Michael Pfeiffer forked a new project, pupnp, where he has pledged to continue active development. This page is being left up for historical reference and in case there is ever a desire to return to the pre-fork code. In the meantime, we encourage those seeking a more current version of the library to go to the pupnp project.&rdquo;</p><p>The latest release from pupnp (<a href="http://www.virtualworlds.de/upnp/" class="urlextern" title="http://www.virtualworlds.de/upnp/"  rel="nofollow">http://www.virtualworlds.de/upnp/</a>) has update the library to v1.4.0.</p><p>We port and test libupnp-1.4.0 on Blackfin uClinux. </p></div><!-- SECTION [1-855] --><h2><a name="build_the_library" id="build_the_library">Build the Library</a></h2><div class="level2"><p> To build the libupnp-1.4.0 for Blackfin uClinux, just select &ldquo;Library Configuration&rdquo; &rarr; &ldquo;libupnp&rdquo;. </p><ul><li class="level1"><div class="li"> By default the Makefile will build the library and sample code as static library. The library is built as libupnp.a. The test samples are built as Binary Flat format:&rdquo;upnp_tv_device&rdquo; and &ldquo;upnp_tv_ctrlrpt&rdquo; .</div></li></ul><ul><li class="level1"><div class="li"> Build libupnp for Bfin uClinux ELF shared library is not tested yet. You will need to enable the kernel support ELF shared library first. </div></li></ul></div><!-- SECTION [856-1342] --><h2><a name="run_upnp_samples" id="run_upnp_samples">Run UPNP Samples</a></h2><div class="level2"><ul><li class="level1"><div class="li"> Download &ldquo;upnp_tv_device&rdquo; to target board</div></li></ul><ul><li class="level1"><div class="li"> On target, initialize UPNP - enable multicast : <pre class="code">root:~&gt; route add -net 239.0.0.0 netmask 255.0.0.0 eth0</pre></div></li></ul><ul><li class="level1"><div class="li"> Start &ldquo;upnp_tv_device&rdquo; on target </div><ul><li class="level2"><div class="li"> <pre class="code">root:~&gt; cd /root:~&gt; mkdir web </pre></div></li><li class="level2"><div class="li"> Copy all the files in $(LIBUPNP)/upnp/sample/tvdevice/web/* to target: /web/</div></li><li class="level2"><div class="li"> <pre class="code"> root:~&gt; ./upnp_tv_deviceInitializing UPnP Sdk with         ipaddress = (null) port = 0UPnP Initialized         ipaddress= 10.99.22.124 port = 49152Specifying the webserver root directory -- ./webRegistering the RootDevice         with desc_doc_url: http://10.99.22.124:49152/tvdevicedesc.xmlRootDevice RegisteredInitializing State TableFound service: urn:schemas-upnp-org:service:tvcontrol:1serviceId: urn:upnp-org:serviceId:tvcontrol1Found service: urn:schemas-upnp-org:service:tvpicture:1serviceId: urn:upnp-org:serviceId:tvpicture1State Table InitializedAdvertisements Sent</pre></div></li></ul></li></ul><ul><li class="level1"><div class="li"> On host or another board, start &ldquo;upnp_tv_ctrlrpt&rdquo;. It should receive the advertisements from upnp_tv_device. You can type &ldquo;Help&rdquo; to see other commands. <pre class="code">host# ./upnp_tv_ctrlrpt======================================================================----------------------------------------------------------------------UPNP_DISCOVERY_ADVERTISEMENT_ALIVEErrCode     =  0Expires     =  100DeviceId    =  uuid:Upnp-TVEmulator-1_0-1234567890001DeviceType  =ServiceType =  urn:schemas-upnp-org:service:tvpicture:1ServiceVer  =Location    =  http://10.99.22.124:49152/tvdevicedesc.xmlOS          =  Linux/2.6.16.11.ADI-2006R1blackfin, UPnP/1.0, Intel SDK for UPnP devices/1.4.0Ext         =----------------------------------------------------------------------======================================================================Found Tv deviceTvCtrlPointPrintList:   1 -- uuid:Upnp-TVEmulator-1_0-1234567890001</pre></div></li></ul></div><!-- SECTION [1343-] --></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -