Moderator: Praktikum: Internet
i have actually applied the ssdp protocal as stated on the document but while compiling
my program i realise i always recieve a Nullpointer error !!! . At this Point i can not
trace where the error might be comming from.
i'm i suppose to define a url for the control point ?
what values i'm i allowed to used for the NT: and USN; fields
of the advertisement?
I don't think SSDP has anything to do with your null pointer error. Actually, I am sure it has nothing to do with it . So, you'll have to check your code...
Regarding the NT and USN fields: check page 13 of the UPNP device architecture, where it explains the Notify ssdp:alive. There you can see the structure of the 3+2d+k messages that you need to send.
For instance, in the spec (pag. 15) it says:
NOTIFY * HTTP/1.1
CACHE-CONTROL: max-age = seconds until advertisement expires
LOCATION: URL for UPnP description for root device
NT: search target
SERVER: OS/version UPnP/1.0 product/version
USN: advertisement UUID
And the first msg you need to send is (See table in page 13):
So a concrete 1st msg you need to send would look like this:
Code: Alles auswählen
NOTIFY * HTTP/1.1 HOST: 22.214.171.124:1900 CACHE-CONTROL: max-age = 1800 LOCATION: http://10.0.0.13:5432/myDeviceDescription.xml NT: upnp:rootdevice NTS: ssdp:alive SERVER: Linux/2.6.1 UPnP/1.0 myDevice/1.0 USN: uuid:my_upnpdev-1_0-123456789001::upnp:rootdevice