2011-01-13 94 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)。

相關問題