改变无线信标间隔

时间:2012-12-04 16:42:53

标签: linux ubuntu

有没有可能的方法来改变linux中的信标间隔。我有使用ath9k驱动程序的atheros芯片组。我知道可以使用iw命令来设置信标间隔,但我仍然对使用该命令感到困惑。另外我怎么知道当前的信标间隔

我想要的是使用ubuntu 12.04在两个设备之间建立一个ad hoc网络,并且信标间隔低于正常值。

这是我运行iw命令时得到的输出。

iw iwphy2 set beacon-interval 25
Usage:  iw [options] command
Options:
    --debug     enable netlink debugging
    --version   show version (3.2)
Commands:
    help
    event [-t] [-r] [-f]
    phy
    list
    phy <phyname> info
    dev
    dev <devname> info
    dev <devname> del
    dev <devname> interface add <name> type <type> [mesh_id <meshid>] [4addr on|off] [flags <flag>*]
    phy <phyname> interface add <name> type <type> [mesh_id <meshid>] [4addr on|off] [flags <flag>*]
    dev <devname> ibss join <SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] [beacon-interval <TU>] [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [key d:0:abcde]
    dev <devname> ibss leave
    dev <devname> station dump
    dev <devname> station set <MAC address> vlan <ifindex>
    dev <devname> station set <MAC address> plink_action <open|block>
    dev <devname> station del <MAC address>
    dev <devname> station get <MAC address>
    dev <devname> survey dump
    dev <devname> mesh leave
    dev <devname> mesh join <mesh ID> [<param>=<value>]*
    dev <devname> mpath dump
    dev <devname> mpath set <destination MAC address> next_hop <next hop MAC address>
    dev <devname> mpath new <destination MAC address> next_hop <next hop MAC address>
    dev <devname> mpath del <MAC address>
    dev <devname> mpath get <MAC address>
    dev <devname> scan [-u] [freq <freq>*] [ies <hex as 00:11:..>] [ssid <ssid>*|passive]
    dev <devname> scan trigger [freq <freq>*] [ies <hex as 00:11:..>] [ssid <ssid>*|passive]
    dev <devname> scan dump [-u]
    reg get
    reg set <ISO/IEC 3166-1 alpha2>
    dev <devname> connect [-w] <SSID> [<freq in MHz>] [<bssid>] [key 0:abcde d:1:6162636465]
    dev <devname> disconnect
    dev <devname> link
    dev <devname> offchannel <freq> <duration>
    dev <devname> cqm rssi <threshold|off> [<hysteresis>]
    phy <phyname> wowlan show 
    phy <phyname> wowlan disable 
    phy <phyname> wowlan enable [any] [disconnect] [magic-packet] [gtk-rekey-failure] [eap-identity-request] [4way-handshake] [rfkill-release] [patterns <pattern>*]
    dev <devname> roc start <freq> <time>
    phy <phyname> set antenna <bitmap> | all | <tx bitmap> <rx bitmap>
    dev <devname> set txpower <auto|fixed|limit> [<tx power in mBm>]
    phy <phyname> set txpower <auto|fixed|limit> [<tx power in mBm>]
    phy <phyname> set distance <distance>
    phy <phyname> set coverage <coverage class>
    phy <phyname> set netns <pid>
    phy <phyname> set rts <rts threshold|off>
    phy <phyname> set frag <fragmentation threshold|off>
    dev <devname> set channel <channel> [HT20|HT40+|HT40-]
    phy <phyname> set channel <channel> [HT20|HT40+|HT40-]
    dev <devname> set freq <freq> [HT20|HT40+|HT40-]
    phy <phyname> set freq <freq> [HT20|HT40+|HT40-]
    phy <phyname> set name <new name>
    dev <devname> set peer <MAC address>
    dev <devname> set 4addr <on|off>
    dev <devname> set type <type>
    dev <devname> set meshid <meshid>
    dev <devname> set monitor <flag>*
    dev <devname> set mesh_param <param>=<value> [<param>=<value>]*
    dev <devname> set power_save <on|off>
    dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
    dev <devname> get mesh_param [<param>]
    dev <devname> get power_save <param>

You can omit the 'phy' or 'dev' if the identification is unique,
e.g. "iw wlan0 info" or "iw phy0 info". (Don't when scripting.)

Do NOT screenscrape this tool, we don't consider its output stable.

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

在ad-hoc模式下,除非再次离开并加入,否则无法更改信标间隔。

iw dev <devname> ibss join <SSID> <freq in MHz> [HT20|HT40+|HT40-|NOHT] [fixed-freq] [<fixed bssid>] [beacon-interval <TU>] [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [key d:0:abcde]

在AP模式下,hostapd为您设置间隔: 在你的hostapd.conf中设置 的 beacon_int = 1000 间隔1000ms = 1s。

在站点模式下,通过wpa_supplicant的设置设置间隔。