| View previous topic :: View next topic |
| Author |
Message |
wombot
Joined: 10 Jan 2006 Posts: 5
|
Posted: Fri Jan 13, 2006 5:42 am Post subject: 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! |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Fri Jan 13, 2006 6:55 am Post subject: |
|
|
Yeah, one suggestion is to terminate & restart the connection every minute with a timer.
Yes I'm serious.
It would be nice to see a cleaner way. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Fri Jan 13, 2006 8:18 am Post subject: |
|
|
| Are you doing anything like calling scePowerTick() on a regular basis? I've found with the psplink wlan stuff if you leave the psp on for a while (maybe 5-10 minutes) without doing anything at all the wifi connection seems to totally drop out. Though it does sound slightly different in your case. |
|
| Back to top |
|
 |
wombot
Joined: 10 Jan 2006 Posts: 5
|
Posted: Fri Jan 13, 2006 2:28 pm Post subject: |
|
|
Yep, I've tried that and it doesn't seem to effect anything.
I also tried it on a couple different computers on different networks, so I'm pretty sure it's not something to do with my network configuration or pc.
Thanks for the suggestion though! |
|
| Back to top |
|
 |
Elxx
Joined: 07 Dec 2005 Posts: 16
|
Posted: Fri Jan 13, 2006 3:32 pm Post subject: |
|
|
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... |
|
| Back to top |
|
 |
wombot
Joined: 10 Jan 2006 Posts: 5
|
Posted: Sat Jan 14, 2006 8:20 am Post subject: |
|
|
Well it's at least good to know that I'm not the only one with this problem.
If it is a problem with luaplayer, hopefully it's an easy fix. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Sun Jan 15, 2006 4:25 am Post subject: |
|
|
| 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 think this is a problem in the PSPSDK: looks like pspSdkInetTerm doesn't work, or I'm doing something wrong in Lua Player. |
|
| Back to top |
|
 |
Elxx
Joined: 07 Dec 2005 Posts: 16
|
Posted: Sun Jan 15, 2006 5:33 am Post subject: |
|
|
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 [b]not[b] 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. |
|
| Back to top |
|
 |
liquid8d
Joined: 30 Jun 2005 Posts: 66
|
Posted: Sat Jan 21, 2006 4:58 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
modsyn
Joined: 27 Sep 2005 Posts: 28
|
Posted: Sat Jan 21, 2006 11:08 am Post subject: |
|
|
i had problems with the wifi stopping too until i put in the power tick
command during my download loop. after that it didn't happen anymore. |
|
| Back to top |
|
 |
|