Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to program uPnP?

Status
Not open for further replies.

swim

Programmer
Jul 1, 2002
22
US
Hi,

Can I program via uPnP to find any machine's IP and port on my local net which supports uPnP?

Thanks advanced.

 
of course you can.

all you need to do is do a UDP multicast to address 239.255.255.250 on port 1900.

you can use Indy scoket components to achieve this.
to know more about uPnp look here:


Cheers,
Daddy


-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
I used UDP multicast to address 239.255.255.250 on port 1900 and sent the string as:

tmpstr:='M-SEARCH * HTTP/1.1'#13#10
+'HOST: 239.255.255.250:1900'#13#10
+'MAN: "ssdp:discover"'#13#10
+'MX: 3'#13#10
+'ST: upnp:rootdevice'#13#10#13#10;
UDPClient.Send(tmpStr);

But I didn't receive any reply via UDPServer.UDPRead. My UDP Server listen at 1900.

Any help?
 
2 questions, do you have uPnp devices in your network? if so, how are they connected? (hub, switch,...) in case of managed switches, is multicast allowed?...

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Oh, yes. I used Plug-and-Play Tester( and got:

Description: High Speed USB Print Server
DeviceType: urn:schemas-upnp-org:device:printServer:1
FriendlyName: Print Server PS-22E21D
Manufacturer: D-Link
ManufacturerUrl: ModelName: DP-301U
ModelNumber: 2.10 (2006-03-24)
ModelURL: PresentationUrl: SerialNumber:
UDN: uuid:001B1122E21D-0
UPC:

Multicast allowed.
 
Thanks for whosrdaddy, I'll try it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top