我想获取计算机当前连接的无线网络的名称 (SSID)。我已经查看了 IP Helper API,但它似乎拥有除此之外的所有内容(DNS 服务器、IP 地址......)。任何帮助,将不胜感激。
问问题
6030 次
2 回答
4
它依赖于操作系统,最简单的方法可能是直接执行系统的 netsh 或等效程序,然后 grep 结果
例如。在 Windows 上“netsh wlan show int”给出
There is 1 interface on the system:
Name : Wireless Network Connection
Description : Broadcom 802.11g Network Adapter
GUID : 1de52c34-2e59-46c4-ae8d-8d442c44dfd
Physical address : 00:00:56:b6:ad:00
State : connected
SSID : xxx
BSSID : 00:00:5b:27:83:ea
Network type : Infrastructure
Radio type : 802.11g
Authentication : Open
Cipher : WEP
Connection mode : Auto Connect
Channel : 6
Receive rate (Mbps) : 54
Transmit rate (Mbps) : 54
Signal : 90%
Profile : xxx
Hosted network status : Not started
于 2011-01-13T18:14:41.657 回答