问题
I`m looking into UPnP with the help of the generated stack for java/android created with the device builder with came with the UPnP tools from intel. to make an android application that is the control point in the UPnP system.
source of tools: http://opentools.homeip.net/dev-tools-for-upnp
To help me understand the principle of these tools I created a network light and generated the stack for android. But i can`t seem to work out how to turn on and off the networklight.
can someone give my a suggestion? I almost cannot find any references online for this project.
any help is appreciated
回答1:
Does it mean that your network light is already running? Do you see the light bulb on your Android? Is your Android connected to a private local network? Your WiFi perhaps. UPnP is meant to be used on local trusted networks (no security included per design).
If so, then access the same network as Android is connected to with DeviceSpy from the mentioned toolset, and look for device "Network Light" of type DimmableLight. Complete description of what can be done with it is found at http://upnp.org/resources/upnpresources.zip and there
standardizeddcps/Lighting Controls_1/UPnP-ha-DimmableLight-v1-Device*.pdf
DeviceSpy exposes all interfaces and state variables, which you can inspect, call and modify. Under the hood there is no rocket science, plain old SOAP over HTTP with some extended headers and salted with multicast. So to drive the Network Light yourself, you need to write a Control Point. I guess that the dev tool in question can generate that stack for you as well. Or use some standalone libs which i won't reiterate here.
来源:https://stackoverflow.com/questions/10755083/upnp-intel-generate-stack-java-android-invoking-actions-on-network-light-sam