DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

DietPi-Software | WiFi Hotspot: Add WiFi "n" and "ac" selectors

Open retro24 opened this issue 5 years ago • 8 comments

Hello i installed Hotspot on my Raspberry pi 4 using the latest dietpi but the wifi works in 2,4Ghz and i wanted 5Ghz, as i can see that is working in 2,4ghz when i connect from my laptop,i change it from my laptop to work only in 5Ghz,and the hotspot is not visible, i dont see any options from dietpi in the network adapters to change it to 5Ghz,how to i change it?

thanks

retro24 avatar Feb 16 '21 15:02 retro24

Hi,

many thanks for your message. I found a similar topic on the RPi Github. https://github.com/raspberrypi/linux/issues/2619#issuecomment-410703338

Solutions seems to be setting a different country code like US

Joulinar avatar Feb 16 '21 15:02 Joulinar

I changed the country to us but did not do anything it still works in 2,4Ghz Can you in a future release to add a setting to select 2,4ghz or 5ghz ??

Thanks

retro24 avatar Feb 17 '21 08:02 retro24

Jep, for devices with onboard WiFi where we know that they support 5 GHz WiFi, or if there is a different way to check it, we can add ieee80211ac=1 to wpa_supplicant.conf. Or we simply add a switch to enable/disable with the hint that it may or may not work depending on the WiFi adapter, so admins need to verify themselves?

MichaIng avatar Feb 17 '21 13:02 MichaIng

it will be great if you can add this

thanks

retro24 avatar Feb 19 '21 09:02 retro24

@MichaIng is this still in progress? I search everywhere and couldn't find additional info. I did change CC to US but still no luck. Should i manually add ieee80211ac=1 to wpa_supplicant.conf ?

EDIT: did manual change , still not seeing 5g option.

nicoolaro avatar Mar 25 '22 14:03 nicoolaro

If ieee80211ac=1 and using correct WiFi country code (reboot afterwards) does not work, then I'm currently not sure either how to enable it.

still not seeing 5g option

You mean using WiFi clients you see that there is no 5G SSID provided by the hotspot?

MichaIng avatar Mar 25 '22 15:03 MichaIng

If ieee80211ac=1 and using correct WiFi country code (reboot afterwards) does not work, then I'm currently not sure either how to enable it.

still not seeing 5g option

You mean using WiFi clients you see that there is no 5G SSID provided by the hotspot?

Correct no 5G WiFi Hotspot also no options within Diepti Config.

I understand if this is still not fixed. Here are logs if you need them anyway. And as soon as i type this command WiFi 2.4g disables

root@DietPi:~# hostapd -dd /etc/hostapd/hostapd.conf
random: getrandom() support available
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Using driver-based roaming
nl80211: TDLS supported
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: Supported vendor command: vendor_id=0x1018 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x55a7dd1ca0 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=04
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=0501
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=0503
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 03
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=0504
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=06
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=08
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 08
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=09
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=0a
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=11
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=12
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 12
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55a7dd1ca0 match=7f
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 7f
nl80211: Failed to subscribe for mgmt frames from SME driver - trying to run without it
nl80211: Enable Probe Request reporting nl_preq=0x55a7dd1ca0
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x55a7dd1ca0 match=
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=64): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to enable Probe Request frame reporting in AP mode
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Add own interface ifindex 3 (ifidx_reason -1)
nl80211: if_indices[16]: 3(-1)
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Previous country code US, new country code US
nl80211: Regulatory information - country=US (DFS-FCC)
nl80211: 2400-2483 @ 40 MHz 30 mBm
nl80211: 5150-5250 @ 80 MHz 23 mBm
nl80211: 5250-5350 @ 80 MHz 23 mBm (DFS)
nl80211: 5470-5730 @ 160 MHz 23 mBm (DFS)
nl80211: 5730-5850 @ 80 MHz 30 mBm
nl80211: 57240-71000 @ 2160 MHz 40 mBm
nl80211: Added 802.11b mode based on 802.11g information
nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467[DISABLED] 2472[DISABLED] 2484[DISABLED]
nl80211: Mode IEEE 802.11a: 5170[DISABLED] 5180 5190[DISABLED] 5200 5210[DISABLED] 5220 5230[DISABLED] 5240 5260[NO_IR][RADAR] 5280[NO_IR][RADAR] 5300[NO_IR][RADAR] 5320[NO_IR][RADAR] 5500[NO_IR][RADAR] 5520[NO_IR][RADAR]
nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467[DISABLED] 2472[DISABLED] 2484[DISABLED]
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=23 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=23 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=23 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=23 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=30 dBm
hw vht capab: 0x0, conf vht capab: 0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 3  Frequency: 2422 MHz
hostapd_handle_dfs_offload: iface->cac_started: 0
hostapd_handle_dfs_offload: freq 2422 MHz does not require DFS. Continue channel/AP setup
Proceed with AP/channel setup
nl80211: Set freq 2422 (ht_enabled=1, vht_enabled=1, he_enabled=0, bandwidth=20 MHz, cf1=2422 MHz, cf2=0 MHz)
  * freq=2422
  * he_enabled=0
  * vht_enabled=1
  * ht_enabled=1
  * bandwidth=20
  * channel_width=1
  * center_freq1=2422
  * center_freq2=0
nl80211: Failed to set channel (freq=2422): -16 (Device or resource busy)
Could not set channel for kernel driver
Interface initialization failed
wlan0: interface state COUNTRY_UPDATE->DISABLED
wlan0: AP-DISABLED
wlan0: Unable to setup interface.
hostapd_interface_deinit_free(0x55a7dce9a0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x55a7dce9a0)
wlan0: interface state DISABLED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wlan0: AP-DISABLED
hostapd_cleanup(hapd=0x55a7dcfff0 (wlan0))
wlan0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=0x558fdcd670 drv_priv=0x55a7dd1460 -> hapd_deinit
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=3)
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
hostapd_interface_free(0x55a7dce9a0)
hostapd_interface_free: free hapd 0x55a7dcfff0
hostapd_cleanup_iface(0x55a7dce9a0)
hostapd_cleanup_iface_partial(0x55a7dce9a0)
hostapd_cleanup_iface: free iface=0x55a7dce9a0
root@DietPi:~#

nicoolaro avatar Mar 25 '22 15:03 nicoolaro

also no options within Diepti Config.

Of course, otherwise the issue would have a solution available tag and be closed.

I understand if this is still not fixed.

This is not a fix but an additional feature, and as of your results we still don't know how to implement it and whether it is supported by current hostapd at all.

Here are logs if you need them anyway. And as soon as i type this command WiFi 2.4g disables

There is a service running already, so this is supposed to fail. After ieee80211ac=1, to apply the change and see the logs:

systemctl restart hostapd
sleep 3
journalctl -u hostapd

MichaIng avatar Mar 25 '22 15:03 MichaIng

Hi same problem here raspberry pi 4 has 5ghz wifi but uses the 2.4ghz only in hotspot mode and there is no option to change it from the network adapters

symbios24 avatar Jul 02 '23 15:07 symbios24

This has been added for next DietPi release: #6558 Beta starts within the next hours.

MichaIng avatar Aug 20 '23 18:08 MichaIng