Search code examples
androidcwifi

How to determine a wifi channel number used by wifi ap/network?


Ive discovered that several android wifi-apps (WiFi Manager, WiFi Analyzer) shows a channel number of WiFi network additionally to BSSID/SSID etc. But I can't find any info on how they do it. The only thing I know is I can get some wifi frequency. Maybe they determine a channel corresponding to that frequency? Is there a way to detect channel of wifi network in android at all? Of course this info is not a big deal and I can live without it :) but still i'm curious...


Solution

  • According to Radio-Electronics.com, channel number is truly related with frequency.

    CHA LOWER   CENTER  UPPER
    NUM FREQ    FREQ    FREQ
        MHZ     MHZ     MHZ
      1 2401    2412    2423
      2 2406    2417    2428
      3 2411    2422    2433
      4 2416    2427    2438
      5 2421    2432    2443
      6 2426    2437    2448
      7 2431    2442    2453
      8 2436    2447    2458
      9 2441    2452    2463
     10 2446    2457    2468
     11 2451    2462    2473
     12 2456    2467    2478
     13 2461    2472    2483
     14 2473    2484    2495
    

    For Android, ScanResult contains the frequency of the channel.