Closed maurovm closed 3 years ago
Adding to the description of my problem. From time to time, CSI collection could not even start. When executing "tcpdump", I get the following kernel error (shown by dmesg):
[ 156.362831] device wlan0 entered promiscuous mode
[ 158.872825] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[ 158.876305] ieee80211 phy0: _brcmf_set_multicast_list: Setting mcast_list failed, -110
[ 161.432816] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[ 161.436293] ieee80211 phy0: _brcmf_set_multicast_list: Setting allmulti failed, -110
[ 163.992809] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[ 163.996285] ieee80211 phy0: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -110
[ 166.552800] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[ 169.112819] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
Any ideas why it might happened?
Other times, I can collect CSI for a few minutes. Afterwards, it crashes with the following kernel error (as reported by dmesg):
[ 149.307285] device wlan0 entered promiscuous mode
[ 188.962074] ieee80211 phy0: brcmf_fw_crashed: Firmware has halted or crashed
[ 264.287049] device wlan0 left promiscuous mode
[ 266.797301] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[ 266.800779] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
Problem 1:
Not sure about this one. Btw. there is no need to use the nexmon firmware on PI_TX if you are just connecting to an AP and use ping
or iperf
to generate traffic.
Problem 2: This is correct. Please have a second look at the readme.
Problem 3:
Traffic generated by ping
or iperf
does not necessarily translate to constant Wi-Fi traffic.
Have a look at the tcpdump
manual for explanations of those numbers and options to control them.
Problem 4: This might be related to AMSDUs, please try this fix and report back.
Dear Jakob,
Thanks for the suggestions, they helped a lot. Please see below my answers:
Problem 1: Not sure about this one. Btw. there is no need to use the nexmon firmware on PI_TX if you are just connecting to an AP and use
ping
oriperf
to generate traffic.
The problem is that my MacBook does not tag frames with 0x88. Therefore, if I do:
$ makecsiparams -c 36/80 -C 1 -N 1 -m MAC_ADDRESS
I get traffic from the laptop. However, I need to add "-b 0x88" if I use a Raspberry Pi to generate traffic.
Problem solved.
Problem 2: This is correct. Please have a second look at the readme.
Thank you, problem solved.
Problem 3: Traffic generated by
ping
oriperf
does not necessarily translate to constant Wi-Fi traffic. Have a look at thetcpdump
manual for explanations of those numbers and options to control them.
Got it, problem solved.
Problem 4: This might be related to AMSDUs, please try this fix and report back.
The fix you pointed out (by mzakharo) worked really well in my setup. I am now able to collect CSI data more consistently. I started/stoped CSI collection several times and left it for 30 minutes without any issues so far. Dropped packages are far less than what I had before too, which is wonderful. However, I noticed a kernel error reporting an incorrect file "brcmfmac43455-sdio.raspberrypi,4-model-b.txt":
[ 4.784266] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 4.797892] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 4.798461] usbcore: registered new interface driver brcmfmac
[ 4.826801] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
[ 5.213790] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 5.224916] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Feb 3 2021 11:06:42 version 7.45.189 (nexmon.org/csi: 55dc-2)
[ 5.270728] ieee80211 phy0: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 106
The above error does not seem to affect data collection, but I am not sure. Do you have some pointers on how to hunt for what might be the causes?
That is the brcmfmac
driver complaining about a missing nvram config file named brcmfmac43455-sdio.raspberrypi,4-model-b.txt
in /lib/firmware/brcm/
.
As you already figured it might be fine to just ignore it.
If you want to fix it, you can try renaming /lib/firmware/brcm/brcmfmac43455-sdio.txt
to /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
.
The file "/lib/firmware/brcm/brcmfmac43455-sdio.txt" looks to have important NVRAM flags. Reading the error logs and differences when I do and don't rename the file, it seems when it fails to find "brcmfmac43455-sdio.raspberrypi,4-model-b.txt" it retries with "brcmfmac43455-sdio.txt". Although I cannot verify this.
We are preparing to carry a lengthy research study. Do you have any pointers on how to begin debugging this?. One of my students will work on getting prepared the hardware to record data and I would like him to spend some time verifying this problem.
It seems you can find the correct brcmfmac43455-sdio.raspberrypi,4-model-b.txt
file here:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/brcm.
If no nvram file is loaded the firmware has fallback values that it uses instead.
Thanks Jakob for all your help, this really helps. I am now closing this issue
I want to collect CSI packets at regular intervals. However, I found several bottlenecks that I hope you can help me.
Wifi router:
Traffic generation:
The computer that generates packets, let's call it "PI_TX" here for simplicity, has the following specs:
I had not have any issues following the instructions and install the required software. After rebooting, the computer loads the correct module, as the output ofd the following command:
Show the module version 7.45.189:
The machine can successfully connect to the wifi router, ping any machine in the network, browse the internet, etc.
The output of the "iw dev" command is (I replaced my MAC address and name of my network):
Which shows the correct channel and bandwidth.
To generate traffic, I ping either the wifi router or another machine in the network with:
or:
Both of the commands above work
CSI collection:
The computer that will collect CSI packets, let's call it "PI_RX" here for simplicity, has the following specs:
After each reboot, run the following command to monitor the network:
I veriy that the wifi card was correctly set. The command:
gives me the result:
Enable monitoring mode with:
The output of the "iw dev" command is (I replaced my MAC address and name of my network):
I attempted to Collect CSI traffic with the following command:
Description of the problem:
There are some inconsistent behaviour when trying to Collect CSI. I have read the other issues raised in the "nexmon" and "nexmon_csi" repositories but could not solve my problems.
Problem 1: After I start the "tcpdump" command in the PI_RX machine, I have to run (in the PI_TX machine):
Problem 2: The packages I receive in the PI_RX machine are in the format:
Is this correct?, I would have expected to see the IP address of either the PI_TX or target machine. Several of the packages have empty contents.
Problem 3: Several packages are lost. The number of lost packages is not consistent, even when I attempt to run the experiments under similar conditions. An example of the output of tcpdump is:
I am also surprised about the differences between packets captured and packets received. I only had the wifi router, the PI_RX and PI_TX machines connected in an empty room that resembles a Faraday cage. I attempted to stop any service, daemons or other software that is not needed in the Rasberry Pi. Maybe there are other kernel and network traffic generated?
Problem 4: After collecting CSI for a few rounds, if I attempt to run any command that checks the state the wlan0 interface (such as "iw dev" or "nexutil -k",...), the commands take a long time to finish and the wifi configuration get's broken. For example, "iw dev" results in (note that I replaced my MAC address intentionally):
The command "nexutil -k" results in
"dmesg" has some logs similar to:
This problems occurs very often. The only way to solve it is to reboot the machine.
Thank you for all your help