This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1835MOD: Unable to activate simultaneous AP and mesh roles

Part Number: WL1835MOD

Hi,

With a BeagleBone Green Wireless running Debian 10 and linux kernel 4.19, I'm unable to start simultaneously AP and mesh roles (in the same frequency/channel).

For individual AP or Mesh roles I have no problem.

Here is my hostapd config file:

##### hostapd configuration file

interface=SoftAp0
logger_syslog=-1
logger_syslog_level=2
ctrl_interface=/run/hostapd

##### IEEE 802.11 related configuration
ssid=BeagleBone
country_code=PT
ieee80211d=1
hw_mode=g
channel=6
max_num_sta=10
macaddr_acl=0
auth_algs=1
wmm_enabled=1

##### IEEE 802.11n related configuration
ieee80211n=1

##### WPA/IEEE 802.11i configuration
wpa=2
wpa_passphrase=BeagleBone
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

and here is my wpa_supplicant config file:

#### wpa_supplicant configuration file for Mesh (802.11s) networking

ctrl_interface=/run/wpa_supplicant
max_peer_links=10
mesh_max_inactivity=30
country=PT
p2p_disabled=1

network={
	ssid="BoneMesh"
	mode=5
	frequency=2437
	key_mgmt=NONE
#	key_mgmt=SAE
#	psk="BoneMesh"
}

If I start first the mesh interface, whn I try to start the AP I get this error:

debian@beaglebone:~$ sudo hostapd /etc/hostapd.conf 
Configuration file: /etc/hostapd.conf
SoftAp0: interface state UNINITIALIZED->COUNTRY_UPDATE
Using interface SoftAp0 with hwaddr fc:69:47:32:59:23 and ssid "BeagleBone"
Failed to set beacon parameters
Interface initialization failed
SoftAp0: interface state COUNTRY_UPDATE->DISABLED
SoftAp0: AP-DISABLED 
SoftAp0: Unable to setup interface.
SoftAp0: interface state DISABLED->DISABLED
SoftAp0: AP-DISABLED 
SoftAp0: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface SoftAp0 wasn't started
nl80211: deinit ifname=SoftAp0 disabled_11b_rates=0

If I start hostapd in debug mode I see more details on the errors:

--
nl80211: assocresp_ies - hexdump(len=10): 7f 08 04 00 00 02 00 00 00 40
nl80211: Beacon set failed: -16 (Device or resource busy)
Failed to set beacon parameters
SoftAp0: Flushing old station entries
--
nl80211: send_frame -> send_frame_cmd
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2437 wait=0)
wpa_driver_nl80211_set_key: ifindex=8 (SoftAp0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
--

If I start first the AP, when I try to start the mesh interface I get this error:

debian@beaglebone:~$ sudo wpa_supplicant -i mesh0 -c /etc/wpa_supplicant/mesh.conf
Successfully initialized wpa_supplicant
Using interface mesh0 with hwaddr 0c:1c:57:92:5c:82 and ssid ""
mesh0: interface state UNINITIALIZED->ENABLED
mesh0: AP-ENABLED 
mesh0: joining mesh BoneMesh
mesh0: mesh join error=-16
mesh0: Could not join mesh

Is there any known limitation to work simultaneous AP and Mesh in kernel 4.19?

Is there some extra configuration that needs to be setup in hostapd and/or wpa_supplicant for this to work?

Best regards,

José Gonçalves

  • Hi ,

    Can you pls apply the patch mentioned in following thread :

    Thanks

    Saurabh

  • Hi Saurabh,

    That patch solved the issue. Thanks!

    It does not apply directly over branch 4.19 of BeagleBone kernel, but it was easy to see the driver changes that needed to be applied.

    For anyone using BeagleBones, here it goes the patch that I applied and that allowed simultaneous AP and Mesh roles:

    diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
    index 496b9b63cea1..db5bc51ce51c 100644
    --- a/drivers/net/wireless/ti/wl18xx/main.c
    +++ b/drivers/net/wireless/ti/wl18xx/main.c
    @@ -1905,12 +1905,14 @@ wl18xx_iface_combinations[] = {
     		.max_interfaces = 3,
     		.limits = wl18xx_iface_limits,
     		.n_limits = ARRAY_SIZE(wl18xx_iface_limits),
    +		.beacon_int_min_gcd = 1,
     		.num_different_channels = 2,
     	},
     	{
     		.max_interfaces = 2,
     		.limits = wl18xx_iface_ap_limits,
     		.n_limits = ARRAY_SIZE(wl18xx_iface_ap_limits),
    +		.beacon_int_min_gcd = 1,
     		.num_different_channels = 1,
     		.radar_detect_widths =	BIT(NL80211_CHAN_NO_HT) |
     					BIT(NL80211_CHAN_HT20) |