-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5G Support #61
5G Support #61
Conversation
Wonderful! Thank you for PR @kphanipavan ! Although I don't have a 5G wifi hardware to test, it looks great, I'll merge it. Actually I've been thinking about changing I'll bump version to 0.7.x after merging this |
Regarding the force channel behaviour, I found this to be the expected behaviour when I started using your script. But, IMO, having it the current way can provide a verbose interface to the user. One can suggest a channel with -c, let the script decide if it is valid, and if the user wants to, they can enforce it using --force_channel. |
Already in dev branch and I did some modifications and changes. Will merge into master finally |
Can I have some more context for 183cf44, other than this, everything looks fine. Tested 0.7.0b just now, working as intended. |
When hostapd run, it will output its This is what I get on my PC:
|
Doesn't seem to happen on mine for some reason, tq for clarification. Also, may I know why the b for version? |
Really? What's your hostapd version?
I searched issues for users' logs. The reason of version b (beta) to differ from a stable release is:
So, we need to give some time for users to test |
Hostapd version: v2.11-devel, built from source. lnxrouter output on my end:
I will see if theres a config option to change for the build. b now makes sense, cheers... |
Hey the below command does not work. It says sudo lnxrouter --ap wlan0 supernovatux -p qwerty123 --wifi4 --req-ht --wifi5 --req-vht --freq-band 5 \
--vht-capab [MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMEE][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] \
--ht-capab [HT40+][HT40-][SHORT-GI-40][SHORT-GI-20][GF][RX-STBC1][DSSS_CCK-40][MAX-AMSDU-7935] \
-c 149 --vht-ch-width 1 --vht-seg0-ch 155 --country IN --hostapd-debug 1 --no-virt I have attached some details below
Band 1:
Capabilities: 0x9ff
RX LDPC
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 7935 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: No restriction (0x00)
HT TX/RX MCS rate indexes supported: 0-15
HE Iftypes: managed
VHT Capabilities (0x339071b2):
Max MPDU length: 11454
Supported Channel Width: neither 160 nor 80+80
RX LDPC
short GI (80 MHz)
TX STBC
SU Beamformee
MU Beamformee
RX antenna pattern consistency
TX antenna pattern consistency
VHT RX MCS set:
1 streams: MCS 0-9
2 streams: MCS 0-9
3 streams: not supported
4 streams: not supported
5 streams: not supported
* 2412.0 MHz [1] (20.0 dBm)
* 2417.0 MHz [2] (20.0 dBm)
* 2422.0 MHz [3] (20.0 dBm)
* 2427.0 MHz [4] (20.0 dBm)
* 2432.0 MHz [5] (20.0 dBm)
* 2437.0 MHz [6] (20.0 dBm)
* 2442.0 MHz [7] (20.0 dBm)
* 2447.0 MHz [8] (20.0 dBm)
* 2452.0 MHz [9] (20.0 dBm)
* 2457.0 MHz [10] (20.0 dBm)
* 2462.0 MHz [11] (20.0 dBm)
* 2467.0 MHz [12] (20.0 dBm) (no IR)
* 2472.0 MHz [13] (20.0 dBm) (no IR)
* 2484.0 MHz [14] (20.0 dBm) (no IR)
* 5180.0 MHz [36] (20.0 dBm)
* 5200.0 MHz [40] (20.0 dBm) (no IR)
* 5220.0 MHz [44] (20.0 dBm) (no IR)
* 5240.0 MHz [48] (20.0 dBm) (no IR)
* 5260.0 MHz [52] (20.0 dBm) (no IR, radar detection)
* 5280.0 MHz [56] (20.0 dBm) (no IR, radar detection)
* 5300.0 MHz [60] (20.0 dBm) (no IR, radar detection)
* 5320.0 MHz [64] (20.0 dBm) (no IR, radar detection)
* 5500.0 MHz [100] (20.0 dBm) (no IR, radar detection)
* 5520.0 MHz [104] (20.0 dBm) (no IR, radar detection)
* 5540.0 MHz [108] (20.0 dBm) (no IR, radar detection)
* 5560.0 MHz [112] (20.0 dBm) (no IR, radar detection)
* 5580.0 MHz [116] (20.0 dBm) (no IR, radar detection)
* 5600.0 MHz [120] (20.0 dBm) (no IR, radar detection)
* 5620.0 MHz [124] (20.0 dBm) (no IR, radar detection)
* 5640.0 MHz [128] (20.0 dBm) (no IR, radar detection)
* 5660.0 MHz [132] (20.0 dBm) (no IR, radar detection)
* 5680.0 MHz [136] (20.0 dBm) (no IR, radar detection)
* 5700.0 MHz [140] (20.0 dBm) (no IR, radar detection)
* 5720.0 MHz [144] (20.0 dBm) (no IR, radar detection)
* 5745.0 MHz [149] (20.0 dBm) (no IR)
* 5765.0 MHz [153] (20.0 dBm) (no IR)
* 5785.0 MHz [157] (20.0 dBm) (no IR)
* 5805.0 MHz [161] (20.0 dBm) (no IR)
* 5825.0 MHz [165] (20.0 dBm) (no IR)
* 5845.0 MHz [169] (disabled)
* 5865.0 MHz [173] (disabled)
* 5885.0 MHz [177] (disabled)
linux-router 0.7.6 (https://github.com/garywill/linux-router) PID: 48517 Use random LAN IPv4 address 192.168.230.1 iptables v1.8.10 (nf_tables) haveged_watchdog PID: 48691 Starting hostapd iptables: NAT iptables: allow DNS iptables: allow dhcp Starting dnsmasq == Setting up completed, now linux-router should be working == ERROR: hostapd failed. (tip: try '--hostapd-debug' to get some debug info) Error occured Doing cleanup.. |
I am guessing you have an Intel card. 5G Hotspot works fine in Windows with Intel wifi cards but doesn't work well on Linux. Features section, point 2 and Notes section in my initial comment, 5Ghz is either not supported or supports during certain times. |
Hey mine is a Mediatek card. It uses mt7921e driver. As per the features section wifi5 @ 80mhz should work right. I am using kernel ver 6.12. |
Heyy mb, I was missing
|
Sorry for the spam. Link speed is 867Mbps on my Redmi Note 12 pro, One plus Nord CE reports it as 390Mbps but using the network increased the number to 433Mbps now. Thanks @kphanipavan for your work :) Anyways, @garywill should this be documented, will a PR be appreciated to README.md |
Glad you figured it out. That package provides restrictions to your wifi card about which channel is allowed for hotspot. Adding it to the hotspot dependency list makes sense. @Supernovatux you are welcome to open an MR for this. |
Addresses #51 and below
Fixes:
--hs20
flag, subject to the user's hostapd build.--force_channel
flag. Some WiFi cards, like my Intel AX201, can transmit to a channel while being connected to a WiFi AP in different channel.--use_ht
and--use_vht
separately to addrequire_ht
andrequire_vht
config option to hostapd config. They are mandatory if--ht_capab
or--vht_capab
are used.Tests:
1. Using the stock config:
Command:
Fails to turn on hotspot as the WiFi card is already connected to my Univ's 5G WiFi, which is on channel 56 and which is not supported, as seen below:
Screenshot:
2. Using
--force_channel
flag to overcome above:Command:
Hostapd starts, but the channel width defaults to 40MHz. Below is a screenshot from the app
Wifiman
, showing analysis of the wifi created.Screenshot:
3. Using the remaining flags for wider channel:
Command:
WiFi starts with 80MHz channel as seen in the below screenshot.
Screenshot:
Guide to choosing the flag arguments for 80MHz channel and above:
Guide
iw list | grep -i -A 15 "band 1"
to get a list of HT Capabilities. Example:result: [HT40+][HT40-][SHORT-GI-40][SHORT-GI-20][RX-STBC1][DSSS_CCK-40]
iw list | grep -i -A 15 "vht capabilities"
to get a list of VHT Capabilities. Example:result: [MAX-MPDU-11454][VHT160][RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][SU-BEAMFORMEE][MU-BEAMFORMEE]
Guide
Check the specifications for your card, make sure it supports 5GHz N or AC wireless.
Check if the AP can be initiated on the desired channel, using
iw list | grep -E "dBm\)|\(disabled\)"
Decide whether you want to use 40, 80 or 160MHz channel and pick the corresponding index:
0 for 40MHz
1 for 80MHz
2 for 160MHz
3 for 80+80MHz
From WLAN Channels, in the 5GHz table and under the F0 Index column, pick the index under the required channel width which includes your base channel, called the segment 0 channel.
Example:
Example:I wanted 80MHz channel with base channel as 149. The channel index corresponding to those settings is 155.
After collecting the required data, use this format:
--use_vht --force_channel --seg0_center_freq_idx <segment 0 channel> -c <base channel> --vht_channel_width <channel width index>
So for my setup:
--use_vht --force_channel --seg0_center_freq_idx 155 -c 149 --vht_channel_width 1
Notes: