forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WLAN on 3.03 OE-C -> Host is unreachable

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
benji



Joined: 14 Oct 2005
Posts: 17

PostPosted: Sun Feb 04, 2007 3:59 pm    Post subject: WLAN on 3.03 OE-C -> Host is unreachable Reply with quote

I'm having trouble getting WLAN to work in user mode for 3.03 OE-C.

I'm using a manually configured connection (WPA Personal) setting and am able to get the IP successfully, but calling sceNetInetConnect produces an errno of 118 = EHOSTUNREACH = "Host is unreachable". This is set after the first call to connect, that is there is no itermediate step to EINPROGRESS.

I'm observing the exact same behaviour with the latest PSPRadio source (Feb 3rd 2007) compiled on a recent toolchain (Feb 2nd 2007). Which leads me to believe there's something weird going on outside my app.

Any ideas?

Thanks,

ben
Back to top
View user's profile Send private message
benji



Joined: 14 Oct 2005
Posts: 17

PostPosted: Mon Feb 05, 2007 5:22 am    Post subject: Update Reply with quote

It appears PSPRadio works fine with a connecction that uses DHCP. Has anyone else observed this with other network apps?

I'm assuming most people use DHCP, so I wouldn't be surprised if this hasn't come up before, but just in case... is this a known limitation?

Note that my manual connection works fine when tested through the Network Settings in the VSH.
Back to top
View user's profile Send private message
raf



Joined: 13 Oct 2005
Posts: 57

PostPosted: Mon Feb 05, 2007 1:15 pm    Post subject: Re: Update Reply with quote

benji wrote:
It appears PSPRadio works fine with a connecction that uses DHCP. Has anyone else observed this with other network apps?

I'm assuming most people use DHCP, so I wouldn't be surprised if this hasn't come up before, but just in case... is this a known limitation?

Note that my manual connection works fine when tested through the Network Settings in the VSH.


It appears to be a problem with network routing (gateway); as it works fine if you use a proxy (defined inside your LAN). I had this happen, but I recreated my connection (it was manually defined, now automatically), and the problem disappeared.. But the old connection I had it defined from before I upgraded, I just assumed that to be the problem... I guess we need to do more testing...

Raf.
Back to top
View user's profile Send private message
mrlinx



Joined: 20 Mar 2008
Posts: 9

PostPosted: Tue Apr 08, 2008 9:35 am    Post subject: Reply with quote

This problem also appears here. I get a 118 err code if I try to connect to a manual conf.
Back to top
View user's profile Send private message
benji



Joined: 14 Oct 2005
Posts: 17

PostPosted: Thu Sep 11, 2008 2:00 pm    Post subject: Solution Reply with quote

The problem is with the stack size passed to sceNetApctlInit which is called from pspSdkInetInit.

The PSPSDK currently uses 0x1400, but a minimum of 0x1600 appears to be needed (this is from experimentation on 4.01m33-2).

Your best bet for a work around is to re-implement pspSdkInetInit in your application to look something like this:

Code:

int tweakedInetInit()
{
   u32 retVal;
   
   retVal = sceNetInit(0x20000, 0x20, 0x1000, 0x20, 0x1000);
   if (retVal != 0)
      return retVal;
   
   retVal = sceNetInetInit();
   if (retVal != 0)
      return retVal;
   
   retVal = sceNetResolverInit();
   if (retVal != 0)
      return retVal;
   
   retVal = sceNetApctlInit(0x1600, 0x42);
   if (retVal != 0)
      return retVal;
   
   return 0;
}


Note that a rather dated thread claims the loader should automatically do this for us, but it doesn't appear to be the case. The thread in question: http://forums.ps2dev.org/viewtopic.php?t=5423&highlight=scenetapctlinit

benji
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu Sep 18, 2008 5:45 am    Post subject: Reply with quote

Bumped up to 0x1600 in rev 2432
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
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