0

是否有任何可能的方法来更改 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.

感谢您的帮助

4

1 回答 1

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 的设置来设置的。

于 2013-01-28T15:55:51.777 回答