wlan strange down

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
antoine44
Posts: 2
Joined: Tue Dec 13, 2005 9:25 am

wlan strange down

Post by antoine44 »

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: Select all

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.
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

tetrinet on psp.. nice.. :)

sorry, no ideas on your code.
Chaosmachine Studios: High Quality Homebrew.
Elxx
Posts: 16
Joined: Wed Dec 07, 2005 4:48 pm
Contact:

Post by Elxx »

Are you sure you have WLAN Power Save turned off?

Dumb question, I know, but it's good to start with the simple things.
Post Reply