Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titlexUPnP Device Information in JSON forat
{
 "sno":"PAD200067027",
 "isgateway":"yes",
 "gatewayip":"169.254.106.182",
 "gatewayipv6":"null",
 "hostMacAddress":"84:e0:58:57:73:55",
 "gatewayStbIP":"69.247.111.43",
 "ipv6Prefix":"null",
 "deviceName":"null",
 "bcastMacAddress":"84:e0:58:57:73:59",
 "recvDevType":"X1",
 "buildVersion":"66.77.33p44d5_EXP",
 "timezone":"US/Eastern",
 "rawoffset":"-18000000",
 "dstoffset":"60",
 "dstsavings":"3600000",
 "usesdaylighttime":"yes",
 "baseStreamingUrl":"http://127.0.0.1:8080/videoStreamInit?recorderId=P0118154760",
 "requiresTRM":"true",
 "baseTrmUrl":"ws://127.0.0.1:9988",
 "playbackUrl":"http://127.0.0.1:8080/hnStreamStart?deviceId=P0118154760&DTCP1HOST=127.0.0.1&DTCP1PORT=5000",
 "dnsconfig":"search hsd.tvx.comcast.net;nameserver 75.75.75.75;nameserver 75.75.76.76;nameserver 69.252.80.80;",
 "hosts":"69.247.111.43 pacexg1v3;",
 "systemids":"channelMapId:1901;controllerId:3415;plantId:0;vodServerId:70001",
 "receiverid":"P0118154760"}

...

  • Read the xupnp configuration details from configuration file.
  • Getting the input for different gateway to populate all the service veriables.
  • It act like a server & whenever requested it will give the services details such as ipv6 ip address, receiver Id, etc.
  • Once the xcal-device receive the services details, it will create a UPnP object and start publishing the UPnP data.
XU
PnP Overview:
XUPnP is an implementation of the generic GUPnP framework for device discovery and using services from control points. GUPnP is a library for implementing both UPnP clients and services using GObject and LibSoup. It allows for fully asynchronous use without using threads and so cleanly integrates naturally into daemons, and supports all of the UPnP features. The GUPnP framework consists of the following libraries:
  • GSSDP implements resource discovery and announcement over SSDP.
  • GUPnP implements the UPnP specification: 
    • Resource announcement and discovery.
    • Description.
    • Control.
    • Event notification.
    • Presentation (GUPnP includes basic web server functionality through libsoup).
Procedure involving in implementation of the GUPnP Client:
  • Finding Services: Initialize GUPnP and create a control point targeting the service type. Then we connect a signal handler so that we are notified when services we are interested in are found. 
  • Invoking Actions: GUPnP has a set of methods to invoke actions where you pass a NULL-terminated varargs list of (name, GType, value) tuples for the in-arguments, then a NULL-terminated varargs list of (name, GType, return location) tuples for the out-arguments. 
  • Subscribing to state variable change notifications: It is possible to get change notifications for the service state variables that have attribute sendEvents="yes".

...