Wifi Freezes

I’m running Arch Linux on my beagle bone and trying to use a ralink based wifi/usb adapter to do some packet sniffing.

When I try to bring the wireless interface up:

iwconfig wlan0 mode monitor ifconfig wlan0 up

The Rx packets freeze. There are no errors in /var/log/kernel.log or /var/log/errors.log and no error messages print to the terminal.

I can usually get the interface to get up and monitoring if I try 5-10 times to just send it down and bring it back up again. But sometimes it will run for a while and then just stop receiving packets again.

This is my fix:

ifconfig wlan0 down; ifconfig wlan0 up; ifconfig wlan0

What could be causing this kind of behaviour?

Hi Chris,

I'm not sure what kernel patchset/config ARCH is using for the Bone.

But, try disabling power management for the Ralink..

iwconfig wlan0 power off

Regards,

Hi Robert,

Thanks for the suggestion, it sounded really promising, but no luck!

Here is another way to demonstrate the behaviour.

`
[root@alarm ~]# iwconfig wlan0
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on

[root@alarm ~]# iwconfig wlan0 power off
[root@alarm ~]# iwconfig wlan0
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

[root@alarm ~]# ifconfig wlan0 up
[root@alarm ~]# iwlist wlan0 scan
wlan0 No scan results

[root@alarm ~]# iwlist wlan0 scan
wlan0 No scan results

[root@alarm ~]# iwlist wlan0 scan
wlan0 No scan results

[root@alarm ~]# ifconfig wlan0 down; ifconfig wlan0 up;
[root@alarm ~]# iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: C4:01:7C:51:49:98
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=23/70 Signal level=-87 dBm
Encryption key:on
ESSID:""
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
`
I cut off the rest of the scan results…

I noticed that dmesg prints this message sometimes, but it prints it regardless of whether the wireless interface starts working or not.

ADDRCONF(NETDEV_UP): wlan0: link is not ready

Any other ideas? Or how can I figure out

Thanks

Hi Chris,

So, what kernel is this? (uname -r)..

if it's the v3.2.x kernel, i'd try swapping DMA for PIO mode (or vice
versa) in your config:

CONFIG_USB_TI_CPPI41_DMA_HW=y
# CONFIG_MUSB_PIO_ONLY is not set
# CONFIG_USB_INVENTRA_DMA is not set
# CONFIG_USB_TI_CPPI_DMA is not set
CONFIG_USB_TI_CPPI41_DMA=y

Regards,

Hi Robert,

I’m running 3.2.21-3-ARCH

That’s a really interesting suggestion. Have you seen issues like this using DMA?

I don’t have a build environment set up. I’ve been using the kernel image and root filesystem that I downloaded from Arch Linux ARM. Is it possible to change these options without recompiling the kernel?

Thanks,
Chris

It looks like these are the kernel options that my kernel image was compiled with: