View previous topic :: View next topic |
Author |
Message |
kwlee
Joined: 23 Nov 2007 Posts: 5
|
Posted: Mon Nov 26, 2007 1:16 am Post subject: UPnP subscribe for event |
|
|
Hi It's me again.
I finally find the root cause. and don't know hwo to solev...
I got two kind of particular Access Point/Router. And compare
miniupnpc vs Intel device builder.
One Japan Corega BARMX3:
By miniupnpc, it's quick to get externalIP address.
By Intel device builder, need to wait at least 40 seconds, and get
external IP address
One DrayTek router,VigorPro 2000.
By miniupnpc, I will get fail return.
By Intel device builder, I will get external IPaddress quickly.
And finally, I find the root cause is the action to subscribe UPNP event.
For the corega one, seems can not recognize "subscribe", so it wait until timeout.
but if u do not apply "subscribe" in another router(like miniupnpc), it will also fail.
Is there anyone know, Is it "must" to have "subscribe" ? Or any method
to judge the router need "subscribe" ?
KWLEE |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Mon Nov 26, 2007 4:15 pm Post subject: |
|
|
Hello.
Miniupnpc does not use the UPnP "Subscribe" command, even if the router does implement it. It should *NOT* cause any problem.
A UPnP client which needs "subscribe" will not work with a router that does not implement it.
The cause of the failure of miniupnpc with the "rayTek router,VigorPro 2000" is not clear. You can give me more information by compiling miniupnpc in debug mode (change Makefile for that). You can also record the IP packets with wireshark/ethereal in order to compare what happen with the Intel client and miniupnpc.
I need to know where in the process miniupnpc fails. Discovery process, XML description parsing or SOAP command. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
kwlee
Joined: 23 Nov 2007 Posts: 5
|
Posted: Tue Nov 27, 2007 12:45 am Post subject: |
|
|
Below is the dump messages from miniupnpc vs dreytek router,
I will dump packets later, but how can I send to you ?
upnpc : miniupnp test client. (c) 2006-2007 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
recv:214===
recv:214===
recv:214===
recv:214===
recv:214===
recv:214===
recv:214===
recv:287===
recv:213===
List of UPNP devices found on the network :
desc: http://192.0.100.112:63161/
st: upnp:rootdevice
desc: http://192.168.168.1:2869/upnp/igdppp.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
desc: http://192.168.168.44:51658/
st: upnp:rootdevice
desc: http://192.168.168.47:61255/
st: upnp:rootdevice
desc: http://192.168.168.34:60379/
st: upnp:rootdevice
desc: http://192.168.168.21:58902/
st: upnp:rootdevice
desc: http://192.168.168.23:57041/
st: upnp:rootdevice
desc: http://192.168.168.10:56640/
st: upnp:rootdevice
desc: http://192.168.168.45:63885/
st: upnp:rootdevice
miniwget addr url:[http://192.168.168.1:2869/upnp/igdppp.xml]
address miniwget : 192.168.168.66
recv:114===
recv:2048===
recv:52===
recv:935===
recv:0===
3035 bytes read
descXML:[<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion><major>1</major><minor>0</minor></specVersion>
<device><deviceType>urn:schemas-upnp-org:device:InternetGatewayDevice:1</deviceType>
<friendlyName>UPnP InternetGatewayDevice</friendlyName>
<manufacturer>Draytek</manufacturer>
<manufacturerURL>http://www.draytek.com.tw</manufacturerURL>
<modelDescription>Residential Gateway</modelDescription>
<modelName>Internet Connection Sharing</modelName>
<modelNumber>1.0</modelNumber>
<modelURL>http://www.draytek.com/</modelURL>
<UDN>uuid:6a782ad2-4078-4976-a7d4-00507fc24788</UDN>
<UPC>00000-00001</UPC>
<serviceList>
<service><serviceType>urn:schemas-microsoft-com:service:OSInfo:1</serviceType>
<serviceId>urn:microsoft-com:serviceId:OSInfo1</serviceId><controlURL>/OSInfo1</controlURL>
<eventSubURL>/OSInfoEvent1</eventSubURL>
<SCPDURL>/upnp/OSInfo.xml</SCPDURL></service></serviceList><deviceList><device>
<deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType>
<friendlyName>WANDevice</friendlyName><manufacturer>Draytek</manufacturer>
<manufacturerURL>http://www.draytek.com/</manufacturerURL>
<modelDescription>Residential Gateway</modelDescription>
<modelName>Internet Connection Sharing</modelName>
<modelNumber>1</modelNumber>
<modelURL>http://www.draytek.com/</modelURL>
<serialNumber>0000001</serialNumber>
<UDN>uuid:122324f5-6e85-41cc-8165-bd257e1ccbae</UDN><UPC>00000-00001</UPC><serviceList>
<service><serviceType>urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANCommonIFC1</serviceId><controlURL>/upnp?control=WANCommonIFC1</controlURL>
<eventSubURL>/upnp?event=WANCommonIFC1</eventSubURL><SCPDURL>/upnp/WComIFCX.xml</SCPDURL>
</service></serviceList><deviceList><device><deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType>
<friendlyName>WANConnectionDevice</friendlyName><manufacturer>Draytek</manufacturer>
<manufacturerURL>http://www.draytek.com/</manufacturerURL><modelDescription>Residential Gateway</modelDescription>
<modelName>Internet Connection Sharing</modelName><modelNumber>1</modelNumber><modelURL>http://www.draytek.com/</modelURL>
<serialNumber>0000001</serialNumber><UDN>uuid:6002cf29-9979-4d63-b19c-1c3518330a0a</UDN><UPC>00000-00001</UPC><serviceList>
<service><serviceType>urn:schemas-upnp-org:service:WANPOTSLinkConfig:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANPOTSLinkC1</serviceId><controlURL>/upnp?control=WANPOTSLinkC1</controlURL>
<eventSubURL></eventSubURL><SCPDURL>/upnp/WANPOTSL.xml</SCPDURL></service><service>
<serviceType>urn:schemas-upnp-org:service:WANPPPConnection:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANPPPConn1</serviceId><controlURL>/upnp?control=WANPPPConn1</controlURL>
<eventSubURL>/upnp?event=WANPPPConn1</eventSubURL><SCPDURL>/upnp/WPPPCon1.xml</SCPDURL>
</service></serviceList></device></deviceList></device></deviceList><presentationURL>http://192.168.168.1/</presentationURL></device></root>
]
urlbase =
WAN Device (Common interface config) :
deviceType = urn:schemas-upnp-org:device:WANDevice:1
serviceType = urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1
controlURL = /upnp?control=WANCommonIFC1
eventSubURL = /upnp?event=WANCommonIFC1
SCPDURL = /upnp/WComIFCX.xml
WAN Connection Device :
deviceType = urn:schemas-upnp-org:device:WANConnectionDevice:1
servicetype = urn:schemas-upnp-org:service:WANPPPConnection:1
controlURL = /upnp?control=WANPPPConn1
eventSubURL = /upnp?event=WANPPPConn1
SCPDURL = /upnp/WPPPCon1.xml
urls->ipcondescURL='http://192.168.168.1:2869/upnp/WPPPCon1.xml' 43 n1=61
urls->controlURL='http://192.168.168.1:2869/upnp?control=WANPPPConn1' 50 n2=68
urls->controlURL_CIF='http://192.168.168.1:2869/upnp?control=WANCommonIFC1' 52 n3=70
buffer:[]
UPNPIGD_IsConnected(http://192.168.168.1:2869/upnp?control=WANPPPConn1) = 0
buffer:[]
miniwget addr url:[http://192.168.168.1:2869/upnp/igdppp.xml]
address miniwget : 192.168.168.66
recv:114===
recv:2048===
recv:52===
recv:935===
recv:0===
3035 bytes read
descXML:[<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion><major>1</major><minor>0</minor></specVersion>
<device><deviceType>urn:schemas-upnp-org:device:InternetGatewayDevice:1</deviceType>
<friendlyName>UPnP InternetGatewayDevice</friendlyName>
<manufacturer>Draytek</manufacturer>
<manufacturerURL>http://www.draytek.com.tw</manufacturerURL>
<modelDescription>Residential Gateway</modelDescription>
<modelName>Internet Connection Sharing</modelName>
<modelNumber>1.0</modelNumber>
<modelURL>http://www.draytek.com/</modelURL>
<UDN>uuid:6a782ad2-4078-4976-a7d4-00507fc24788</UDN>
<UPC>00000-00001</UPC>
<serviceList>
<service><serviceType>urn:schemas-microsoft-com:service:OSInfo:1</serviceType>
<serviceId>urn:microsoft-com:serviceId:OSInfo1</serviceId><controlURL>/OSInfo1</controlURL>
<eventSubURL>/OSInfoEvent1</eventSubURL>
<SCPDURL>/upnp/OSInfo.xml</SCPDURL></service></serviceList><deviceList><device>
<deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType>
<friendlyName>WANDevice</friendlyName><manufacturer>Draytek</manufacturer>
<manufacturerURL>http://www.draytek.com/</manufacturerURL>
<modelDescription>Residential Gateway</modelDescription>
<modelName>Internet Connection Sharing</modelName>
<modelNumber>1</modelNumber>
<modelURL>http://www.draytek.com/</modelURL>
<serialNumber>0000001</serialNumber>
<UDN>uuid:122324f5-6e85-41cc-8165-bd257e1ccbae</UDN><UPC>00000-00001</UPC><serviceList>
<service><serviceType>urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANCommonIFC1</serviceId><controlURL>/upnp?control=WANCommonIFC1</controlURL>
<eventSubURL>/upnp?event=WANCommonIFC1</eventSubURL><SCPDURL>/upnp/WComIFCX.xml</SCPDURL>
</service></serviceList><deviceList><device><deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType>
<friendlyName>WANConnectionDevice</friendlyName><manufacturer>Draytek</manufacturer>
<manufacturerURL>http://www.draytek.com/</manufacturerURL><modelDescription>Residential Gateway</modelDescription>
<modelName>Internet Connection Sharing</modelName><modelNumber>1</modelNumber><modelURL>http://www.draytek.com/</modelURL>
<serialNumber>0000001</serialNumber><UDN>uuid:6002cf29-9979-4d63-b19c-1c3518330a0a</UDN><UPC>00000-00001</UPC><serviceList>
<service><serviceType>urn:schemas-upnp-org:service:WANPOTSLinkConfig:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANPOTSLinkC1</serviceId><controlURL>/upnp?control=WANPOTSLinkC1</controlURL>
<eventSubURL></eventSubURL><SCPDURL>/upnp/WANPOTSL.xml</SCPDURL></service><service>
<serviceType>urn:schemas-upnp-org:service:WANPPPConnection:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANPPPConn1</serviceId><controlURL>/upnp?control=WANPPPConn1</controlURL>
<eventSubURL>/upnp?event=WANPPPConn1</eventSubURL><SCPDURL>/upnp/WPPPCon1.xml</SCPDURL>
</service></serviceList></device></deviceList></device></deviceList><presentationURL>http://192.168.168.1/</presentationURL></device></root>
]
urlbase =
WAN Device (Common interface config) :
deviceType = urn:schemas-upnp-org:device:WANDevice:1
serviceType = urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1
controlURL = /upnp?control=WANCommonIFC1
eventSubURL = /upnp?event=WANCommonIFC1
SCPDURL = /upnp/WComIFCX.xml
WAN Connection Device :
deviceType = urn:schemas-upnp-org:device:WANConnectionDevice:1
servicetype = urn:schemas-upnp-org:service:WANPPPConnection:1
controlURL = /upnp?control=WANPPPConn1
eventSubURL = /upnp?event=WANPPPConn1
SCPDURL = /upnp/WPPPCon1.xml
urls->ipcondescURL='http://192.168.168.1:2869/upnp/WPPPCon1.xml' 43 n1=61
urls->controlURL='http://192.168.168.1:2869/upnp?control=WANPPPConn1' 50 n2=68
urls->controlURL_CIF='http://192.168.168.1:2869/upnp?control=WANCommonIFC1' 52 n3=70
recv:735===
n=735 bufsize=735 ContLen=608 HeadLen=127
buffer:[HTTP/1.1 200 OK
CONTENT-LENGTH: 608
CONNECTION: close
CONTENT-TYPE:text/xml
EXT:
SERVER: v2.6.4 UPnP/1.0 DrayWeb/0.0.2
<?xml version="1.0" ?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><m:GetStatusInfoResponse xmlns:m="urn:schemas-upnp-org:service:WANIPConnection:1"><NewConnectionStatus xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">Connected</NewConnectionStatus><NewLastConnectionError xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">ERROR_UNKNOWN</NewLastConnectionError><NewUptime xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4">58</NewUptime></m:GetStatusInfoResponse></s:Body></s:Envelope>]
UPNPIGD_IsConnected(http://192.168.168.1:2869/upnp?control=WANPPPConn1) = 1
Found valid IGD : http://192.168.168.1:2869/upnp?control=WANPPPConn1
Local LAN ip address : 192.168.168.66
buffer:[HTTP/1.1 200 OK
CONTENT-LENGTH: 608
CONNECTION: close
CONTENT-TYPE:text/xml
EXT:
SERVER: v2.6.4 UPnP/1.0 DrayWeb/0.0.2
<?xml version="1.0" ?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><m:GetStatusInfoResponse xmlns:m="urn:schemas-upnp-org:service:WANIPConnection:1"><NewConnectionStatus xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">Connected</NewConnectionStatus><NewLastConnectionError xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">ERROR_UNKNOWN</NewLastConnectionError><NewUptime xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4">58</NewUptime></m:GetStatusInfoResponse></s:Body></s:Envelope>]
GetExternalIPAddress failed. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Tue Nov 27, 2007 7:53 am Post subject: |
|
|
For some reason the router doesn't like the soap request _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Tue Nov 27, 2007 8:23 am Post subject: |
|
|
It would help me to have the TCP stream of the SOAP request and response between both miniupnp and the dreyrek router and intel code and the dreyrek router. You can have it with wireshark/ethereal using the "follow TCP stream" option.
If packet captures are not too big, you can also send them to me email : miniupnpATfree DOTfr _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
kwlee
Joined: 23 Nov 2007 Posts: 5
|
Posted: Wed Nov 28, 2007 2:09 am Post subject: |
|
|
Hi,
I sent both captured packets to your email account..
Best Regards,
KWLEE |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Jan 09, 2008 11:18 am Post subject: |
|
|
I made some changes to MiniUPnPc code like using HTTP/1.0 instead of HTTP/1.1.
I hope it improve things _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
|