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 strange down

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



Joined: 13 Dec 2005
Posts: 2

PostPosted: Tue Dec 13, 2005 9:36 am    Post subject: wlan strange down Reply with quote

The game is FULLY coded now, but not playable coz of this shitty bug !!

Here is my simple tetrinet testing code.

all seem to be ok, the psp connect well to the server.
i can start game from another client.
see the game on the psp.

BUT

if someone can tell me why the psp down the connection to the server after 2-3 minutes ??

thx.

Code:

white = Color.new(255, 255, 255)
offscreen = Image.createEmpty(480, 272)
offscreen:clear(Color.new(0, 0, 0))
y = 0
x = 0

function graphicsPrint(text)
   for i = 1, string.len(text) do
      char = string.sub(text, i, i)
      if char == "ÿ" then
         y = y + 8
         x = 0
      elseif char ~= "\r" then
         offscreen:print(x, y, char, white)
         x = x + 8
      end
   end
   screen:blit(0, 0, offscreen)
   screen.waitVblankStart()
   screen.flip()
end


Wlan.init()
configs = Wlan.getConnectionConfigs()
Wlan.useConnectionConfig(0)


socket, error = Socket.connect("82.67.130.62", 31457)  --- connexion to my tetrinet server
while not socket:isConnected() do System.sleep(100) end


bytesSent = socket:send("A226BA16B122A429A43F88CDDC76DC06448990F81E7E80\n") -- precalculated client info for testing (nick, etC..)

while true do
    buffer = socket:recv()
   if string.len(buffer) > 0 then break end
   screen.waitVblankStart()
end

buffer =""

bytesSent = socket:send("team 2 \n")

while true do

   buffer = socket:recv()
   if string.len(buffer) > 0 then
      graphicsPrint(buffer)
   end
   
   if Controls.read():start() then break end
   screen.waitVblankStart()

end
Wlan.term()


Last edited by antoine44 on Tue Dec 13, 2005 10:14 am; edited 1 time in total
Back to top
View user's profile Send private message
chaos



Joined: 10 Apr 2005
Posts: 135

PostPosted: Tue Dec 13, 2005 10:07 am    Post subject: Reply with quote

tetrinet on psp.. nice.. :)

sorry, no ideas on your code.
_________________
Chaosmachine Studios: High Quality Homebrew.
Back to top
View user's profile Send private message
Elxx



Joined: 07 Dec 2005
Posts: 16

PostPosted: Fri Dec 16, 2005 9:46 am    Post subject: Reply with quote

Are you sure you have WLAN Power Save turned off?

Dumb question, I know, but it's good to start with the simple things.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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