PDA

View Full Version : Can't connect to AP with multiple dongles RP3



kikimor
2020-06-19, 14:33
Hello everyone.
I have Raspberry Pi 3 Model B Plus Rev 1.3 with 2 wifi dongles connected (DLink DWA 182 C1 and Asus AC56) at its boot
My task is to create second AP with DHCP server on any of the connected dongles and make it visible for clients. I can create it with another instance of hostapd and dnsmasq and its visible, but I can't connect to it if it's created on wlan1 (simply rejects with strange errors). If I create this AP on wlan2 everything works fine.
Kali version:
Linux kali 4.19.93-Re4son-v8+ #1 SMP PREEMPT Tue Jan 7 13:59:37 UTC 2020 aarch64 GNU/Linux
lsusb
Bus 001 Device 004: ID 0b05:17d2 ASUSTek Computer, Inc. USB-AC56 802.11a/b/g/n/ac Wireless Adapter [Realtek RTL8812AU]Bus 001 Device 005: ID 2001:3315 D-Link Corp.
Bus 001 Device 006: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
iw dev output (I have startup script to put them in monitor mode)
iw devphy#2
Interface wlan2
ifindex 5
wdev 0x200000001
addr 00:ad:24:2b:6c:e8
type monitor
txpower 20.00 dBm
phy#1
Interface wlan1
ifindex 4
wdev 0x100000001
addr 40:b0:76:58:46:10
ssid Wlan99
type AP
txpower 20.00 dBm
phy#0
Interface wlan0
ifindex 3
wdev 0x1
addr b8:27:eb:4d:78:07
ssid Xiaomi_806dc5dc
type AP
channel 40 (5200 MHz), width: 20 MHz, center1: 5200 MHz
txpower 10.00 dBm
hostapd version
hostapd v2.9User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2019, Jouni Malinen <[email protected]> and contributors
hostapd.conf for second AP
ctrl_interface=/var/run/hostapd/ctrl_interface_group=0
interface=wlan1
driver=nl80211
ssid=Wlan99
hw_mode=g
channel=2
country_code=US
ieee80211d=1
ieee80211n=1 # 802.11n support
ieee80211ac=1 # 802.11ac support
wmm_enabled=1
ieee80211n=1
macaddr_acl=0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=123456781
wpa_pairwise=TKIP
rsn_pairwise=CCMP

hostapd start command
hostapd -dd /etc/hostapd/hostapd_wlan.conf
errors from connection
wlan1: Deauthenticate all stations at BSS startnl80211: sta_remove -> DEL_STATION wlan1 ff:ff:ff:ff:ff:ff --> -22 (Invalid argument)
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=4 (wlan1) alg=3 addr=0x55557d8c78 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
broadcast key
nl80211: Set wlan1 operstate 0->1 (UP)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
nl80211: TX queue param set: queue=0 aifs=1 cw_min=3 cw_max=7 burst_time=15 --> res=0
nl80211: TX queue param set: queue=1 aifs=1 cw_min=7 cw_max=15 burst_time=30 --> res=0
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
nl80211: Set Deny ACL (num_mac_acl=0)
wlan1: interface state COUNTRY_UPDATE->ENABLED
wlan1: AP-ENABLED
wlan1: Setup of interface done.
nl80211: Event message available
nl80211: Ignored event 19 (NL80211_CMD_NEW_STATION) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Event message available
nl80211: Ignored event 20 (NL80211_CMD_DEL_STATION) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Event message available
nl80211: Ignored event 20 (NL80211_CMD_DEL_STATION) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Event message available
nl80211: Ignored event 19 (NL80211_CMD_NEW_STATION) for foreign interface (ifindex 3 wdev 0x0) As I figured out
Ignored event 19 appears when I am reconnecting to internal AP , and
Ignored event 20 is when I connect to this (second) AP
full debug output (can't load txt) hostapd_wlan1_output.txt.zip

At the same time if I create AP on wlan2 (just replace wlan1 to wlan2 in the config file) everything works fine
full debug output hostapd_wlan2_output.zip

if I connect 3 dongle and reboot, I can't create AP on wlan1 and wlan2 also.
I've tried different USB ports , replacing wlan1 and wlan2 order - same errors.
Sometimes after reboot I can create AP on wlan1, but I haven't figured why.

dmsg log dmesg.txt.zip

I wil be vers appreciated for any help or advice