AddPortMapping Help

31 views
Skip to first unread message

JanderSun

unread,
Feb 1, 2012, 12:02:02 AM2/1/12
to upnpx
Need help using AddPortMapping on iPhone.

The command always fails see code bellow.


________________________________________________________________________


if ([[device urn] isEqualToString:@"urn:schemas-upnp-
org:device:WANConnectionDevice:1"]){


for ( id x in [[[UPnPManager GetInstance] DB]
getSSDPServicesFor:device])
{
WANConnection1Device *server = [[WANConnection1Device
alloc] initWithSSDPDevice:x];


if ([server respondsToSelector:@selector(ipConnection)] &&
[server ipConnection] != nil)


NSLog(@" Responce Add %d", [[server ipConnection]
AddPortMappingWithNewRemoteHost:@"" NewExternalPort:@"8585"
NewProtocol:@"TCP" NewInternalPort:@"885"
NewInternalClient:@"192.168.1.129" NewEnabled:@"True"
NewPortMappingDescription:@"iPhone" NewLeaseDuration:@"0"]);
Reply all
Reply to author
Forward
0 new messages