Moderator: Praktikum: Internet

ojerag
Neuling
Beiträge: 9
Registriert: 15. Mai 2007 13:54
Wohnort: mannheim

Hallo,
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
Thanks

fernando
Erstie
Beiträge: 17
Registriert: 6. Okt 2006 10:10

Hi,

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
HOST: 239.255.255.250:1900
LOCATION: URL for UPnP description for root device
NT: search target
NTS: ssdp:alive
SERVER: OS/version UPnP/1.0 product/version

And the first msg you need to send is (See table in page 13):
NT: upnp:rootdevice
USN: uuid:device-UUID::upnp:rootdevice

So a concrete 1st msg you need to send would look like this:

Code: Alles auswählen

NOTIFY * HTTP/1.1
HOST: 239.255.255.250: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
Finally, how to generate the UUIDs: http://www.uddi.org/pubs/draft-leach-uuids-guids-01.txt