2011-01-13 104 views

回答

3

它是依赖于操作系统的,最简单的方法可能是刚掏出和exec系统的的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 
+0

谢谢,这可能是最简单的方法。 – Dororo 2011-01-13 19:04:02

5

您需要使用Native wifi API。你可以找到样本here(包括查询你所问的SSID)。

相关问题