Xubuntu16.04系统中安装create_ap创建无线AP:
https://blog.csdn.net/qq_45445740/article/details/133972642?spm=1001.2014.3001.5501
目录
- 1.create_ap.conf 配置文件解析
- 2.关于信号强度和延时
- 2.1 信号强度
- 2.2 信号延时
- 2.3 网络延时测试工具推荐——PingPlotter
- 3.确定当前网卡是否支持5G网络
- 4.通过create_ap修改信道
- 5.坑一:芯片支持5G,网卡不支持
1.create_ap.conf 配置文件解析
/etc/create_ap.conf
CHANNEL=default:无线热点的频道设置为默认信道。
GATEWAY=10.0.0.1:设置无线热点的网关地址为10.0.0.1。
WPA_VERSION=2:设置无线热点使用的WPA版本为2。
ETC_HOSTS=0:禁用/etc/hosts文件的解析。
DHCP_DNS=gateway:设置无线热点的DHCP DNS服务器为网关地址。
NO_DNS=0:启用无线热点的DNS服务器。
NO_DNSMASQ=0:启用DNSMASQ服务。
HIDDEN=0:无线热点的SSID不隐藏。
MAC_FILTER=0:禁用MAC地址过滤。
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept:指定MAC地址过滤的白名单文件路径。
ISOLATE_CLIENTS=0:不隔离连接到无线热点的客户端之间的通信。
SHARE_METHOD=nat:使用NAT方式进行无线热点的Internet共享。
IEEE80211N=0:禁用802.11n标准。(2.4G)
IEEE80211AC=0:禁用802.11ac标准。(5G)
HT_CAPAB=[HT40+]:启用HT40+高级设置。
VHT_CAPAB=:未指定VHT_CAPAB。
DRIVER=nl80211:使用nl80211驱动程序。
NO_VIRT=0:启用虚拟无线接口。
COUNTRY=:未指定国家代码。
FREQ_BAND=2.4:设置频段为2.4GHz。
NEW_MACADDR=:未指定新的MAC地址。
DAEMONIZE=0:不将create_ap进程置于后台运行。
NO_HAVEGED=0:启用haveged服务。
WIFI_IFACE=wlp3s0:指定用于创建无线热点的无线网卡接口。
INTERNET_IFACE=enp1s0:指定用于连接到Internet的有线网卡接口。
SSID=0125:设置无线热点的SSID为0125。
PASSPHRASE=12345678:设置无线热点的密码为12345678。
USE_PSK=0:禁用预共享密钥(PSK)。
2.关于信号强度和延时
2.1 信号强度
推荐测试信号强度的APP
2.2 信号延时
有时候明明信号强度很好,但延时却很高,可能是当前信道的网络较多。
要判断哪个信道不拥堵,可以考虑以下几个因素:
- 信道的使用情况:观察每个信道的使用情况,特别是附近的WIFI网络和其他无线设备。如果某个信道上有多个网络同时使用,那么该信道可能会拥堵。相反,如果某个信道上没有或只有少数网络使用,那么该信道可能不拥堵。
- 信道的干扰情况:除了WIFI网络,还要注意其他可能引起干扰的设备,如蓝牙设备、微波炉等。这些设备可能会占用特定的频段,导致信道拥堵。因此,选择一个与这些设备干扰较少的信道可能更好。
- 信道的频率:不同信道的频率可能会有所不同。一般来说,较高频率的信道可能会有更高的带宽和速度,但在传输距离上可能较短(5G)。因此,如果你的设备距离WIFI路由器较近,可以考虑选择较高频率的信道。
综合考虑以上因素,你可以选择一个较少拥堵、干扰较少且适合你的设备的信道。在给定的信息中,你可以观察每个信道的频率和可能的干扰源,并根据这些信息来判断哪个信道可能不拥堵。
使用iwlist
命令来列出无线网卡支持的所有信道:
sudo iwlist wlp3s0 channel
root@bossdog-2177018234:/etc# iwlist wlp3s0 channel
wlp3s0 32 channels in total; available frequencies :Channel 01 : 2.412 GHzChannel 02 : 2.417 GHzChannel 03 : 2.422 GHzChannel 04 : 2.427 GHzChannel 05 : 2.432 GHzChannel 06 : 2.437 GHzChannel 07 : 2.442 GHzChannel 08 : 2.447 GHzChannel 09 : 2.452 GHzChannel 10 : 2.457 GHzChannel 11 : 2.462 GHzChannel 12 : 2.467 GHzChannel 13 : 2.472 GHzChannel 36 : 5.18 GHzChannel 40 : 5.2 GHzChannel 44 : 5.22 GHzChannel 48 : 5.24 GHzChannel 52 : 5.26 GHzChannel 56 : 5.28 GHzChannel 60 : 5.3 GHzChannel 64 : 5.32 GHzChannel 100 : 5.5 GHzChannel 104 : 5.52 GHzChannel 108 : 5.54 GHzChannel 112 : 5.56 GHzChannel 116 : 5.58 GHzChannel 120 : 5.6 GHzChannel 124 : 5.62 GHzChannel 128 : 5.64 GHzChannel 132 : 5.66 GHzChannel 136 : 5.68 GHzChannel 140 : 5.7 GHz
2.3 网络延时测试工具推荐——PingPlotter
https://blog.csdn.net/qq_45946755/article/details/104594683
3.确定当前网卡是否支持5G网络
iw reg get
iw list
root@bossdog-2177018234:/etc# iw list
Wiphy phy0max # scan SSIDs: 20max scan IEs length: 425 bytesRetry short limit: 7Retry long limit: 4Coverage class: 0 (up to 0m)Device supports RSN-IBSS.Device supports AP-side u-APSD.Device supports T-DLS.Supported Ciphers:* WEP40 (00-0f-ac:1)* WEP104 (00-0f-ac:5)* TKIP (00-0f-ac:2)* CCMP (00-0f-ac:4)* CMAC (00-0f-ac:6)Available Antennas: TX 0 RX 0Supported interface modes:* IBSS* managed* AP* AP/VLAN* monitor* P2P-client* P2P-GO* P2P-deviceBand 1:Capabilities: 0x11efRX LDPCHT20/HT40SM Power Save disabledRX HT20 SGIRX HT40 SGITX STBCRX STBC 1-streamMax AMSDU length: 3839 bytesDSSS/CCK HT40Maximum RX AMPDU length 65535 bytes (exponent: 0x003)Minimum RX AMPDU time spacing: 4 usec (0x05)HT TX/RX MCS rate indexes supported: 0-15Bitrates (non-HT):* 1.0 Mbps* 2.0 Mbps (short preamble supported)* 5.5 Mbps (short preamble supported)* 11.0 Mbps (short preamble supported)* 6.0 Mbps* 9.0 Mbps* 12.0 Mbps* 18.0 Mbps* 24.0 Mbps* 36.0 Mbps* 48.0 Mbps* 54.0 MbpsFrequencies:* 2412 MHz [1] (22.0 dBm)* 2417 MHz [2] (22.0 dBm)* 2422 MHz [3] (22.0 dBm)* 2427 MHz [4] (22.0 dBm)* 2432 MHz [5] (22.0 dBm)* 2437 MHz [6] (22.0 dBm)* 2442 MHz [7] (22.0 dBm)* 2447 MHz [8] (22.0 dBm)* 2452 MHz [9] (22.0 dBm)* 2457 MHz [10] (22.0 dBm)* 2462 MHz [11] (22.0 dBm)* 2467 MHz [12] (22.0 dBm) (no IR)* 2472 MHz [13] (22.0 dBm) (no IR)Band 2:Capabilities: 0x11efRX LDPCHT20/HT40SM Power Save disabledRX HT20 SGIRX HT40 SGITX STBCRX STBC 1-streamMax AMSDU length: 3839 bytesDSSS/CCK HT40Maximum RX AMPDU length 65535 bytes (exponent: 0x003)Minimum RX AMPDU time spacing: 4 usec (0x05)HT TX/RX MCS rate indexes supported: 0-15VHT Capabilities (0x038071b0):Max MPDU length: 3895Supported Channel Width: neither 160 nor 80+80RX LDPCshort GI (80 MHz)TX STBCSU BeamformeeVHT RX MCS set:1 streams: MCS 0-92 streams: MCS 0-93 streams: not supported4 streams: not supported5 streams: not supported6 streams: not supported7 streams: not supported8 streams: not supportedVHT RX highest supported: 0 MbpsVHT TX MCS set:1 streams: MCS 0-92 streams: MCS 0-93 streams: not supported4 streams: not supported5 streams: not supported6 streams: not supported7 streams: not supported8 streams: not supportedVHT TX highest supported: 0 MbpsBitrates (non-HT):* 6.0 Mbps* 9.0 Mbps* 12.0 Mbps* 18.0 Mbps* 24.0 Mbps* 36.0 Mbps* 48.0 Mbps* 54.0 MbpsFrequencies:* 5180 MHz [36] (22.0 dBm) (no IR)* 5200 MHz [40] (22.0 dBm) (no IR)* 5220 MHz [44] (22.0 dBm) (no IR)* 5240 MHz [48] (22.0 dBm) (no IR)* 5260 MHz [52] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5280 MHz [56] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5300 MHz [60] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5320 MHz [64] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5500 MHz [100] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5520 MHz [104] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5540 MHz [108] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5560 MHz [112] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5580 MHz [116] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5600 MHz [120] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5620 MHz [124] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5640 MHz [128] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5660 MHz [132] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5680 MHz [136] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5700 MHz [140] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5720 MHz [144] (22.0 dBm) (no IR, radar detection)DFS state: usable (for 2401 sec)DFS CAC time: 0 ms* 5745 MHz [149] (22.0 dBm) (no IR)* 5765 MHz [153] (22.0 dBm) (no IR)* 5785 MHz [157] (22.0 dBm) (no IR)* 5805 MHz [161] (22.0 dBm) (no IR)* 5825 MHz [165] (22.0 dBm) (no IR)Supported commands:* new_interface* set_interface* new_key* start_ap* new_station* new_mpath* set_mesh_config* set_bss* authenticate* associate* deauthenticate* disassociate* join_ibss* join_mesh* remain_on_channel* set_tx_bitrate_mask* frame* frame_wait_cancel* set_wiphy_netns* set_channel* set_wds_peer* tdls_mgmt* tdls_oper* start_sched_scan* probe_client* set_noack_map* register_beacons* start_p2p_device* set_mcast_rate* connect* disconnect* channel_switch* Unknown command (104)* Unknown command (105)* Unknown command (121)Supported TX frame types:* IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0* AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0* P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0Supported RX frame types:* IBSS: 0x40 0xb0 0xc0 0xd0* managed: 0x40 0xd0* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0* AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0* mesh point: 0xb0 0xc0 0xd0* P2P-client: 0x40 0xd0* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0* P2P-device: 0x40 0xd0WoWLAN support:* wake up on disconnect* wake up on magic packet* wake up on pattern match, up to 20 patterns of 16-128 bytes,maximum packet offset 0 bytes* can do GTK rekeying* wake up on GTK rekey failure* wake up on EAP identity request* wake up on 4-way handshake* wake up on rfkill release* wake up on TCP connectionsoftware interface modes (can always be added):* AP/VLAN* monitorvalid interface combinations:* #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,total <= 3, #channels <= 2HT Capability overrides:* MCS: ff ff ff ff ff ff ff ff ff ff* maximum A-MSDU length* supported channel width* short GI for 40 MHz* max A-MPDU length exponent* min MPDU start spacingDevice supports TX status socket option.Device supports HT-IBSS.Device supports SAE with AUTHENTICATE commandDevice supports low priority scan.Device supports scan flush.Device supports per-vif TX power settingP2P GO supports CT window settingP2P GO supports opportunistic powersave settingDriver supports full state transitions for AP/GO clientsDriver supports a userspace MPMDriver/device bandwidth changes during BSS lifetime (AP/GO mode)Device supports static SMPSDevice supports dynamic SMPS
显示, (no IR, radar detection) 就是 这些5G 通道不可用
4.通过create_ap修改信道
修改create_ap.conf
中的配置项
CHANNEL=8:无线热点的频道设置为信道8。
FREQ_BAND=2.4:设置频段为2.4GHz。
CHANNEL=36:无线热点的频道设置为信道36。
FREQ_BAND=5:设置频段为5GHz。
5.坑一:芯片支持5G,网卡不支持
-
问题:Ubuntu22 can’t create 5G hotspot:
https://askubuntu.com/questions/1484841/ubuntu22-cant-create-5g-hotspot -
问题:Wifi 5GHz AP Mode: What does no IR means and can I bypass it?
https://superuser.com/questions/809282/wifi-5ghz-ap-mode-what-does-no-ir-means-and-can-i-bypass-it -
猜测是驱动不支持,需要更新Linux内核
https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi
https://www.intel.com/content/www/us/en/support/articles/000005511/wireless.html
参考
https://blog.csdn.net/subfate/article/details/51882322