Page 1 of 1

if you have a upnp router...

Posted: Sun Jun 08, 2008 2:35 pm
by lexvictory
i would like you to test some code (as i only have a dlink router)
obviously you must be using a router, and have upnp enabled

download http://demonioardente.us.to/pbstuff/upnp.pbi
and http://demonioardente.us.to/pbstuff/discover.pb

run discover.pb and post your copied debug output (please)

the code:
  • searches for devices
    looks for the xml description file for the type needed
    loads the description file to get the 'control uri'
    then sends a request to the router to see if nat is enabled
if it fails, u may need to post the content of you descriptionurl link (load it in internet browser)


thank u for any help!

Posted: Sun Jun 08, 2008 4:10 pm
by Derek
Well, I got this, whatever all this means. :?
start search
got 28 device responses
http://***.***.***.***:49152/gateway.xml
/upnp/control/WANEthLinkC1
POST /upnp/control/WANIPConn1 HTTP/1.1
HOST: ***.***.***.***:49152
CONTENT-LENGTH: 307
CONTENT-TYPE: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#GetNATRSIPStatus"

<?xml version="1.0"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetNATRSIPStatus xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
</u:GetNATRSIPStatus>
</s:Body>
</s:Envelope>
HTTP/1.1 200 OK
CONTENT-LENGTH: 344
CONTENT-TYPE: text/xml; charset="utf-8"
DATE: Sun, 08 Jun 2008 15:07:46 GMT
EXT:
SERVER: Linux/2.4.20, UPnP/1.0, Intel SDK for UPnP devices /1.2

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body>
<u:GetNATRSIPStatusResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
<NewRSIPAvailable>0</NewRSIPAvailable>
<NewNATEnabled>1</NewNATEnabled>
</u:GetNATRSIPStatusResponse>
</s:Body> </s:Envelope>

Posted: Sun Jun 08, 2008 10:44 pm
by DoubleDutch
I got this:
start search
got 7 device responses

unable to open http connection to get info xml

some info not right

Posted: Mon Jun 09, 2008 9:01 am
by lexvictory
Derek wrote:Well, I got this, whatever all this means. :?
it means it works with your router :)

@DoubleDutch: can u pls redownload upnp.pbi and post what comes up (it will debug a lot more than the first time). what brand of router do you have?

Posted: Mon Jun 09, 2008 10:56 am
by DoubleDutch
start search
got ST: upnp:rootdevice
got ST: uuid:6c63a1a2-f53d-4c5f-87fa-00507fc0ff2c
got ST:upnp:rootdevice
got ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
got ST:uuid:UPnP_SpeedTouch536-1_00-19-7F-AB-98-23
got ST: urn:schemas-microsoft-com:service:OSInfo:1
got ST:urn:schemas-upnp-org:device:InternetGatewayDevice:1
got ST: uuid:68983afd-4ebf-417e-9e67-92a99a6ad8aa
got ST: urn:schemas-upnp-org:device:WANDevice:1
got ST:uuid:UPnP_SpeedTouch536-1_00-19-7F-AB-98-23_WD
got ST: urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1
got ST:urn:schemas-upnp-org:device:WANDevice:1
got ST: uuid:6693ddfb-5a38-4946-878c-8525638e9805
got ST:urn:schemas-upnp-org:service:Layer3Forwarding:1
got ST: urn:schemas-upnp-org:device:WANConnectionDevice:1
got ST:urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1
got ST: urn:schemas-upnp-org:service:WANPOTSLinkConfig:1
got ST: urn:schemas-upnp-org:service:WANPPPConnection:1
got 18 device responses

unable to open http connection to get info xml

some info not right
Note: I've changed some of the UUID info and Mac no to protect my system.

I have a Speedtouch modem (I use DMT to increase adsl speeds over normal), a draytek router and a linksys router (reflashed with WRT).

Posted: Mon Jun 09, 2008 12:26 pm
by lexvictory
both files reuploaded (now it searches for the InternetGatewayDevice one)

@derek: if you're still watching the topic, can u pls retest?


anyone else wanna test?

Posted: Mon Jun 09, 2008 12:57 pm
by Derek
I'll retest later, not at home at the moment.

Posted: Mon Jun 09, 2008 7:31 pm
by Derek
start search
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: upnp:rootdevice
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: upnp:rootdevice
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:**********************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:**********************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:Layer3Forwarding:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:Layer3Forwarding:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:************************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:************************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:WANDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:WANDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:************************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:************************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:WANConnectionDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:WANConnectionDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:WANEthernetLinkConfig:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:WANEthernetLinkConfig:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:WANIPConnection:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:WANIPConnection:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:************************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: uuid:************************************
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:LANDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:device:LANDevice:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:LANHostConfigManagement:1
LOCATION: http://192.168.1.1:49152/gateway.xml
got ST: urn:schemas-upnp-org:service:LANHostConfigManagement:1
got 28 device responses
http://192.168.1.1:49152/gateway.xml
/upnp/control/WANEthLinkC1
POST /upnp/control/WANIPConn1 HTTP/1.1
HOST: 192.168.1.1:49152
CONTENT-LENGTH: 307
CONTENT-TYPE: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#GetNATRSIPStatus"

<?xml version="1.0"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetNATRSIPStatus xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
</u:GetNATRSIPStatus>
</s:Body>
</s:Envelope>
HTTP/1.1 200 OK
CONTENT-LENGTH: 344
CONTENT-TYPE: text/xml; charset="utf-8"
DATE: Mon, 09 Jun 2008 18:25:49 GMT
EXT:
SERVER: Linux/2.4.20, UPnP/1.0, Intel SDK for UPnP devices /1.2

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body>
<u:GetNATRSIPStatusResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
<NewRSIPAvailable>0</NewRSIPAvailable>
<NewNATEnabled>1</NewNATEnabled>
</u:GetNATRSIPStatusResponse>
</s:Body> </s:Envelope>
There you go. :)

Posted: Tue Jun 10, 2008 8:54 am
by lexvictory
thanks :) (the extra debug output is to try solve doubledutch's failure)

Re: if you have a upnp router...

Posted: Sun Mar 13, 2011 2:54 pm
by AndyMK
Does anyone have the source for this? The download does not work anymore.

Re: if you have a upnp router...

Posted: Thu Jun 02, 2011 2:16 pm
by baermuda
I'm also interested in the source code.

Re: if you have a upnp router...

Posted: Thu Jun 02, 2011 3:26 pm
by lexvictory
i have long lost the sources for this sorry.

a better option is to use miniupnpc, its what i use nowadays

Re: if you have a upnp router...

Posted: Mon Jun 06, 2011 7:22 am
by baermuda
Thank you very much for your quick answer. I'll have a look at this project.