我正在使用 WifiManager 在代码中设置 Wifi 连接,但该连接似乎使用 TKIP 作为组密码而不是 CCMP。这是正常的吗?会不会是路由器的问题?我正在像这样设置 WifiConfig:
wifiConfig.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
wifiConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
wifiConfig.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
wifiConfig.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
wifiConfig.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
wifiConfig.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
wifiConfig.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
wifiConfig.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
wifiConfig.preSharedKey = "\"".concat(password).concat("\"");
当我在设备上观看与 wpa_cli 的连接时,我看到:
IFNAME=wlan0 <3>WPA: Key negotiation completed with 50:6a:03:16:8c:18 [PTK=CCMP GTK=TKIP]
不应该是最后一部分GTK=CCMP
吗?据我了解,组密码用于广播消息,成对密码用于直接通信。为什么两者会不同?