Android Question ML WiFi 4.3 connection issue

Nitin Joshi

Active Member
Licensed User
Hi, My project was working very well when i was using MLWiFi library 3.08 and manifest editor had below sdkversion range.
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="27"/>

Today, I have updated MLWiFi lbirary to 4.3 and updated manifest editor as below...
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>

As per new requirement of ML WiFi library V4.3 to connect SSID, i have updated code in my project as well. (Code is given for the reference

I am facing 2 issues..

1) Enabling WiFi APP does not enable WiFi
2) Connect WiFi : Whenever i try to connect any SSID, my phone throws below error as attached screenshot.
Note; Before this error, a momentarily message flashes (it is very difficult to note as message flashes for fraction of second). I think message has 3 options, Cancel - Save - Connect

My mobile Android version is 10.

Connect WiFi Code:
Sub btnConnect_Click
    If WiFi.isWifiEnabled=False Then
        WiFi.EnableWifi(True)
    End If
    WiFi.saveWifiAP("Joshi",2,"123456",false,60000)
    WiFi.connectWifiAP("Joshi",2,"123456",60000)
End Sub
 

Attachments

  • 2. Error Message while connecting SSID.jpeg
    18.5 KB · Views: 365

Computersmith64

Well-Known Member
Licensed User
Longtime User

MLwifi Library Updated to v4.00

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User

I don't have a router that can be configured with WPA-PSK/WPA2-PSK AES, but I set up one with WPA2-PSK AES & my test device connected fine. Then I set it up with WPA-PSK AES & it connected fine to that as well. I don't know - there could be something with a WPA-PSK/WPA-PSK AES than Android doesn't like.

- Colin.
 
Upvote 0

Nitin Joshi

Active Member
Licensed User
Dear Colin,
Thanks for your continuous support. Really, Android Q version (API 29) has made WiFi project very tough.

1) As I have mentioned before I could connect home wifi by changing security type in router. I tried to follow same for ESP8266 but could not find syntax to change security type. You had mentioned earlier that you could connect to ESP8266 as well. Can you share some more details like what you did to set ESP8266 as softAP? I am using Arduino to program ESP8266 and command is simple WiFi.softAP(SSID, Password), there is no way to set security type.

2) Did you experience that APP prompted Cancel/Connect options before connecting to SSID?

MLwifi Library Updated to v4.00
Can you please check my updated project to detect connection status?
 

Attachments

  • 2.1 Wifi_Connection_V1.zip
    12.7 KB · Views: 259
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I don't use the Arduino IDE (I use B4R), but a quick Google search tells me that if you use a password at least 8 characters long, the ESP8266 will set up the AP using WPA2-PSK security.

2) Did you experience that APP prompted Cancel/Connect options before connecting to SSID?
I've said multiple times previously that this is the expected behavior on Android Q+ devices. There is no way to circumvent it.

Can you please check my updated project to detect connection status?
The code looks correct to me, but I haven't run it to test it. Have you tried it?

- Colin.
 
Upvote 0

Nitin Joshi

Active Member
Licensed User
this is the expected behavior on Android Q+ devices
Actually, I wanted switching between two SSID without knowing user, I mean, my APP selects SSID based on some logic however prompting will lose the beauty of my APP feature.

By the way, If i set SDK target version to 27 and use ML Wifi library version 3 then What will i lose/drawback of doing so?? Anyway, Android version Q works with it.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
By the way, If i set SDK target version to 27 and use ML Wifi library version 3 then What will i lose/drawback of doing so?? Anyway, Android version Q works with it.
You could do that as long as you're not uploading the app to play store because the minimum target API is 29 for new apps & updates & will be 30 for new apps from August & updates from November.

- Colin.
 
Upvote 0

Nitin Joshi

Active Member
Licensed User
You could do that as long as you're not uploading the app to play store because the minimum target API is 29 for new apps
Ohhh, I See. Actually, I am a telecom professional, not a hardcore software professional. I am now in learning state.

Appreciate if you can share me B4R sample project wherein ESP8266 is working as softAP?

I am finding reason why ML4.0 library can not connect to ESP8266 when AP is secured, can connect to OPEN network successfully.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…