Page 1 of 1

"WiFi Available" fails in 5GHz band

Posted: 05 Apr 2017 17:28
by IGY
The condition "WiFi Available" only detects my WLAN when running the router in the 2.4GHz band.
If I run the network in the 5GHz band, then the condition won't detect the WLAN until after I once connected manually to the WLAN.

Android 6.0.1 on Galaxy Note 4, FRITZ!Box 7270v2 on Fritz!OS 6.06.

Re: "WiFi Available" fails in 5GHz band

Posted: 06 Apr 2017 18:34
by Martin
Hi,

The condition makes no distinction between the frequency of the WiFi network at all, it just asks the system about the currently available ones.
When you open the condition and press the [...]-button, is the SSID listed?

Regards,
Martin

Re: "WiFi Available" fails in 5GHz band

Posted: 08 Apr 2017 08:45
by IGY
Thanks Martin. The SSID is always visible in the editor. I fully agree and have no explanation either, other than suspecting a Samsung firmware bug. Where does the Automagic condition editor read the WiFi SSIDs from? I even deleted the SSID from the phones cached WiFi list and from the condition. Then I re-added it to the condition after I reconnected to the 5GHz net. I suspect some cache issue...

Re: "WiFi Available" fails in 5GHz band

Posted: 09 Apr 2017 19:19
by Martin
The popup dialog in the action uses the current scan results (same as the condition when executed in a flow) but also adds the configured WiFi networks since this is usually what is important when configuration takes place, even if it's not currently available in the scan results.
Maybe the scan result simply does not contain your SSID at all (which would likely be a bug of the ROM). Is there anything special about the SSID? Does it use any unusual special characters?

Regards,
Martin

Re: "WiFi Available" fails in 5GHz band

Posted: 11 Apr 2017 09:00
by IGY
I suspect that the current scan results which the phone is presenting to Automagic simply don't contain that network in the particular situation. I kept the SSID simple and short, without special characters and haven't had problems with any devices in years. The following scenario leads to the problem:

The phone's WiFi is off.
The trigger "WiFi Scan Results Available" eventually fires and the following condition "WiFi Available" will evaluate to true, if the SSID of a trusted network is present. In this case the following command is "Enable WiFi Access Point" using {global_SSID}.

The above mechanism has been working reliably with all of my trusted networks for a few years, until I recently reconfigured my home network to use 5GHz exclusively. It still works for all other trusted networks. At home it only works after I activate WiFi manually once. It will then continue to work even after I turn WiFi off again, but only for a limited time. That's why I suspect some caching issue contributing to the problem.

I need to do more testing, but that won't happen before later next week.

Thanks
Christoph

Re: "WiFi Available" fails in 5GHz band

Posted: 25 Apr 2017 15:08
by IGY
Indeed the phone does not include any 5GHz networks in its scan results if WiFi is turned off, except for the one 5GHz network that it was recently connected to. How long it remembers such networks I don't know and is not really relevant to me.

Whether this is a bug in the phone FW, desired behavior, or a bug of that particular Android 6 release also remains unclear, but the answer won't help me anyway. I guess I will have to wait until I get a new phone with Android 7 or 8 early next year.

Finally here are two san result sets captured in the same aerea, the first set has WiFi disabled:


