Jump to content

Espressobin with RTL8821AE PCIe


maybe_diereses

Recommended Posts

Hello!

Really appreciating armbian having good notes on how to get up and running on a specific device. Thanks!

 

I have these wifi cards, RTL8821AE.

 

If I `apt install hostapd` I can get hostapd to start up. If I use `hostapd-realtek` it doesn't.

Some of the armbian docs say look for and try '/usr/sbin/hostapd-rt', but I can't figure out how to get that; Maybe that note is out of date?

 

It starts up, but doesn't seem to work.

I have wlp0s0 in a bridge with the LAN ports. It seems like I'm able to associate to my SSID, but nothing's going across the bridge. No DHCP is happening, etc. I'm just trying to make a access point right now. The gateway/dhcp service is a different box.

 

Am I just forgetting a little linux config, or is there probably something wrong with the driver?

 

Here's a bunch of output from hostapd -d.

 

Spoiler

nl80211: TX queue param set: queue=2 aifs=3 cw_min=15 cw_max=63 burst_time=0 --> res=0
nl80211: TX queue param set: queue=3 aifs=7 cw_min=15 cw_max=1023 burst_time=0 --> res=0
wlp0s0: interface state COUNTRY_UPDATE->ENABLED
wlp0s0: AP-ENABLED
wlp0s0: Setup of interface done.
ctrl_iface not configured!
RTM_NEWLINK: ifi_index=8 ifname=wlp0s0 operstate=2 linkmode=0 master=6 ifi_family=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK: ifi_index=8 ifname=wlp0s0 operstate=2 linkmode=0 master=6 ifi_family=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK: ifi_index=8 ifname=wlp0s0 master=6 operstate=2 ifi_family=7 ifi_flags=0x1003 ([UP])
nl80211: Add ifindex 6 for bridge br0
nl80211: Add own interface ifindex 6 (ifidx_reason 8)
nl80211: ifindex 6 already in the list
RTM_NEWLINK: ifi_index=8 ifname=wlp0s0 master=6 operstate=6 ifi_family=7 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 6 for bridge br0
nl80211: Add own interface ifindex 6 (ifidx_reason 8)
nl80211: ifindex 6 already in the list
RTM_NEWLINK: ifi_index=8 ifname=wlp0s0 master=6 operstate=6 ifi_family=7 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 6 for bridge br0
nl80211: Add own interface ifindex 6 (ifidx_reason 8)
nl80211: ifindex 6 already in the list
RTM_NEWLINK: ifi_index=8 ifname=wlp0s0 operstate=6 linkmode=0 master=6 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
^CSignal 2 received - terminating
hostapd_interface_deinit_free(0x5576b29ba0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x5576b29ba0)
wlp0s0: interface state ENABLED->DISABLED
hostapd_bss_deinit: deinit bss wlp0s0
wlp0s0: Deauthenticate all stations
nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2432
nl80211: send_frame -> send_frame_cmd
wlp0s0: AP-DISABLED
hostapd_cleanup(hapd=0x5576b2aed0 (wlp0s0))
wlp0s0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data(wlp0s0)
hostapd_interface_deinit_free: driver=0x55703d8ca8 drv_priv=0x5576b2ef10 -> hapd_deinit
nl80211: deinit ifname=wlp0s0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=8)
netlink: Operstate: ifindex=8 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 8 iftype 2 (STATION)
nl80211: Teardown AP(wlp0s0) - device_ap_sme=0 use_monitor=0
nl80211: Unsubscribe mgmt frames handle 0x888888ddfe3a5b69 (AP teardown)
hostapd_interface_free(0x5576b29ba0)
hostapd_interface_free: free hapd 0x5576b2aed0
hostapd_cleanup_iface(0x5576b29ba0)
hostapd_cleanup_iface_partial(0x5576b29ba0)
hostapd_cleanup_iface: free iface=0x5576b29ba0

 

 

and the hostapd config

Spoiler

ssid=ARMBIAN
interface=wlp0s0
bridge=br0
hw_mode=g
channel=5
#driver=nl80211
ignore_broadcast_ssid=0

logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
wpa=2
preamble=1

wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

noscan=1

### IEEE 802.11n
#ieee80211n=1
#ht_capab=
country_code=US
#ieee80211d=1
### IEEE 802.11n

### IEEE 802.11a
#hw_mode=a
### IEEE 802.11a

### IEEE 802.11ac
#ieee80211ac=1
#vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP3]
#vht_oper_chwidth=1
#vht_oper_centr_freq_seg0_idx=42
### IEEE 802.11ac

# controlling enabled
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

 

 

 

Edited by maybe_diereses
Link to comment
Share on other sites

Thanks!

I must have installed that at some point already.

 

Quote

apt list firmware-realtek
Listing... Done
firmware-realtek/stable,stable,now 20190114-2 all [installed]

 

Here's when I try with hostapd-realtek

Spoiler

root@espressobin:~# hostapd -d /etc/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd.conf
ctrl_interface_group=0
drv->ifindex=8
Configure bridge br0 for EAPOL traffic.
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.
hostapd_interface_deinit_free(0x5575ac98d0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x5575ac98d0)
wlp0s0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlp0s0
wlp0s0: AP-DISABLED
hostapd_cleanup(hapd=0x5575acac30 (wlp0s0))
hostapd_free_hapd_data: Interface wlp0s0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x5575ac98d0)
hostapd_interface_free: free hapd 0x5575acac30
hostapd_cleanup_iface(0x5575ac98d0)
hostapd_cleanup_iface_partial(0x5575ac98d0)
hostapd_cleanup_iface: free iface=0x5575ac98d0

 

this is with the same hostapd.conf. Not sure exactly how the driver is supposed to be specified. It being commented out and using `hostapd` not `hostapd-realtek` is the closest to working so far.

 

Link to comment
Share on other sites

5 hours ago, maybe_diereses said:

If I `apt install hostapd` I can get hostapd to start up. If I use `hostapd-realtek` it doesn't.

 

That's expected. Realtek version is for some old driver implementation and its probably deprecated. What you have to try is this:
 

Spoiler

 


But also its possible that driver does not support AP at all. I am not familiar if the one you use works in AP mode or not.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines