Hi community,
This email is mainly addressed to hostap/wpa_supplicant mailing list.
Descriptions of my issue: - I am establishing IBSS/adhoc network using OpenWRT 15.05 + ath9k (AR9331). - When nodes are relatively closely placed, the peers (the term is 'neighbors' in batman-adv mesh) reach 40, ath9k driver detects "tx hung, resetting the chip" (for RESET_TYPE_TX_HANG). - This ath9k "tx hung" randomly happens among the 40 nodes (in adhoc network), and it happens relatively often (seemingly randomly for nodes), and randomly makes some nodes un-usable. - This appears to be an issue with ath9k kernel driver or ath9k hardware that it can not handle ~40 peers. - IBSS/adhoc with 20 peers work well.
Is there a config in wpa_supplicant that we can limit the number of peers?
In the other words, once the number of peers ('iw wlan0 station dump') reaches a pre-configured number (e.g. 12 or 16), wpa_supplicant does not authenticate any more, for IBSS/adhoc only? - A subtle detail: once a new beacon with higher RSSI is detected, the current connection with lowest RSSI will be de-authenticated, and to authenticate this new peer (with higher RSSI in beacon).
Is this "limiting number of peers for IBSS/adhoc" a good work-around for 40+ peers adhoc network, although the ultimate root cause seemingly is with ath9k kernel driver or ath9k hardware?
Also, if there are many (like 40+) peers in IBSS/adhoc network, I am not sure how medium access contention and collisions factor in, for management frames?
Here is my wpa_supplicant conf file: ------ ctrl_interface=/var/run/wpa_supplicant
# use 'ap_scan=2' on all devices connected to the network # this is unnecessary if you only want the network to be created when no other networks are available ap_scan=2
network={ ssid="Net-xxxxxxxx" mode=1 frequency=2462 proto=WPA2 key_mgmt=WPA-PSK pairwise=CCMP group=CCMP psk="xxxxxxxx" } ------
Another approach could be to use user-space shell script to "iw <dev> ibss leave" for the lower RSSI stations? - As I am using batman-adv to build mesh network on the top of IBSS/adhoc, a similar approach can be done at batman-adv level.
Suggestions?
Thanks. Xuebing Wang
Hi!
Does it happen if you run 40 IBSS nodes without encryption?
(I wonder if it's a MAC or PHY bug..)
-adrian
Thanks.
I did not try 40 IBSS nodes without encryption. I am using software encryption for ath9k because of key caching issues discussed in below threads: https://patchwork.kernel.org/patch/9381651/ https://github.com/cozybit/authsae/issues/42
This is a customer site in the field, our temporary work-around is to create 2 networks (each is with 20 nodes) by using different SSID.
Because this is customer site in the field, it is not convenient to change and test. Does it make sense to test without encryption, encryption is a MUST?
Xuebing Wang
On 2017年06月03日 13:18, Adrian Chadd wrote:
Hi!
Does it happen if you run 40 IBSS nodes without encryption?
(I wonder if it's a MAC or PHY bug..)
-adrian
Hi,
Well, it sounds like something you need a 40 node test network for :)
I was wondering whether it was some kind of MAC bug that was being triggered because of so many units say, overflowing the keycache or something. But if it's software encryption then maybe not. I wish I could help more, but setting up a 40 node network to test is a big challenge. :)
Is it a gradual thing? Ie, do you know when it starts to hang? Does it hang at 40? or gradually as you approach 40?
As for association limits - I thought there was a maximum station parameter somewhere...
-adrian
Hi Adrian,
=> Is it a gradual thing? Ie, do you know when it starts to hang? Does it hang at 40? or gradually as you approach 40?
We do not know. What we do know is, 20 peers / neighbors work well.
Jason Toschlog in CC said that he observed similar issues with brcmfmac when peers reach 32 (16 peers work for him).
I guess I will setup 32 or 40 nodes here and try limit the max number of peers (at wpa_supplicant) for IBSS/adhoc.
Thanks again.
Xuebing Wang
On 2017年06月03日 14:16, Adrian Chadd wrote:
Hi,
Well, it sounds like something you need a 40 node test network for :)
I was wondering whether it was some kind of MAC bug that was being triggered because of so many units say, overflowing the keycache or something. But if it's software encryption then maybe not. I wish I could help more, but setting up a 40 node network to test is a big challenge. :)
Is it a gradual thing? Ie, do you know when it starts to hang? Does it hang at 40? or gradually as you approach 40?
As for association limits - I thought there was a maximum station parameter somewhere...
-adrian
Hi Xuebing,
are your devices all configured with on AP and one IBSS interface? Or even more AP interfaces? What is the multicast rate you used?
One thing you need to consider is that in ath9k if you run AP and IBSS at the same time (at least with OpenWRT), the distributed IBSS beaconing is disabled and each node will beacon the "normal" ~10 times per second. That means with AP and IBSS and 40 nodes, you end up with ~800 beacons per second. That might be a problem (especially if all nodes are in the same spot).
To change this, you can try:
* increase the multicast rate to e.g. 18 mbit/s (note, this may also change the batman-adv neighbor range) and verify that the beacons are sent on higher rates * disable some APs - you don't need so many anyway if they are all on the same spot * increase the beacon interval on the APs- although some clients may not like that.
.. anyway, that is all stuff you can try if you have the feeling the airtime is "polluted", so I would suggest to verify if this is the cause first before taking counter measures.
Cheers, Simon On Saturday, June 3, 2017 2:30:27 PM CEST Xuebing Wang wrote:
Hi Adrian,
=> Is it a gradual thing? Ie, do you know when it starts to hang? Does it hang at 40? or gradually as you approach 40?
We do not know. What we do know is, 20 peers / neighbors work well.
Jason Toschlog in CC said that he observed similar issues with brcmfmac when peers reach 32 (16 peers work for him).
I guess I will setup 32 or 40 nodes here and try limit the max number of peers (at wpa_supplicant) for IBSS/adhoc.
Thanks again.
Xuebing Wang
On 2017年06月03日 14:16, Adrian Chadd wrote:
Hi,
Well, it sounds like something you need a 40 node test network for :)
I was wondering whether it was some kind of MAC bug that was being triggered because of so many units say, overflowing the keycache or something. But if it's software encryption then maybe not. I wish I could help more, but setting up a 40 node network to test is a big challenge. :)
Is it a gradual thing? Ie, do you know when it starts to hang? Does it hang at 40? or gradually as you approach 40?
As for association limits - I thought there was a maximum station parameter somewhere...
-adrian
Hi Honma-san,
Does max_peer_links apply to IBSS/adhoc (in addition to 802.11s mesh)? Thanks.
Xuebing Wang
On 2017年06月03日 12:09, Xuebing Wang wrote:
Hi community,
This email is mainly addressed to hostap/wpa_supplicant mailing list.
Descriptions of my issue:
- I am establishing IBSS/adhoc network using OpenWRT 15.05 + ath9k
(AR9331).
- When nodes are relatively closely placed, the peers (the term is
'neighbors' in batman-adv mesh) reach 40, ath9k driver detects "tx hung, resetting the chip" (for RESET_TYPE_TX_HANG).
- This ath9k "tx hung" randomly happens among the 40 nodes (in adhoc
network), and it happens relatively often (seemingly randomly for nodes), and randomly makes some nodes un-usable.
- This appears to be an issue with ath9k kernel driver or ath9k
hardware that it can not handle ~40 peers.
- IBSS/adhoc with 20 peers work well.
Is there a config in wpa_supplicant that we can limit the number of peers?
In the other words, once the number of peers ('iw wlan0 station dump') reaches a pre-configured number (e.g. 12 or 16), wpa_supplicant does not authenticate any more, for IBSS/adhoc only?
- A subtle detail: once a new beacon with higher RSSI is detected, the
current connection with lowest RSSI will be de-authenticated, and to authenticate this new peer (with higher RSSI in beacon).
Is this "limiting number of peers for IBSS/adhoc" a good work-around for 40+ peers adhoc network, although the ultimate root cause seemingly is with ath9k kernel driver or ath9k hardware?
Also, if there are many (like 40+) peers in IBSS/adhoc network, I am not sure how medium access contention and collisions factor in, for management frames?
Here is my wpa_supplicant conf file:
ctrl_interface=/var/run/wpa_supplicant
# use 'ap_scan=2' on all devices connected to the network # this is unnecessary if you only want the network to be created when no other networks are available ap_scan=2
network={ ssid="Net-xxxxxxxx" mode=1 frequency=2462 proto=WPA2 key_mgmt=WPA-PSK pairwise=CCMP group=CCMP psk="xxxxxxxx" }
Another approach could be to use user-space shell script to "iw <dev> ibss leave" for the lower RSSI stations?
- As I am using batman-adv to build mesh network on the top of
IBSS/adhoc, a similar approach can be done at batman-adv level.
Suggestions?
Thanks. Xuebing Wang
b.a.t.m.a.n@lists.open-mesh.org