25.04.2017 15:23:12.182 [WiFi Frequency] (name removed), xx:xx:xx:xx:ab:cd -->2447
25.04.2017 15:23:12.188 [WiFi Frequency] (name removed), xx:xx:xx:xx:2c:d3-->2462
25.04.2017 15:23:12.193 [WiFi Frequency] (name removed), xx:xx:xx:xx:c6:78 -->2432
25.04.2017 15:23:12.199 [WiFi Frequency] (name removed), xx:xx:xx:xx:d0:27 -->2437
25.04.2017 15:23:12.204 [WiFi Frequency] (name removed), xx:xx:xx:xx:3b:c1 -->2462
25.04.2017 15:23:12.209 [WiFi Frequency] (name removed), xx:xx:xx:xx:18:f8 -->2437
25.04.2017 15:23:12.214 [WiFi Frequency] (name removed), xx:xx:xx:xx:42:56 -->2417
25.04.2017 15:23:12.218 [WiFi Frequency] (name removed), xx:xx:xx:xx:10:47 -->2437
25.04.2017 15:23:12.222 [WiFi Frequency] (name removed), xx:xx:xx:xx:18:fa -->2437
25.04.2017 15:23:12.226 [WiFi Frequency] (name removed), xx:xx:xx:xx:35:1a-->2462
25.04.2017 15:23:12.229 [WiFi Frequency] (name removed), xx:xx:xx:xx:62:18 -->2462
25.04.2017 15:23:12.234 [WiFi Frequency] (name removed), xx:xx:xx:xx:99:a4 -->2412
25.04.2017 15:23:12.241 [WiFi Frequency] (name removed), xx:xx:xx:xx:8b:bc-->2412
25.04.2017 15:23:12.246 [WiFi Frequency] (name removed), xx:xx:xx:xx:24:ef -->2412
25.04.2017 15:23:12.251 [WiFi Frequency] (name removed), xx:xx:xx:xx:9e:86 -->2412
25.04.2017 15:23:12.261 [WiFi Frequency] (name removed), xx:xx:xx:xx:f3:a5 -->2462
25.04.2017 15:23:12.266 [WiFi Frequency] (name removed), xx:xx:xx:xx:84:34-->2462
25.04.2017 15:23:12.272 [WiFi Frequency] (name removed), xx:xx:xx:xx:86:0b -->2422
25.04.2017 15:23:12.277 [WiFi Frequency] (name removed), xx:xx:xx:xx:c7:fc -->2437
25.04.2017 15:23:12.281 [WiFi Frequency] (name removed), xx:xx:xx:xx:28:67 -->2462
25.04.2017 15:23:12.285 [WiFi Frequency] (name removed), xx:xx:xx:xx:18:fb -->2437
25.04.2017 15:23:12.289 [WiFi Frequency] (name removed), xx:xx:xx:xx:b3:16 -->2412
25.04.2017 15:23:12.294 [WiFi Frequency] (name removed), xx:xx:xx:xx:f3:a6 -->5300
25.04.2017 15:23:12.297 [WiFi Frequency] (name removed), xx:xx:xx:xx:56:5a -->2462
25.04.2017 15:23:12.301 [WiFi Frequency] (name removed), xx:xx:xx:xx:5a:22-->2462
25.04.2017 15:23:12.305 [WiFi Frequency] (name removed), xx:xx:xx:xx:f7:c8 -->2462
25.04.2017 15:23:12.310 [WiFi Frequency] (name removed), xx:xx:xx:xx:09:a9 -->2462
25.04.2017 15:23:12.311 [WiFi Frequency] End executing action 'Script:

25.04.2017 15:23:21.552 [WiFi Frequency] (name removed), xx:xx:xx:xx:ab:cd -->2447
25.04.2017 15:23:21.555 [WiFi Frequency] (name removed), xx:xx:xx:xx:c6:78 -->2432
25.04.2017 15:23:21.559 [WiFi Frequency] (name removed), xx:xx:xx:xx:d0:27 -->2437
25.04.2017 15:23:21.562 [WiFi Frequency] (name removed), xx:xx:xx:xx:3b:c1 -->2462
25.04.2017 15:23:21.566 [WiFi Frequency] (name removed), xx:xx:xx:xx:42:56 -->2417
25.04.2017 15:23:21.569 [WiFi Frequency] (name removed), xx:xx:xx:xx:18:fa -->2437
25.04.2017 15:23:21.572 [WiFi Frequency] (name removed), xx:xx:xx:xx:35:1a-->2462
25.04.2017 15:23:21.576 [WiFi Frequency] (name removed), xx:xx:xx:xx:62:18 -->2462
25.04.2017 15:23:21.580 [WiFi Frequency] (name removed), xx:xx:xx:xx:8b:bc-->2412
25.04.2017 15:23:21.583 [WiFi Frequency] (name removed), xx:xx:xx:xx:24:ef -->2412
25.04.2017 15:23:21.586 [WiFi Frequency] (name removed), xx:xx:xx:xx:9e:86 -->2412
25.04.2017 15:23:21.590 [WiFi Frequency] (name removed), xx:xx:xx:xx:f3:a5 -->2462
25.04.2017 15:23:21.593 [WiFi Frequency] (name removed), xx:xx:xx:xx:28:67 -->2462
25.04.2017 15:23:21.597 [WiFi Frequency] (name removed), xx:xx:xx:xx:18:fb -->2437
25.04.2017 15:23:21.600 [WiFi Frequency] (name removed), xx:xx:xx:xx:b3:16 -->2412
25.04.2017 15:23:21.604 [WiFi Frequency] (name removed), xx:xx:xx:xx:f3:a6 -->5300
25.04.2017 15:23:21.607 [WiFi Frequency] (name removed), xx:xx:xx:xx:f7:c8 -->2462
25.04.2017 15:23:21.614 [WiFi Frequency] (name removed), xx:xx:xx:xx:09:a9 -->2462
25.04.2017 15:23:21.618 [WiFi Frequency] (name removed), xx:xx:xx:xx:b3:17 -->5240
25.04.2017 15:23:21.622 [WiFi Frequency] (name removed), xx:xx:xx:xx:ce:1a-->2422
25.04.2017 15:23:21.626 [WiFi Frequency] (name removed), xx:xx:xx:xx:99:a7 -->5500
25.04.2017 15:23:21.630 [WiFi Frequency] (name removed), xx:xx:xx:xx:62:19 -->5580
25.04.2017 15:23:21.636 [WiFi Frequency] (name removed), xx:xx:xx:xx:09:a9 -->2462
25.04.2017 15:23:21.641 [WiFi Frequency] (name removed), xx:xx:xx:xx:e8:09 -->2412
25.04.2017 15:23:21.650 [WiFi Frequency] (name removed), xx:xx:xx:xx:b6:e9 -->2447
25.04.2017 15:23:21.655 [WiFi Frequency] (name removed), xx:xx:xx:xx:8b:ba-->5180
25.04.2017 15:23:21.663 [WiFi Frequency] (name removed), xx:xx:xx:xx:9e:88 -->5580
25.04.2017 15:23:21.668 [WiFi Frequency] (name removed), xx:xx:xx:xx:20:dd-->5500
25.04.2017 15:23:21.675 [WiFi Frequency] (name removed), xx:xx:xx:xx:e8:0b -->5580
25.04.2017 15:23:21.680 [WiFi Frequency] (name removed), xx:xx:xx:xx:3b:ea -->2422
25.04.2017 15:23:21.685 [WiFi Frequency] (name removed), xx:xx:xx:xx:09:aa -->5500
25.04.2017 15:23:21.690 [WiFi Frequency] (name removed), xx:xx:xx:xx:14:12-->5300
25.04.2017 15:23:21.696 [WiFi Frequency] (name removed), xx:xx:xx:xx:0a:bc -->2412
25.04.2017 15:23:21.701 [WiFi Frequency] (name removed), xx:xx:xx:xx:76:3f -->2452
25.04.2017 15:23:21.706 [WiFi Frequency] (name removed), xx:xx:xx:xx:99:a8 -->5500
25.04.2017 15:23:21.716 [WiFi Frequency] (name removed), xx:xx:xx:xx:09:a9 -->2462
25.04.2017 15:23:21.722 [WiFi Frequency] (name removed), xx:xx:xx:xx:e8:09 -->2412
25.04.2017 15:23:21.730 [WiFi Frequency] (name removed), xx:xx:xx:xx:99:a5 -->2412
25.04.2017 15:23:21.736 [WiFi Frequency] (name removed), xx:xx:xx:xx:e8:09 -->2412
25.04.2017 15:23:21.736 [WiFi Frequency] End executing action 'Script:

Re: "WiFi Available" fails in 5GHz band

Posted: 29 Apr 2017 16:48
by IGY
I dug around some more and found reports about sloppy implementations of 5GHz support on some Android devices. Like some other devices, my Note 4 returns FALSE when calling is5GHzBandSupported(), even though it does support 5GHz. Maybe that's where things start going wrong:

wifiManager=callJavaMethod(getContext(), "android.content.Context", "getSystemService(java.lang.String)", "wifi");
bool5GHzSupported=callJavaMethod(wifiManager, "android.net.wifi.WifiManager","is5GHzBandSupported()");
log("5GHzSupported: "+bool5GHzSupported);