aMule Forum

English => Feature requests => Topic started by: Oblomov on September 13, 2005, 10:15:42 PM

Title: UPnP
Post by: Oblomov on September 13, 2005, 10:15:42 PM
It would be nice to have support for UPnP devices, with the ability to open/close door as needed (maybe even random ports within a certain range).

For an open source implementation that works and is understandable-to-use, you may have look at how it's implemented in the Azureus bittorrent client --to me, it seems better than UPnP support as it's implemented in some eMule mods (and which I couldn't get to work ...)
Title: Re: UPnP
Post by: wardevil on September 13, 2005, 10:22:59 PM
Why not use the upnp support in the kernel?
All you have to do is compile kernel with UPnp suport...


Cheers....
Title: Re: UPnP
Post by: skolnick on September 14, 2005, 05:22:08 PM
AFAIK, the uPnP supoprt in the kernel is for managing the linux box using uPNP, not for managing uPNP devices external to it...but I could be wrong.

Regards.
Title: Re: UPnP
Post by: kreegee on September 15, 2005, 12:19:56 AM
Whatever the kernel supports, i'm shure there's at least one open upnp-library for posix-systems. i'm not shure, but i think i read that some emule-mods even use one of those (with a nasty cygwin-layer).

so for linux and maybe osx, upnp shouldn't be too difficult, for win you could still use the source of emule (as soon as there is a proper implementation, afaik the emule-devs are working on it).

@oblomov:
i don't think Azureus is very helpfull, it's written in java, while amule is in C.
Title: Re: UPnP
Post by: Onip on March 16, 2006, 12:11:56 AM
I'd like an optional support for UPnP. I do know how to forward ports but UPnP could really be way much more confortable in some cases. It won't be a security hole (IMHO, obviously) just because routers have optional activation for it. So if you (as admin) just don't want upnp to be you could diseable it on router level. Maybe random ports would be nicer.

Excuse my English and thank for your work
Title: Re: UPnP
Post by: lfroen on March 16, 2006, 09:39:03 AM
Quote
I'd like an optional support for UPnP
I would like it too. I will see what can be done for this matter.
Title: Re: UPnP
Post by: leuk_he on March 21, 2006, 10:02:21 AM
Well the upnp supports in emule based mods (morphXT) is based on a portable linux library. Take a look there.
Title: Re: UPnP
Post by: Kry on March 21, 2006, 01:09:17 PM
Hey leuk. All hail NWO.
Title: Re: UPnP
Post by: phoenix on December 07, 2006, 01:28:14 PM
Anyone interested in testing UPnP support in aMule, please download tomorrow cvs tarball.

Please notice that the code is incomplete, but should at least do the port mapping.
Title: Re: UPnP
Post by: Menion on December 07, 2006, 07:23:35 PM
I will give a check. Bye!
Title: Re: UPnP
Post by: adsl on March 15, 2007, 09:00:52 AM
in nearly cvs got error and a lot errors...
2007-03-15 15:55:00: Universal Plug and Play: error(UPNP_DISCOVERY_ADVERTISEMENT_ALIVE): Error retrieving device description from http://192.168.1.1:5431/dyndev/uuid:0017313f-f260-0017-313f-f2600032aaa3: UPNP_E_INVALID_DESC.
2007-03-15 15:55:00: Universal Plug and Play: error(UPNP_DISCOVERY_ADVERTISEMENT_ALIVE): Error retrieving device description from http://192.168.1.1:5431/dyndev/uuid:0017313f-f260-0017-313f-f2600032aaa3: UPNP_E_INVALID_DESC.
2007-03-15 15:55:00: Universal Plug and Play: error(UPNP_DISCOVERY_ADVERTISEMENT_ALIVE): Error retrieving device description from http://192.168.1.1:5431/dyndev/uuid:0017313f-f260-0017-313f-f2600032aaa3: UPNP_E_INVALID_DESC.

...etc, every sec.
Title: Re: UPnP
Post by: wuischke on March 15, 2007, 10:32:35 AM
What's your router?
Which version of libupnp?
Title: Re: UPnP
Post by: adsl on March 15, 2007, 12:34:35 PM
What's your router?
Which version of libupnp?
asus WL520G
SMC WBR14T
libupnp-1.4.1
Title: Re: UPnP
Post by: phoenix on March 16, 2007, 12:25:51 AM
Your best shot is to compile libupnp with debug information and then send us the files IUpnpErrFile.txt and IUpnpInfoFile.txt.
Title: Re: UPnP
Post by: adsl on March 16, 2007, 08:44:16 AM
ok, upgrade libupnp-1.4.3 and above errors gone, and new errors comes...

2007-03-16 14:57:14: Universal Plug and Play: Error: GetStateVariable("PortMappingNumberOfEntries"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("ConnectionType"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("PossibleConnectionTypes"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("ConnectionStatus"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("Uptime"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("LastConnectionError"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("RSIPAvailable"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("NATEnabled"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("ExternalIPAddress"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("PortMappingNumberOfEntries"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("PortMappingLeaseDuration"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-03-16 14:57:32: Universal Plug and Play: Error: GetStateVariable("PortMappingNumberOfEntries"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.

then auto shutdown amule about 30min.
Title: Re: UPnP
Post by: phoenix on March 16, 2007, 12:18:34 PM
adsl,

Like I said before in another thread, GetStateVariable is a deprecated API in the UPnP standard, and it is ok that some routers do not implement it. This is experimental code, it will be removed upon release. The failure of these calls do not imply in any way a failure of the UPnP process.

So, the problem is something else, isn't there anything printed on this "auto shutdown" you mention?

Cheers!
Title: Re: UPnP
Post by: adsl on March 16, 2007, 02:14:14 PM
you mean error.log? can not found any like that, amule shutdown itself.
Title: Re: UPnP
Post by: phoenix on March 17, 2007, 12:55:47 AM
No, not error.log. I mean in the console. Start aMule from the console and watch what it prints. Also, take a look at ~/.aMule/logfile

Cheers!