All Functions Modules Pages
wlan

Functions

NUMBER wlan.connect ()
 Connects to the network using the default dialog Sony. More...
 
NUMBER wlan.connect (NUMBER net)
 Connects to the network, without dialog. More...
 
NIL wlan.autoconnect (NUMBER mode)
 Enables the AutoConnect in the background of wifi. More...
 
NIL wlan.autoconnect (NUMBER mode, NUMBER scantime)
 Enables the AutoConnect in the background of wifi. More...
 
BOOLEAN wlan.autostatus ()
 Allows to know if the AutoConnect in thread mode is activated. More...
 
BOOLEAN wlan.isconnected ()
 Checks if the console is connected to a network. More...
 
STRING wlan.over ()
 Gets the name of the established connection. More...
 
NUMBER wlan.status ()
 Check the status of the wlan connection. More...
 
STRING wlan.getip ()
 Gets the local IP assigned by the access point to our console. More...
 
TABLE wlan.getconfigs ()
 Gets the network configurations detected in the PSP. More...
 
NUMBER wlan.strength ()
 Signal strength of a wireless access point connected. More...
 
BOOLEAN wlan.add (STRING name, STRING ssid, STRING security, STRING pass)
 Allows you to add a network configuration on the console. More...
 
BOOLEAN wlan.copy (NUMBER index1, NUMER index2)
 Allows you to copy a configuration to an existing network. More...
 
BOOLEAN wlan.delete (NUMBER index)
 Allows deleting a Wifi access point. More...
 
BOOLEAN wlan.backup (STRING backup)
 Backup network configurations. More...
 
BOOLEAN wlan.restore (STRING backup)
 Restore the network settings using the backup created when use wlan.backup(). More...
 
BOOLEAN wlan.restore (STRING backup, NUMBER rewrite)
 Restore the network settings using the backup created when use wlan.backup(). More...
 
TABLE wlan.scan ()
 Allows to obtain a table with data from networks close to the PSP. More...
 
NIL wlan.disconnect ()
 Disconnect wlan. More...
 

Detailed Description

Wifi Connection.

Function Documentation

NUMBER wlan.connect ( )

Connects to the network using the default dialog Sony.

Returns
A number, indicating the result of the connection. Will be 1 if connected properly, or 0 on error.
NUMBER wlan.connect ( NUMBER  net)

Connects to the network, without dialog.

Parameters
netThe network that connects (1 for the first configured network, 2 for second and so on).
Returns
A number, indicating the result of the connection. Will be 1 if connected properly, or 0 on error.
Note
net is not the position in the list, is the index of register obtained wlan.getconfigs().
This function can use the onNetConnection() callback, more info here .
NIL wlan.autoconnect ( NUMBER  mode)

Enables the AutoConnect in the background of wifi.

Parameters
modeAny of the following values:
  • 1: Enable.
  • 0: Disable.
Note
While this this active role, cannot be used other means to try to connect to the internet, it will try to connect every minute if this disconnection.
Returns
Nothing.
NIL wlan.autoconnect ( NUMBER  mode,
NUMBER  scantime 
)

Enables the AutoConnect in the background of wifi.

Parameters
modeAny of the following values:
  • 1: Enable.
  • 0: Disable.
scantimeTime in seconds between each scan.
Note
While this this active role, cannot be used other means to try to connect to the internet, it will try to connect each (scantime) If this disconnection.
Returns
Nothing.
BOOLEAN wlan.autostatus ( )

Allows to know if the AutoConnect in thread mode is activated.

Returns
true / false, depending on whether it is or not activated the wlan.autoconnect() (mode thread).
BOOLEAN wlan.isconnected ( )

Checks if the console is connected to a network.

Returns
true/false, depending on whether the console is connected to the network.
STRING wlan.over ( )

Gets the name of the established connection.

Returns
The established connection name.
Note
Compatible only with the autoconnect connections.
NUMBER wlan.status ( )

Check the status of the wlan connection.

Returns
A number according to the status of the connection:
  • (0) Disconnected
  • (1) Scanning
  • (2) Connecting
  • (3) Getting IP
  • (4) Connected
  • (5) Authorizing
  • (6) Key Exchange
  • (-13) Generic error
STRING wlan.getip ( )

Gets the local IP assigned by the access point to our console.

Returns
IP in format XXX: XXX: XXX: XXX or nil if the console is not connected to the network.
TABLE wlan.getconfigs ( )

Gets the network configurations detected in the PSP.

Returns
A table with these fields:
  • name Network name.
  • ssid Network SSID.
  • secure Network security type.
NUMBER wlan.strength ( )

Signal strength of a wireless access point connected.

Returns
A number indicating the strength or signal strength of Wifi access point that we are connected.
BOOLEAN wlan.add ( STRING  name,
STRING  ssid,
STRING  security,
STRING  pass 
)

Allows you to add a network configuration on the console.

Parameters
namename of the new network.
ssidSSID of the network, this can be obtained by wlan.scan ().
securityprotection, the new network type, this can be obtained by wlan.scan (), it can be any of the following values:
  • none.
  • wep.
  • wpa.
passnew network password.
Returns
true/false, depending on whether the new network is added successfully.
BOOLEAN wlan.copy ( NUMBER  index1,
NUMER  index2 
)

Allows you to copy a configuration to an existing network.

Parameters
index1It is the network settings to copy; It is the index obtained using wlan.getconfigs().
index2It is the destination network configuration; It is the index obtained using wlan.getconfigs() ; The network configuration will be replaced.
Returns
true/false, depending on whether the copying is done successfully.
BOOLEAN wlan.delete ( NUMBER  index)

Allows deleting a Wifi access point.

Parameters
indexIt is the network settings to eliminate; It is the index obtained using wlan.getconfigs().
Returns
true if success, false otherwise.
BOOLEAN wlan.backup ( STRING  backup)

Backup network configurations.

Parameters
backupIt is the path where the backup will be saved, you must include the file name: wlan.backup ("netconfig.bak").
Returns
true/false, depending on whether the backup was done successfully.
BOOLEAN wlan.restore ( STRING  backup)

Restore the network settings using the backup created when use wlan.backup().

Parameters
backupIs the path of the backup to restore, should include the file name: wlan.restore("netconfig.bak").
Note
  • This function can use the onNetBackRestore() callback, more info here .
  • Network configurations will be placed at the end of the networks you have set (you'll keep your network if you need them).
Returns
true/false, Depending on whether the restoration was done successfully.
BOOLEAN wlan.restore ( STRING  backup,
NUMBER  rewrite 
)

Restore the network settings using the backup created when use wlan.backup().

Parameters
backupIs the path of the backup to restore, should include the file name: wlan.restore("netconfig.bak").
rewriteIt is the way to restore, you must put the value 1 to overwrite networks (your current networks will be lost).
Note
  • This function can use the onNetBackRestore() callback, more info here .
Returns
true/false, Depending on whether the restoration was done successfully.
TABLE wlan.scan ( )

Allows to obtain a table with data from networks close to the PSP.

Returns
A table with the following fields:
  • ssid The SSID of the network.
  • security The type of network security.
  • strength The strength of the network.
  • mac The address the network physics.
  • channel The channel of the network connection.
  • bsstype The type of network connection.
  • typesafe The type of binary network security.
Note
this function cannot be used if it is connected to a network.
NIL wlan.disconnect ( )

Disconnect wlan.

Returns
Nothing.