虚拟wifi的android机器连接问题
发布网友
发布时间:2022-04-23 07:11
我来回答
共1个回答
热心网友
时间:2022-06-17 07:43
WifiManager wifi_service = (WifiManager) getSystemService(WIFI_SERVICE);
WifiInfo wifiinfo = wifi_service.getConnectionInfo();
Log.v("getBSSID", wifiinfo.getBSSID() + "");
Log.v("getHiddenSSID", wifiinfo.getBSSID() + "");
Log.v("getIpAddress", wifiinfo.getIpAddress() + "");
Log.v("getLinkSpeed", wifiinfo.getLinkSpeed() + "");
Log.v("getMacAddress", wifiinfo.getMacAddress() + "");
Log.v("getNetworkId", wifiinfo.getNetworkId() + "");
Log.v("getRssi", wifiinfo.getRssi() + "");
Log.v("getSSID", wifiinfo.getSSID() + "");
DhcpInfo dhcpinfo = wifi_service.getDhcpInfo();
Log.v("ipaddr", dhcpinfo.ipAddress + "");
Log.v("gatewau", dhcpinfo.gateway + "");
Log.v("netmask", dhcpinfo.netmask + "");
Log.v("dns1", dhcpinfo.dns1 + "");
Log.v("dns1", dhcpinfo.dns2 + "");
Log.v("serverAddress", dhcpinfo.serverAddress + "");