problems ssdp advertisement

Moderator: Praktikum: Internet

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

problems ssdp advertisement

Beitrag von ojerag » 16. Jan 2008 13:23

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 !!! :shock: . 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?
Thanks

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

Re: problems ssdp advertisement

Beitrag von fernando » 16. Jan 2008 16:00

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
CACHE-CONTROL: max-age = seconds until advertisement expires
LOCATION: URL for UPnP description for root device
NT: search target
NTS: ssdp:alive
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):
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

Antworten

Zurück zu „Praktikum: Internet“