| View previous topic :: View next topic |
| Author |
Message |
gotmilk065
Joined: 28 Nov 2009 Posts: 27
|
Posted: Fri Feb 25, 2011 11:26 am Post subject: Check if WLAN is active? |
|
|
| I essentially need to check if the WLAN switch is on, and the LED powered on as well. I need to see if there's an active connection between the access point and the PSP. How can I check? |
|
| Back to top |
|
 |
Alberto
Joined: 12 Feb 2007 Posts: 63 Location: Sofia
|
Posted: Sat Feb 26, 2011 9:36 am Post subject: Re: Check if WLAN is active? |
|
|
| gotmilk065 wrote: | | I essentially need to check if the WLAN switch is on |
to check this you need to write a kernel prx that reads the buttons (basically the same you would do in your usermode prx, but kernel mode returns also special keys, such as WLAN switch, UMD switch, etc.).
| gotmilk065 wrote: | | , and the LED powered on as well. |
I know there is some function to retrieve the LED statuses, maybe even in the sdk samples... I'm sure I've seen some code somewhere, but can't remember.
| gotmilk065 wrote: | | I need to see if there's an active connection between the access point and the PSP. How can I check? |
pinging the router?
HTH
Cheers, A. |
|
| Back to top |
|
 |
Criptych

Joined: 12 Sep 2009 Posts: 87
|
Posted: Sun Mar 13, 2011 9:16 am Post subject: |
|
|
Here's the method I use, seems to work well enough.
| Code: | int apIsConnected()
{
int state;
if(sceNetApctlGetState(&state) < 0)
return 0;
return state == PSP_NET_APCTL_STATE_GOT_IP;
} |
_________________ PSP-2001 // CFW 6.60 ME-1.2 and GCLite // Genesis Competition Entry
"So, we meet again: for the first time, for the last time." —Spaceballs |
|
| Back to top |
|
 |
Alberto
Joined: 12 Feb 2007 Posts: 63 Location: Sofia
|
Posted: Sun Mar 13, 2011 9:53 pm Post subject: |
|
|
| Criptych wrote: | Here's the method I use, seems to work well enough.
| Code: | int apIsConnected()
{
int state;
if(sceNetApctlGetState(&state) < 0)
return 0;
return state == PSP_NET_APCTL_STATE_GOT_IP;
} |
|
well, considering the names of function and state constant, I desume it is exactly what is needed to know if the PSP got connected with the access point.
Cheers, A. |
|
| Back to top |
|
 |
|