WLan disconnects
Moderators: Shine, Insert_witty_name
WLan disconnects
Hi there, I seem to be having a bit of an interesting problem with the wlan module. I'm using it to send control data from my psp to pc, but am having problems with sockets disconnecting after about 30 seconds.
I have no problem connecting, and the first run of my lua script after starting luaplayer seems to work fine, and remains connected as long as I want. On subsequent runs after that it will only remain connected for 30 sec - 1 min. If I completely restart lua player then is will run stably again...
I have wireless power save mode off, and I run socket:close() and wlan.term() before the script ends.
Is it possible that something isn't being cleaned up properly after ending the script??
Any suggestions are welcome, thanks!
I have no problem connecting, and the first run of my lua script after starting luaplayer seems to work fine, and remains connected as long as I want. On subsequent runs after that it will only remain connected for 30 sec - 1 min. If I completely restart lua player then is will run stably again...
I have wireless power save mode off, and I run socket:close() and wlan.term() before the script ends.
Is it possible that something isn't being cleaned up properly after ending the script??
Any suggestions are welcome, thanks!
This is an issue that I've been having as well with my LuaPlayer-powered web server. Same thing as you...if, within the script, I close the WLAN connection and start it up again, it will only work for around 20 seconds before refusing any further requests. The WLAN light on the PSP blinks consistently whenever I try to send a request, but it ignores it and no data ever makes it back.
The only way to get past this, it seems, is to completely reload your script every time you want to make a new WLAN connection. We need to figure out the problem here, I suspect it's something in the LuaPlayer code...
The only way to get past this, it seems, is to completely reload your script every time you want to make a new WLAN connection. We need to figure out the problem here, I suspect it's something in the LuaPlayer code...
I think this is a problem in the PSPSDK: looks like pspSdkInetTerm doesn't work, or I'm doing something wrong in Lua Player.Elxx wrote:if, within the script, I close the WLAN connection and start it up again, it will only work for around 20 seconds before refusing any further requests. The WLAN light on the PSP blinks consistently whenever I try to send a request, but it ignores it and no data ever makes it back.
I'll mess around with it and tell you if I can figure anything out.
EDIT:
Okay, one workaround that I've found working for my server, at least, is not doing Wlan.init() and Wlan.term() each time I want to reconnect to the access point. What I did was add a disconnectAP() function to my LuaPlayer core that calls just sceNetApctlDisconnect();. This kills the network connection, but allows you to use useConnectionConfig again to reconnect to the access point, without the connection dying on that second attempt. Also, any sockets I have opened can be kept open through this whole thing, they will still receive data.
So this does indeed look like a problem with Wlan.term(). I suspect that my workaround only works for standalone Lua apps, and probably not with Lowser. But that's what I've been able to do.
EDIT:
Okay, one workaround that I've found working for my server, at least, is not doing Wlan.init() and Wlan.term() each time I want to reconnect to the access point. What I did was add a disconnectAP() function to my LuaPlayer core that calls just sceNetApctlDisconnect();. This kills the network connection, but allows you to use useConnectionConfig again to reconnect to the access point, without the connection dying on that second attempt. Also, any sockets I have opened can be kept open through this whole thing, they will still receive data.
So this does indeed look like a problem with Wlan.term(). I suspect that my workaround only works for standalone Lua apps, and probably not with Lowser. But that's what I've been able to do.
any news on these wlan issues? I have this issue, as well as downloading files do not always finish.
I haven't taken a look at the stuff for the SDK, or the Lua Player src, but prior to, using the wifi src in C, I have had no issues.
It seems as though something is off. It would be nice too if the sockets would close as they should.
Can't wait for the next version.... because that's when my project will most likely be released :P
liquid8d
I haven't taken a look at the stuff for the SDK, or the Lua Player src, but prior to, using the wifi src in C, I have had no issues.
It seems as though something is off. It would be nice too if the sockets would close as they should.
Can't wait for the next version.... because that's when my project will most likely be released :P
liquid8d