B4A Library VBWep 1.0 Library (WEP)

westingenieria

Active Member
Licensed User
Longtime User
I have a temporal solution for this.. i manage the duplicate SSID in b4a using arrays. If anyone want to know i can share the code.

 

suciwulans

Active Member
Licensed User
Longtime User
i tested the example project in this thread, but didn't work.
"no network found"
and when "refresh" still show up no network found.
i don't know what's the problem
 

fabpalma

Member
Licensed User
Longtime User
Hi Vb1992,

there is a way to get an event when a new network is available ? I would get notice when a new Wifi is available without doing a time scheduled scan ...

Thanks
Fab
 

Turbo3

Active Member
Licensed User
Longtime User
I get a divide by zero error using sample 1.2 with library 1.1 and 1.5. It fails on line 120 "Buffer = MyWiFi.GetWifiList" and log shows it gets my network data but dies when it sees my neighbors network.

B4X:
** Activity (main) Create, isFirst = true **


###################


## GetWifiList  ##
###################
-----Receiving available wifi's


###################
SSID:  VorlanF
VorlanF ::: [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP] ::: 44
###################
###################
SSID:  towers-wlan
main_refresh (B4A line: 120)


Buffer = MyWiFi.GetWifiList
java.lang.ArithmeticException: divide by zero


    at android.net.wifi.WifiManager.calculateSignalLevel(WifiManager.java:840)
    at vb.connect.Mywifi.Mywifi.GetWifiList(Mywifi.java:465)
    at vbwep.wifi.cool.main._refresh(main.java:491)
    at vbwep.wifi.cool.main._activity_create(main.java:347)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
    at vbwep.wifi.cool.main.afterFirstLayout(main.java:98)
    at vbwep.wifi.cool.main.access$100(main.java:16)
    at vbwep.wifi.cool.main$WaitForLayout.run(main.java:76)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3683)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)


    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
    at dalvik.system.NativeStart.main(Native Method)

This library seems to be the only one that has the functions I need but with this bug it will not work.
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Tried to connect to a network that was known, manually disconnected. Android 4.2.
Lib is 1.1 from the first post, but in the lib list is shown as v 1.00.
B4A 3.80.

B4X:
###################
** Activity (main) Pause, UserClosed = false **


** Activity (connect) Create, isFirst = true **


** Activity (connect) Resume **


---------Starting VBWIFI now


----Entered Network info


--SSID PASSWORD: [password]
------Done new conf.WifiConfiguration.
...........entering wifiManager.
-----Adding network: wifiManager.addNetwork(conf);
-----Receiving current wifi list
java.lang.NullPointerException
    at vb.connect.Mywifi.Mywifi.cWEP(Mywifi.java:179)
    at peacemaker.wificonnecttest.connect._connectbutton_click(connect.java:350)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:162)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66)
    at android.view.View.performClick(View.java:4209)
    at android.view.View$PerformClick.run(View.java:17431)
    at android.os.Handler.handleCallback(Handler.java:725)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:153)
    at android.app.ActivityThread.main(ActivityThread.java:5297)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    at dalvik.system.NativeStart.main(Native Method)
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Also error at
B4X:
wfSignal.BSSID = WiFiData(3)
no such 3rd item :-(

Please, who is interested - try my project, attached.
 

Attachments

  • b4a3.8_project.zip
    10 KB · Views: 366

Harish Kumar Arya

Member
Licensed User
Longtime User
Hi vb1992 & NJ,

I have just tried using the sample apps(version 1.1 and 1.2) and also the APK with the library(1.5 BETA). I can get the list of all WiFi networks, but when i try to connect to one of them, I get the following error:

android.system.ErrNoException: recvfrom failed: ETIMEDOUT (Connection timed out).

Any pointers or things that I can try?

TIA,

Harish
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…