addded netlink and iw based wifi scanner for linux
This commit is contained in:
30
sensors/radio/scan/WiFiChannels.h
Normal file
30
sensors/radio/scan/WiFiChannels.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef INDOOR_WIFICHANNELS_H
|
||||
#define INDOOR_WIFICHANNELS_H
|
||||
|
||||
class WiFiChannels {
|
||||
|
||||
public:
|
||||
|
||||
static int freqToChannel(const int freq) {
|
||||
switch(freq) {
|
||||
case 2412: return 1;
|
||||
case 2417: return 2;
|
||||
case 2422: return 3;
|
||||
case 2427: return 4;
|
||||
case 2432: return 5;
|
||||
case 2437: return 6;
|
||||
case 2442: return 7;
|
||||
case 2447: return 8;
|
||||
case 2452: return 9;
|
||||
case 2457: return 10;
|
||||
case 2462: return 11;
|
||||
case 2467: return 12;
|
||||
case 2472: return 13;
|
||||
case 2484: return 14;
|
||||
}
|
||||
throw "error";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // INDOOR_WIFICHANNELS_H
|
||||
Reference in New Issue
Block a user