Gostaria de criar uma rede sem fio usando meu roteador Banana Pi R3 executando o sistema operacional Ubuntu 22.04.
Este é o arquivo de configuração que estou usando:
userk@glutamate:~$ sudo cat /etc/hostapd/hostapd_wlan0_gemma.conf
# hostapd configuration file
interface=wlan0
driver=nl80211
ctrl_interface=/var/run/hostapd
ssid=GemmaNode
country_code=EU
channel=1
hw_mode=g
ht_capab=[LDPC][HT20][HT40-][HT40+][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1]
ieee80211n=1
auth_algs=1
wmm_enabled=1
wpa=2
wpa_passphrase=mypassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
nas_identifier=glutamate-vlan500
No entanto, quando executo o hostapd, recebo o seguinte erro:
userk@glutamate:~$ sudo hostapd -d /etc/hostapd/hostapd_wlan0_gemma.conf
random: getrandom() support available
Configuration file: /etc/hostapd/hostapd_wlan0_gemma.conf
nl80211: TDLS supported
nl80211: TDLS external setup
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:10
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 40 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 40 00 00 00 00 40
nl80211: key_mgmt=0x1ff0f enc=0xfef auth=0x7 flags=0x4003d30db5bd8e0 rrm_flags=0x10 probe_resp_offloads=0x0 max_stations=0 max_remain_on_chan=5000 max_scan_ssids=4
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 11 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x5558515be0
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x5558515be0 match= multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=176): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=11)
netlink: Operstate: ifindex=11 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x555850da00)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x555850da00)
wlan0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: AP-DISABLED
hostapd_cleanup(hapd=0x555850f190 (wlan0))
wlan0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x555850da00)
hostapd_interface_free: free hapd 0x555850f190
hostapd_cleanup_iface(0x555850da00)
hostapd_cleanup_iface_partial(0x555850da00)
hostapd_cleanup_iface: free iface=0x555850da00
Informações adicionais Compatibilidade do driver: Confirmado que wlan0 suporta o modo AP.
Pergunta
Como posso resolver o erro nl80211: Não foi possível configurar o modo do driver e iniciar o hostapd com êxito em meu roteador Banana Pi R3?
Agora posso iniciar o hostapd. Ainda não consigo me conectar a ele, mas pelo menos ele não falha mais. Aqui estão os passos que segui
comando 1:
comando 2:
Se o comando 2 retornar alguns pids, execute novamente o comando 1, caso contrário, execute hostapd com seu arquivo de configuração.