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 disconnects

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



Joined: 10 Jan 2006
Posts: 5

PostPosted: Fri Jan 13, 2006 5:42 am    Post subject: WLan disconnects Reply with quote

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
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Fri Jan 13, 2006 6:55 am    Post subject: Reply with quote

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
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Fri Jan 13, 2006 8:18 am    Post subject: Reply with quote

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
View user's profile Send private message
wombot



Joined: 10 Jan 2006
Posts: 5

PostPosted: Fri Jan 13, 2006 2:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Elxx



Joined: 07 Dec 2005
Posts: 16

PostPosted: Fri Jan 13, 2006 3:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
wombot



Joined: 10 Jan 2006
Posts: 5

PostPosted: Sat Jan 14, 2006 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sun Jan 15, 2006 4:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Elxx



Joined: 07 Dec 2005
Posts: 16

PostPosted: Sun Jan 15, 2006 5:33 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
liquid8d



Joined: 30 Jun 2005
Posts: 66

PostPosted: Sat Jan 21, 2006 4:58 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
modsyn



Joined: 27 Sep 2005
Posts: 28

PostPosted: Sat Jan 21, 2006 11:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player 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