B4A Library Wifi Manager Library

For one of my projects I created a little library to have access to 3 wifi manager functions:

Inquire the state of wifi (switched on or off), switch wifi on or off and start a wifi scan.

Here is a sample how you can use it:

Dim jhw As JhWifi

' Initialize wifi
jhw.Initialize()

' Is wifi enabled, if not enable it
If jhw.Enabled = False Then
jhw.Enabled = True
End If
' Start wifi scan
jhw.startscan()
' Disable wifi
jhw.Enabled = False

Please use it for whatever you need it.

With kindest regards
Joerg
 

Attachments

  • Jhwifi.1.2.zip
    4.2 KB · Views: 2,093
Last edited:

CSP

Member
Licensed User
Longtime User
What is the string or event that is returned after calling 'startscan'?

I'm making a list that updates with any wifi in range, thank you.
 

Theera

Well-Known Member
Licensed User
Longtime User
Hi joehil,
Do you have some example for test? I think I must use your library 1.2 in the future.
 

Firpas

Active Member
Licensed User
Longtime User
Hello Joehil.

I have a problem with my new application and a bit special stage.

The application must connect to a specific wifi I know the SSID and BSSID (MacAddress), for which use the library "jhWifi"

The problem is that there are times when different wifis coincide with the same SSID, BSSID though distinct, so that the device only shows one.

When executing the method "enableNetwork" of jhWifi, I have no certainty to connect with the desired wifi.

I think the solution would be to add a "findConfiguredNetwork2 (BSSID as string) method in the jhWifi library.

Another possibility is to remove unwanted wifis of ConfiguredNetwork list.

Thanks for your help
 

Peter van Hoof

Member
Licensed User
Longtime User
Top