VBWep 1.1 Library (WEP)
Releasing VBWep 1.1
Allows you to connect to a WIFI via WEP with SSID,PASSWORD
cWep(ssid,password)
connects device to the wifi WEP/SSID
weconnected()
returns if you are connected to wifi
GetWifiList()
returns a list of available wifi's
returns the % of strength
returns the type of network
example: Igloo ::: [WPA-PSK-TKIP][WPA2-PSK-TKIP+CCMP] ::: 16
Msgbox(MyWiFi.mac,"mac address")
Msgbox(MyWiFi.IPADDRESS,"IP")
Msgbox(MyWiFi.BSSID,"BSSID")
Msgbox(MyWiFi.SupplicantState,"SUPSTATE")
* Return a STATUS STATE
*
* ASSOCIATED - Association completed.
* ASSOCIATING - Trying to associate with an access point.
* COMPLETED - All authentication completed.
* DISCONNECTED - client is not associated, likely to start looking for an access point
* DORMANT - An Android-added state that is reported when a client issues an explicit DISCONNECT command.
* FOUR_WAY_HANDSHAKE - WPA 4-Way Key Handshake in progress.
* GROUP_HANDSHAKE - WPA Group Key Handshake in progress.
* INACTIVE - Inactive state.
* INVALID - A pseudo-state that should normally never be seen. SCANNING - Scanning for a network.
* UNINITIALIZED - No connection.
RemoveAllSavedNetworks()
clears out all Saved Networks in your wifi list
this will remove all saved configurations
don't use if you have and need wifi passwords stored on device
Attached is an example program, please test and give feedback.
Credits: Tomas for helping me start this a few months ago
Thanks in Advance
Vb1992
Library Revision History:
old...... Library is version 1.0 - July 17th, 2012
New...... Library is version 1.1 - July 19th, 2012
VBWep.zip is the project (also see in this thread NJDUDE's advanced example project)
VBWep1.1.zip is the library
Releasing VBWep 1.1
Allows you to connect to a WIFI via WEP with SSID,PASSWORD
- VBConnect
Permissions:- android.permission.CHANGE_NETWORK_STATE
- android.permission.WAKE_LOCK
- android.permission.INTERNET
- android.permission.UPDATE_DEVICE_STATS
- android.permission.CHANGE_WIFI_STATE
- android.permission.ACCESS_NETWORK_STATE
- android.permission.ACCESS_WIFI_STATE
- BSSID As String
Return a wifi BSSID as STRING - IPADDRESS As String
Return a wifi IP ADDRESS as INT
*(not sure if this works) - SupplicantState As SupplicantState
Return a STATUS STATE
*
*ASSOCIATED - Association completed.
*ASSOCIATING - Trying to associate with an access point.
*COMPLETED - All authentication completed.
*DISCONNECTED - client is not associated, *likely to start looking for an access point*
*DORMANT - An Android-added state that is reported when a client issues an explicit DISCONNECT command.
*FOUR_WAY_HANDSHAKE - WPA 4-Way Key Handshake in progress.
*GROUP_HANDSHAKE - WPA Group Key Handshake in progress.
*INACTIVE - Inactive state.
*INVALID - A pseudo-state that should normally never be seen. SCANNING - Scanning for a network.
*UNINITIALIZED - No connection. - mac As String
Return a wifi mac address as STRING
- GetWifiList As List
Return a List of the names of available WIFI Spots. - RemoveAllSavedNetworks
Removes all saved networks on device
*Good when you want to reset wifi configurations
*WARNING: Will remove all passwords of saved wifi locations - cWEP (wepSSID As String, wepPASS As String)
Connect to the given WEP network ssid with the password.
*No quotes or backslashes needed.
wepSSID:*
wepPASS:* - intToIp (i As Int) As String
- readWepConfig
readWepConfig()
*displays info to the b4a debug log window - weconnected As String
If connected:
*Returns a String *YES *
*If not connected:
*Returns a String *NO
cWep(ssid,password)
connects device to the wifi WEP/SSID
weconnected()
returns if you are connected to wifi
GetWifiList()
returns a list of available wifi's
returns the % of strength
returns the type of network
example: Igloo ::: [WPA-PSK-TKIP][WPA2-PSK-TKIP+CCMP] ::: 16
Msgbox(MyWiFi.mac,"mac address")
Msgbox(MyWiFi.IPADDRESS,"IP")
Msgbox(MyWiFi.BSSID,"BSSID")
Msgbox(MyWiFi.SupplicantState,"SUPSTATE")
* Return a STATUS STATE
*
* ASSOCIATED - Association completed.
* ASSOCIATING - Trying to associate with an access point.
* COMPLETED - All authentication completed.
* DISCONNECTED - client is not associated, likely to start looking for an access point
* DORMANT - An Android-added state that is reported when a client issues an explicit DISCONNECT command.
* FOUR_WAY_HANDSHAKE - WPA 4-Way Key Handshake in progress.
* GROUP_HANDSHAKE - WPA Group Key Handshake in progress.
* INACTIVE - Inactive state.
* INVALID - A pseudo-state that should normally never be seen. SCANNING - Scanning for a network.
* UNINITIALIZED - No connection.
RemoveAllSavedNetworks()
clears out all Saved Networks in your wifi list
this will remove all saved configurations
don't use if you have and need wifi passwords stored on device
Attached is an example program, please test and give feedback.
Credits: Tomas for helping me start this a few months ago
Thanks in Advance
Vb1992
Library Revision History:
old...... Library is version 1.0 - July 17th, 2012
New...... Library is version 1.1 - July 19th, 2012
VBWep.zip is the project (also see in this thread NJDUDE's advanced example project)
VBWep1.1.zip is the library
Attachments
Last edited: