BCM/CYW4354 no station dump output in IBSS mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DoDe_3713491
Level 1
Level 1

Hello,

we have an IBSS network composed of 3 nodes. The nodes use an Nvidia Jetson TX2 SoC and a BCM4354 module for wireless connectivity. The brcmfmac driver is used. The network performance is very good and every node is able to reach the other ones. However, the command "iw dev wlan0 station dump" reports an empty output on all the nodes. It seems to us that the firmware brcm4354-sdio.bin does not report information of the IBSS stations to the driver.

Thanks in advance for your help.

0 Likes
14 Replies
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

iw dev wlan0 station dump should work if the STA is associated to an AP. I am able to observe the station statistics if CYW4354 is associated to an AP.

root@imx6ulevk:~# iw dev wlan0 station dump

Station 00:90:4c:50:02:04 (on wlan0)

        inactive time:  0 ms

        rx bytes:       350

        rx packets:     3

        tx bytes:       5125

        tx packets:     29

        tx failed:      1

        signal:         -59 [-59] dBm

        tx bitrate:     24.0 MBit/s

        rx bitrate:     2359.2 MBit/s

        authorized:     no

        authenticated:  yes

        WMM/WME:        yes

        TDLS peer:      no

        connected time: 8 seconds

This was tested with the latest firmware from Kong release https://community.cypress.com/docs/DOC-19000.

Hello,

thanks for your prompt response. Please note that my question was related to IBSS mode, i.e. "iw dev wlan0 station dump" output is empty when we use IBSS. Conversely, if we set wlan0 in station mode "iw dev wlan0 station dump" output is not empty. Could you please test the "station dump" command in IBSS mode?

Thanks,

Domenico

0 Likes

Hello,

do you have any updates?

Thanks,

Domenico

0 Likes

Sorry for the delay. Yes, we do observe that the iw dev wlan0 station dump is empty when tested in IBSS mode. We are debugging further to understand the issue.

Thank you so much.

Domenico

0 Likes

Does iw dev wlan0 station get <macaddr> work in your setup in IBSS mode? It points to the same underlying function to print the statistics.

0 Likes
DoDe_3713491
Level 1
Level 1

Hello,

the

   iw dev wlan0 station get <macaddr>

commands generates "a sort of output", but the generated output seems to be "random" (or at least it does not depend on the given <macaddr>).

The output is almost the same, whether provided <macaddr> is the MAC address of an actually connected station or if it is a fake address.

Output with the MAC address of an actually connected station:

iw dev wlanmesh station get 00:04:4b:c7:76:35

Station 00:04:4b:c7:76:35 (on wlanmesh)

rx packets: 3006143

tx packets: 2824883

tx failed: 1608

signal:  -62 dBm

tx bitrate: 130.0 MBit/s

Output with a fake MAC address:

iw dev wlanmesh station get aa:bb:cc:dd:ee:ff

Station aa:bb:cc:dd:ee:ff (on wlanmesh)

rx packets: 3003673

tx packets: 2822331

tx failed: 1608

signal:  -65 dBm

tx bitrate: 144.0 MBit/s

It seems that the driver is always reporting the stats of the same connected station, ignoring the provided MAC address.

Domenico

0 Likes

Hello,

do you have any updates?

Thanks,

Domenico

0 Likes

Sorry we are still checking the issue. We are checking the underlying implementation of handle_station_dump().

0 Likes

I have gone through the code implementation. Basically iw dev wlan0 station dump calls handle_station_dump() in the iw source code. This will send the command NL80211_CMD_GET_STATION to the nl80211 layer. Inside this layer, it will call nl80211_dump_station() which will eventually call brcmf_cfg80211_dump_station() in cfg80211 layer in cfg80211.c. This function sends the IOCTL BRCMF_C_GET_ASSOCLIST which in AP mode, returns the MAC address of associated clients and if there is no error, it proceeds further to call brcmf_cfg80211_get_station() to retrieve the required statistics. However, this IOCTL is not supported in IBSS mode. As a result, the IOCTL call fails with -EOPNOTSUPP and brcmf_cfg80211_get_station() is not called. That is the reason why the statistics are not shown in IBSS mode when using iw dev wlan0 station dump.

Which means that iw dev wlan0 station get would be used. In this case, the function flow is similar to above and brcmf_cfg80211_get_station() is called at the cfg80211 layer. Here it will check for IBSS mode and if it is set, it will call brcmf_cfg80211_get_station_ibss(ifp, sinfo). In this function, information on the following bits will be collected:

NL80211_STA_INFO_TX_BITRATE

NL80211_STA_INFO_SIGNAL

NL80211_STA_INFO_RX_PACKETS

NL80211_STA_INFO_RX_DROP_MISC

NL80211_STA_INFO_TX_PACKETS

NL80211_STA_INFO_TX_FAILED

Note that the mac address parameter is not used in the above function so that could explain why changing the MAC address has no effect on the stats.

Hello,

thanks for your answer. Thus, it seems to me that if I have one station that has 2 IBSS peers only the information related to one of the peers is reported. Is that correct? Assuming that I have the MAC addresses of all the peers, is there a command that I could use to retrieve the information related to all of them?

Thanks,

Domenico

0 Likes

I see the following IOCTLs called inside brcmf_cfg80211_get_station_ibss():

BRCMF_C_GET_RATE

BRCMF_C_GET_RSSI

BRCMF_C_GET_GET_PKTCNTS

The first IOCTL reads the 802.11 rate set in 4354. The second IOCTL measures moving average RSSI of 4354 when it is connected to peer device. The third IOCTL obtains the pktcnt containing the transmit and receive stats of 4354. I do not see the MAC address being used in the above IOCTLs, so the MAC address is a dummy variable in IBSS mode. However, in infra mode, the MAC address is actually used in IOVARs "tdls_sta_info" and "sta_info" to collect the relevant stats of 4354. Even in the iw document https://wireless.wiki.kernel.org/en/users/documentation/iw#getting_station_statistics_against_a_peer the peer device is reported as AP. Which means that in IBSS mode, only the RSSI from peer device is being reported by 4354. Maybe scan command iw dev wlan0 scan could retrieve some information from peer device.

0 Likes

Hello,

unfortunately the iw dev wlan0 scan command does not report the RSSI values of the IBSS peers. Does Cypress plan to fix this problem in the future fw/driver releases?

Thanks,

Domenico

0 Likes

Thanks for the feedback. Generally the scanresults would provide the RSSI at least for infra mode although I have not checked for IBSS. But I find it strange that iw dev wlan0 station get returns the signal strength but iw dev wlan0 scan fails to report the signal strength. Could you please show the iw scan results for IBSS as well as infra mode? If you use wl scan followed by wl scanresults for IBSS, do you see the same problem? We will investigate the issue and get back on the next course of action.

0 Likes