Wlan useConnectionConfig hang

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

Moderators: Shine, Insert_witty_name

Post Reply
haxd
Posts: 5
Joined: Thu Apr 12, 2007 8:16 am

Wlan useConnectionConfig hang

Post by haxd »

I'm trying to code a small wifi app in LuaPlayer,
However, I'm finding that my code is hanging in 0.20.

Code: Select all

  if cross:checkState() then
    sel = selected + 1
    Desktop:fontPrint(font,40,50+(e+2)*20,"Someone set us up the bomb",Color.new(255,255,255))
    update()
    Wlan.useConnectionConfig(sel)
    Desktop:fontPrint(font,40,50+(e+3)*20,"We get signal",Color.new(255,255,255))
    update()
    sck = Socket.connect("192.168.0.2", 80)
    active = true
  end
The cross:checkState() is my own function, the first message appears, then the psp hangs, and the wifi light stays on. If I turn off the wifi switch, the psp unfreezes and the script continues (and of course, fails to connect).

I thought it was just taking a while to connect, however, I tried connecting to another (unsecured) connection and it happened still.

Any ideas?
the underminer
Posts: 123
Joined: Mon Oct 03, 2005 4:25 am
Location: Netherlands

Post by the underminer »

Try to put the socket = socket.connect directly after the useconnectionconfig line. that should work. Take a look at my topic about wlan in luaplayer 0.20 at the forum
Behold! The Underminer got hold of a PSP
Post Reply