Skip to content

Number of wireless clients in AP mode is very limited #3010

@martignoni

Description

@martignoni

I'm reporting this on Jamesh's advice (see this forum discussion).

Describe the bug
On RPi 3B+, on can expect an optimistic max. of 20-30 devices connected simultaneously via Wi-Fi, even when no under-voltage event occurs.

To reproduce
Use case: the RPi serves as a wifi AP and a web server, that's all. No user is logged in the RPi in production use. An official Raspberry Foundation power supply and cable is used, so that no under-voltage event occurs.

Nginx and php-fpm are optimized so that memory is not a problem. Flooding the web server using ApacheBench shows that memory is not a problem: available memory remains at around 600M at any time, even with 100 concurrent http requests! Swap is never used.

The limitation experienced is uniquely caused by concurrent wifi connections to the AP (hostapd). For that reason, I'm suspecting it's a wifi driver issue.

Expected behaviour
More client devices than a mere 20 can be simultaneously connected to the RPi in AP mode.

Actual behaviour
When about 20 devices are connected to the RPi in AP mode, the RPi freezes.

System

  • Model: Pi3B+
  • OS and version: Raspberry Pi reference 2019-04-08
  • Firmware: version 2e98b31d18547962e564bdf88e57b3df7085c29b (clean) (release) (start_cd)
  • Kernel: Linux moodlebox 4.19.42-v7+ system freeze while unplug r8152 usb2network card #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux

Logs
Not applicable.

Additional context
This is the content of my /etc/hostapd/hostapd.conf:

# Set country code
country_code=US
# Name of the Wi-Fi interface
interface=wlan0
# Use the nl80211 driver
driver=nl80211
# Wi-Fi network name (SSID)
ssid2=4d6f6f646c65426f78
utf8_ssid=1
# Show or hide SSID
ignore_broadcast_ssid=0
# Use the 2.4GHz band
hw_mode=g
# The Wi-Fi channel
channel=11
# Enable 802.11n
ieee80211n=1
# Enable WMM
wmm_enabled=1
# Enable 40 MHz channels with short guard interval for 20 Mhz
#ht_capab=[MAX-AMSDU-3839][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
# Accept all MAC addresses
macaddr_acl=0
# Use WPA authentication
auth_algs=1
# Use WPA2
wpa=2
# Use a pre-shared key
wpa_key_mgmt=WPA-PSK
# The network passphrase
wpa_passphrase=moodlebox
# Use AES, instead of TKIP
rsn_pairwise=CCMP
# Enable hostapd_cli
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions