After some testing the issue is quite more complicated than expected.

1. Using USB dongles as AP allow connections from any device with relatively 
'old' WiFi modules installed (clients with Intel, Atheros). It works smoothly 
with AP based on AR9280+AR7010 (on both 2.4G and 5G bands) and with AP based on 
AR9271 except Android clients.

2. But both USB dongles in AP mode work very poor with Android devices with 
Broadcom WiFi driver integrated into Android 10 OS. Android's dmesg shows that 
wlan0 uses bcmdhd kernel driver. I think its code is here: 
https://android.googlesource.com/kernel/common.git/+/bcmdhd-3.10

2.1. The same Android 10 based device with the same bcmdhd kernel driver 
connects successfully to PCIe AR9280 card in AP mode and works absolutely 
without any issues.

2.2. Moreother, any of USB dongle with Android 10 client connected triggers PF 
's rule 'max-src-rate 100/1' rule which never triggered with PCIe AR9280 card 
in AP mode. Commenting this rule out can't help much, ICMP packets disappearing 
between devices, but some ICMP goes between them. No any possibility of data 
transfers because USB AP and Android 10 client because of lots of missed 
packets. Distance between USB AP and Android client is not more than 1M.

The question is why Android client works fine with PCIe version AR9280 and 
don't work with USB version of AR9280 / AR9271.

I've tested all modes 11a (5G) 11n, 11g, and 11b (2.4G). The USB APs behavior 
is the same.

Martin


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, May 5, 2021 7:39 PM, Stefan Sperling <[email protected]> wrote:

> On Wed, May 05, 2021 at 06:14:52PM +0000, Martin wrote:
>
> > Hi list,
> > I use AR9280 PCIe card in AP mode for about two years in Lenovo x230 laptop 
> > (whitelist removed). Works perfectly.
> > After moving to a modern laptop there is no ability to install PCIe card 
> > into it.
> > I tried to use one of USB dongles I have based on:
> >
> > 1.  AR9280+AR7010
> > 2.  AR9271
> >
> > After attaching AR9271 USB dongle and restarting it by '/etc/netstart 
> > athn0' It broadcasts BSSID, and client can get IP address from it. But no 
> > data flow between USB AP and any client device connected. Most frames are 
> > dropped or corrupted on the 'air' level even USB AP and client on the same 
> > table.
> > ICMP between AP and client goes with huge delays in both ways, most 
> > packages drop. Delay is about ~3.5ms but sometimes 337.3ms and more.
> > The same issue with both USB dongles on x230 laptop (original PCIe was 
> > removed and nothing changed in configuration of PF and /etc/hostname.athn0).
> > I tried three computers with OpenBSD 6.9amd64 GENERIC installed. The 
> > behaviour is the same with USB AR9280+AR7010 and AR9271 dongles.
> > Once I return back PCIe version of AR9280 card all works like a charm.
> > It looks like a bug in athn(4) driver related USB based devices.
> > Martin
>
> What you are seeing does not match what I see with this device
> plugged into an APU2 board:
>
> athn1 at uhub0 port 4 configuration 1 interface 0 "ATHEROS UB91C" rev 
> 2.00/1.08 addr 2
> athn1: AR9271 rev 1 (1T1R), ROM rev 15, address 00:c0:ca:xx:xx:xx
>
> tcpbench sending to an iwm client associated to athn1:
>
> $ tcpbench 192.168.1.2
> elapsed_ms bytes mbps bwidth
> 1000 2195168 17.561 100.00%
> Conn: 1 Mbps: 17.561 Peak Mbps: 17.561 Avg Mbps: 17.561
> 2011 2264672 17.938 100.00%
> Conn: 1 Mbps: 17.938 Peak Mbps: 17.938 Avg Mbps: 17.938
> 3012 2292184 18.337 100.00%
> Conn: 1 Mbps: 18.337 Peak Mbps: 18.337 Avg Mbps: 18.337
> 4014 2274808 18.162 100.00%
> Conn: 1 Mbps: 18.162 Peak Mbps: 18.337 Avg Mbps: 18.162
> 5016 2231368 17.815 100.00%
> Conn: 1 Mbps: 17.815 Peak Mbps: 18.337 Avg Mbps: 17.815
> 6017 2228472 17.828 100.00%
> Conn: 1 Mbps: 17.828 Peak Mbps: 18.337 Avg Mbps: 17.828
> 7017 2200960 17.608 100.00%
> Conn: 1 Mbps: 17.608 Peak Mbps: 18.337 Avg Mbps: 17.608
> 8023 2293632 18.240 100.00%
> Conn: 1 Mbps: 18.240 Peak Mbps: 18.337 Avg Mbps: 18.240
> 9023 2274808 18.198 100.00%
> Conn: 1 Mbps: 18.198 Peak Mbps: 18.337 Avg Mbps: 18.198
> ^C
> --- 192.168.1.2 tcpbench statistics ---
> 21104600 bytes sent over 9.393 seconds
> bandwidth min/avg/max/std-dev = 17.561/17.965/18.337/0.267 Mbps
>
> I'd suggest you try your adapters on some different machines that
> use different USB host controllers. There are known issues with
> these devices on some controllers which I believe relate to (lack of?)
> USB power management in the USB stack, though I don't know for certain.
> In some known cases the firmware wouldn't even boot.
>
> Cheers,
> Stefan


Reply via email to