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
WLAN on 3.03 OE-C -> Host is unreachable
Update
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.
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.
Re: Update
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...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.
Raf.
Solution
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:
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? ... tapctlinit
benji
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: Select all
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;
}
benji