miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UPnP subscribe for event

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs
View previous topic :: View next topic  
Author Message
kwlee



Joined: 23 Nov 2007
Posts: 5

PostPosted: Mon Nov 26, 2007 1:16 am    Post subject: UPnP subscribe for event Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Mon Nov 26, 2007 4:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kwlee



Joined: 23 Nov 2007
Posts: 5

PostPosted: Tue Nov 27, 2007 12:45 am    Post subject: Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue Nov 27, 2007 7:53 am    Post subject: Reply with quote

For some reason the router doesn't like the soap request Sad
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue Nov 27, 2007 8:23 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kwlee



Joined: 23 Nov 2007
Posts: 5

PostPosted: Wed Nov 28, 2007 2:09 am    Post subject: Reply with quote

Hi,

I sent both captured packets to your email account..

Best Regards,
KWLEE
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Wed Jan 09, 2008 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.