ofekp/TinyUPnP

NO Work addPort

macbellota opened this issue · 6 comments

I'm try to run this library.

only get this log.

never work..

Sending M-SEARCH to [4211081199] Port [1900]
M-SEARCH sent
Received packet of size [411] ip [192.168.1.1] port [50821]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: upnp:rootdevice
NTS: ssdp:aliv
Received packet of size [420] ip [192.168.1.1] port [50821]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: uuid:20809696-105a-3721-e8b8-44
Received packet of size [483] ip [192.168.1.1] port [50821]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:device:Int
Received packet of size [465] ip [192.168.1.1] port [47111]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-microsoft-com:servi
Received packet of size [420] ip [192.168.1.1] port [46433]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: uuid:20809696-205a-3721-e8b8-44
Received packet of size [459] ip [192.168.1.1] port [46433]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:device:WAN
Received packet of size [491] ip [192.168.1.1] port [59709]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:service:WA
Received packet of size [420] ip [192.168.1.1] port [50375]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: uuid:20809696-305a-3721-e8b8-44
Received packet of size [479] ip [192.168.1.1] port [50375]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:device:WAN
Received packet of size [473] ip [192.168.1.1] port [35015]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:service:WA
Received packet of size [487] ip [192.168.1.1] port [55982]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:service:WA

ofekp commented

Your gateway is returning "urn:schemas-upnp-org:service:WA" instead of "urn:schemas-upnp-org:service:WANIPConnection:1" or "urn:schemas-upnp-org:service:WANPPPConnection:1" which is weird...
Is this a complete log?
Can you please see that your UPnP is enabled in your gateway router?

Yes, this is a full Log. never go to Loop section, and not show "UPnP done",my router is ZTE F680.

Connected to otra
IP address: 192.168.1.53
Sending M-SEARCH to [4211081199] Port [1900]
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: 5
ST: ssdp:all

M-SEARCH sent
Received packet of size [411] ip [192.168.1.1] port [50538]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: upnp:rootdevice
NTS: ssdp:aliv
Received packet of size [420] ip [192.168.1.1] port [50538]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: uuid:20809696-105a-3721-e8b8-44
Received packet of size [483] ip [192.168.1.1] port [50538]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:device:Int
Received packet of size [465] ip [192.168.1.1] port [54229]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-microsoft-com:servi
Received packet of size [420] ip [192.168.1.1] port [38218]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: uuid:20809696-205a-3721-e8b8-44
Received packet of size [459] ip [192.168.1.1] port [38218]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:device:WAN
Received packet of size [491] ip [192.168.1.1] port [56706]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:service:WA
Received packet of size [420] ip [192.168.1.1] port [33331]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: uuid:20809696-305a-3721-e8b8-44
Received packet of size [479] ip [192.168.1.1] port [33331]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:device:WAN
Received packet of size [487] ip [192.168.1.1] port [55622]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:service:WA
Received packet of size [473] ip [192.168.1.1] port [49040]
Gateway packet content:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.1.1:52869/gatedesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: edcfe8a0-1dd1-11b2-9332-db3332f88128
NT: urn:schemas-upnp-org:service:WA

and YES, UPNP is Enabled.
My Router is ZTE F680

ofekp commented

Hey, sorry it took a while,
can you please check again with the code from this branch:
#11

Let me know if you need help setting it up.

Now, if it works correctly, the log is considerably longer, and finally I get a "UPnP done"

Now it works great.

Thanks ofekp ...

ofekp commented

Awesome, glad to hear it! Will merge soon,
Thanks for approaching.