Modify

Opened 3 years ago

Last modified 3 years ago

#17679 new defect

Raspberry Pi and WiPi not working

Reported by: mikebrady@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: Cc:

Description

One of the WiFi adapters sold with the Raspberry Pi is the so-called WiPi, in fact a Ralink RT5370. I use it to connect to a WPA network.
On moving from r41440 to r41441 it doesn't connect any more.

Attachments (0)

Change History (13)

comment:1 Changed 3 years ago by j.schauer@…

Note: solution at the end.

I built r42701 and can confirm that my Ralink RT5370 does not show up with ifconfig -a on my Raspberry Pi.

A user in the forum seem to have made similar observations:

https://forum.openwrt.org/viewtopic.php?id=52391

And maybe this is the same as well: https://forum.openwrt.org/viewtopic.php?id=52538

Anyways, here some logs/data from my own system:

the output of wifi status: https://mister-muffin.de/p/nGAb.txt

iw list: https://mister-muffin.de/p/oRlc.txt

uci show wireless: https://mister-muffin.de/p/0pVM.txt

dmesg: https://mister-muffin.de/p/zeMs.txt

My config looks like this:

/etc/config/network:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config interface 'lan'
	option ifname 'eth0'
	option type 'bridge'
	option proto 'dhcp'

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'

config globals 'globals'
	option ula_prefix 'fdd3:b396:94ac::/48'

/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0'
	option htmode 'HT20'
	option disabled '0'

config wifi-iface
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

Solution:

I reverted r41441 and r41442, then I built the latest trunk again. This time everything works just as expected

comment:2 Changed 3 years ago by mikebrady@…

Thanks – I can confirm that your solution works. It's a reasonable workaround.

comment:3 Changed 3 years ago by j.schauer@…

Really? Because I just wanted to correct myself as I seem to not have been careful enough earier. In my case, I have a wlan0 no matter whether r41441 and r41442 are applied. BUT the wlan0 goes away after I do uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi and I can see this effect independent of whether I have r41441 and r41442 applied or not. I did not take care to check for the existance of wlan0 dependent on whether I had enabled the wireless before. And it happened such that I only enabled the wireless when I did NOT have r41441 and r41442 applied, thus giving me the impressien that not having r41441 and r41442 applied fixes the problem.

So even though I'm also running OpenWRT on a Raspberry Pi and am using a Ralink RT5370 based wifi USB dongle, I see a different effect than you do. When you say that you confirm that the workaround works, did you came so far as to actually connecting to a wireless network? Maybe the difference is also only our .config or our content of /etc/config? Could you share your configuration that makes it work for you so that I can try it out over here as well?

comment:4 follow-up: Changed 3 years ago by nbd

It's normal that wlan0 gets removed if wireless is disabled. Once it gets enabled, the interface is re-recreated (as long as the config is sane).

So is it working for you guys now (with a proper config)?

comment:5 in reply to: ↑ 4 Changed 3 years ago by j.schauer@…

Replying to nbd:

It's normal that wlan0 gets removed if wireless is disabled. Once it gets enabled, the interface is re-recreated (as long as the config is sane).

For me, the interface wlan0 exists with wireless *disabled*, then after doing uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi it disappears.

So is it working for you guys now (with a proper config)?

Not working here. Here is my default wireless config (before enabling it):

config wifi-device  radio0
	option type     mac80211
	option channel  11
	option hwmode	11g
	option path	'platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0'
	option htmode	HT20
	# REMOVE THIS LINE TO ENABLE WIFI:
	option disabled 1

config wifi-iface
	option device   radio0
	option network  lan
	option mode     ap
	option ssid     OpenWrt
	option encryption none

comment:6 Changed 3 years ago by mikebrady@…

So, I redid the experiment and it seems to confirm the breakage at r41441. Maybe I'm doing something stupid – it wouldn't be the first time... I believe it shows that the breakage occurs between r41440 and r41441 on a standard build of OpenWrt for a Raspberry Pi (Model B FWIW) adding what I think is the minimum to the build to be able to drive the RT5370 and associate with a WPA Personal network. This post is a bit long, BTW:

Get trunk and go back to r41440:

git clone git://git.openwrt.org/openwrt.git rpi
cd rpi

# go back to r41440
git checkout  0f766540674b26a82d14310da237aa86e777109b

./scripts/feeds update -a
make menuconfig

#Target System > Broadcom BCM2708/BCM2835 
#Kernel modules > Wireless Drivers > kmod-rt2800-usb
#Network > wpa-supplicant

Here is the diffconfig:

mike@ubuntu:~/openwrt/rpi$ ./scripts/diffconfig.sh 
CONFIG_TARGET_brcm2708=y
CONFIG_TARGET_brcm2708_RaspberryPi=y
CONFIG_TARGET_BOARD="brcm2708"
CONFIG_DRIVER_11N_SUPPORT=y
CONFIG_PACKAGE_MAC80211_DEBUGFS=y
CONFIG_PACKAGE_MAC80211_MESH=y
CONFIG_PACKAGE_hostapd-common=y
CONFIG_PACKAGE_iw=y
CONFIG_PACKAGE_kmod-cfg80211=y
CONFIG_PACKAGE_kmod-crypto-aes=y
CONFIG_PACKAGE_kmod-crypto-arc4=y
CONFIG_PACKAGE_kmod-crypto-core=y
CONFIG_PACKAGE_kmod-lib-crc-itu-t=y
CONFIG_PACKAGE_kmod-mac80211=y
CONFIG_PACKAGE_kmod-rt2800-lib=y
CONFIG_PACKAGE_kmod-rt2800-usb=y
CONFIG_PACKAGE_kmod-rt2x00-lib=y
CONFIG_PACKAGE_kmod-rt2x00-usb=y
CONFIG_PACKAGE_wpa-supplicant=y
CONFIG_WPA_SUPPLICANT_INTERNAL=y
mike@ubuntu:~/openwrt/rpi$ 

Build and install.

Edit the wireless configuration so that it looks like this:

root@OpenWrt:/# cat /etc/config/wireless 
config wifi-device  radio0
        option type     mac80211
        option channel  11
        option hwmode   11g
        option path     'platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0'
        option htmode   HT20

config wifi-iface
        option device   radio0
        option network  wlan
        option mode     sta
        option ssid     '<<My Network>>'
        option encryption       psk2+aes
        option key '<<My Password>>'

Reload the wifi configuration:

wifi reload

At this point, the RA5370 associates with the network (a little blue LED lights up). Running ifconfig:

root@OpenWrt:/# ifconfig
eth0      Link encap:Ethernet  HWaddr B8:27:EB:FF:9F:74  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:feff:9f74/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:466 errors:0 dropped:0 overruns:0 frame:0
          TX packets:297 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:34980 (34.1 KiB)  TX bytes:37977 (37.0 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1440 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1440 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:97920 (95.6 KiB)  TX bytes:97920 (95.6 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0F:13:38:07:D4  
          inet6 addr: fe80::20f:13ff:fe38:7d4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:76 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25078 (24.4 KiB)  TX bytes:869 (869.0 B)

After editing /etc/config/network to read:

# Copyright (C) 2006 OpenWrt.org

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface lan
        option ifname   eth0
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

config interface wlan
        option ifname   wlan0
        option proto    dhcp

ifconfig reads as follows:

root@OpenWrt:/# ifconfig
eth0      Link encap:Ethernet  HWaddr B8:27:EB:FF:9F:74  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:feff:9f74/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:599 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:82349 (80.4 KiB)  TX bytes:70788 (69.1 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2910 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2910 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:198832 (194.1 KiB)  TX bytes:198832 (194.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0F:13:38:07:D4  
          inet addr:192.168.2.13  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:13ff:fe38:7d4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:135 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:37238 (36.3 KiB)  TX bytes:5335 (5.2 KiB)

root@OpenWrt:/# 

So, IMHO, everything is in order.

Now,moving to r41441...

git checkout master
git checkout bfbbb266bb4b37eae02d565b8a66fac28344c3a4
make clean
make menuconfig

Here is the diffconfig, which is the same as before, I think:

mike@ubuntu:~/openwrt/rpi$ ./scripts/diffconfig.sh 
CONFIG_TARGET_brcm2708=y
CONFIG_TARGET_brcm2708_RaspberryPi=y
CONFIG_TARGET_BOARD="brcm2708"
CONFIG_DRIVER_11N_SUPPORT=y
CONFIG_PACKAGE_MAC80211_DEBUGFS=y
CONFIG_PACKAGE_MAC80211_MESH=y
CONFIG_PACKAGE_hostapd-common=y
CONFIG_PACKAGE_iw=y
CONFIG_PACKAGE_kmod-cfg80211=y
CONFIG_PACKAGE_kmod-crypto-aes=y
CONFIG_PACKAGE_kmod-crypto-arc4=y
CONFIG_PACKAGE_kmod-crypto-core=y
CONFIG_PACKAGE_kmod-lib-crc-itu-t=y
CONFIG_PACKAGE_kmod-mac80211=y
CONFIG_PACKAGE_kmod-rt2800-lib=y
CONFIG_PACKAGE_kmod-rt2800-usb=y
CONFIG_PACKAGE_kmod-rt2x00-lib=y
CONFIG_PACKAGE_kmod-rt2x00-usb=y
CONFIG_PACKAGE_wpa-supplicant=y
CONFIG_WPA_SUPPLICANT_INTERNAL=y
mike@ubuntu:~/openwrt/rpi$ 

Using the same /etc/config/wireless, when the wifi configuration is loaded:

wifi reload
 <<nothing seems to happen >>

Sure enough, ifconfig reads:

root@OpenWrt:/# ifconfig -a
eth0      Link encap:Ethernet  HWaddr B8:27:EB:FF:9F:74  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:feff:9f74/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:582 errors:0 dropped:0 overruns:0 frame:0
          TX packets:361 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:41478 (40.5 KiB)  TX bytes:47585 (46.4 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1440 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1440 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:97920 (95.6 KiB)  TX bytes:97920 (95.6 KiB)

In conclusion, this is completely repeatable. To answer a previous question, if I build an up-to-date trunk (as of last night – can't remember the rev number) but revert r41441 and r41442, the RA5370 works as expected.

comment:7 follow-up: Changed 3 years ago by nbd

I'm beginning to think that this might have nothing to do with those commits. Your config is buggy. You selected wpa_supplicant, even though the default config already has wpad-mini. I think because of that, it is overwriting the wpad multicall binary with the wpa_supplicant binary, thus breaking AP mode support.
Please check

comment:8 Changed 3 years ago by j.schauer@…

For the record, the only difference between mike's output of ./scripts/diffconfig.sh and mine is:

CONFIG_PACKAGE_wpa-supplicant=y
CONFIG_WPA_SUPPLICANT_INTERNAL=y

And my wifi adapter identifies as:

usb 2-3: New USB device found, idVendor=148f, idProduct=5370
usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-3: Product: 802.11 n WLAN
usb 2-3: Manufacturer: Ralink
[...]
ieee80211 phy2: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
ieee80211 phy2: rt2x00_set_rf: Info - RF chipset 5370 detected

This information matches the packaging of my wireless adapter which claims the Ralink 5370 chipset.

Mike, thanks a lot for your elaborate post! I own a Raspberry Pi B+ but I don't think that should make a difference in terms of this bug.

comment:9 in reply to: ↑ 7 Changed 3 years ago by mikebrady@…

Replying to nbd:

I'm beginning to think that this might have nothing to do with those commits. Your config is buggy. You selected wpa_supplicant, even though the default config already has wpad-mini. I think because of that, it is overwriting the wpad multicall binary with the wpa_supplicant binary, thus breaking AP mode support.
Please check

Hmm – not sure about that; wpad-mini isn't selected in make menuconfig and doesn't show up in the diffconfig listing. If I select it, it does indeed appear in the diffconfig listing as CONFIG_PACKAGE_wpad-mini=y.

Unselecting Network > wpa-supplicant and selecting Network > wpad-mini makes a tiny difference: the list of interfaces includes wlan0, but it's still not possible to associate with an existing WiFi. Here's the output from ifconfig:

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr B8:27:EB:FF:9F:74  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:feff:9f74/64 Scope:Link
          inet6 addr: fdbc:ad1c:48d2::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1812 errors:0 dropped:0 overruns:0 frame:0
          TX packets:806 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:173144 (169.0 KiB)  TX bytes:89776 (87.6 KiB)

eth0      Link encap:Ethernet  HWaddr B8:27:EB:FF:9F:74  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2618 errors:0 dropped:0 overruns:0 frame:0
          TX packets:783 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:372178 (363.4 KiB)  TX bytes:96758 (94.4 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4946 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4946 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:336960 (329.0 KiB)  TX bytes:336960 (329.0 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0F:13:38:07:D4  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Also, on the default /etc/config/wireless configuration, it doesn't appear to start a WiFi access point.

comment:10 Changed 3 years ago by j.schauer@…

Okay, this is also gonna be long. I finally found out where one of my errors was so now I can test properly. My goal is to use the raspberry pi as a wireless access point and I wrongly assumed that hostapd was already installed while it was not. So here is my diffconfig which I will use for my two tests:

CONFIG_TARGET_brcm2708=y  
CONFIG_TARGET_brcm2708_RaspberryPi=y
CONFIG_TARGET_BOARD="brcm2708"
CONFIG_DRIVER_11N_SUPPORT=y
CONFIG_PACKAGE_MAC80211_DEBUGFS=y
CONFIG_PACKAGE_MAC80211_MESH=y
CONFIG_PACKAGE_hostapd=y
CONFIG_PACKAGE_hostapd-common=y
CONFIG_PACKAGE_iw=y
CONFIG_PACKAGE_kmod-cfg80211=y
CONFIG_PACKAGE_kmod-crypto-aes=y
CONFIG_PACKAGE_kmod-crypto-arc4=y
CONFIG_PACKAGE_kmod-crypto-core=y
CONFIG_PACKAGE_kmod-lib-crc-itu-t=y
CONFIG_PACKAGE_kmod-mac80211=y
CONFIG_PACKAGE_kmod-rt2800-lib=y
CONFIG_PACKAGE_kmod-rt2800-usb=y
CONFIG_PACKAGE_kmod-rt2x00-lib=y
CONFIG_PACKAGE_kmod-rt2x00-usb=y

In addition, I have the following two files:

files/etc/config/network:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config interface 'lan'
	option ifname 'eth0'
	option type 'bridge'
	option proto 'dhcp'

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'

config globals 'globals'
	option ula_prefix 'fdd3:b396:94ac::/48'

files/etc/config/wireless:

config wifi-device  radio0
	option type     mac80211
	option channel  11
	option hwmode	11g
	option path	'platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0'
	option htmode	HT20
	# REMOVE THIS LINE TO ENABLE WIFI:
	option disabled 1

config wifi-iface
	option device   radio0
	option network  lan
	option mode     ap
	option ssid     OpenWrtPi
	option encryption none

I do my first test on r42861 without any other modification than the diffconfig and the two config files. I load the image to my SD card, boot the Pi, start dnsmasq on my laptop so that the Pi picks up an IP and then telnet into it and start logread -f | tee log. In another telnet session I then do uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi. Here is the logread output:

Fri Oct 10 11:01:28 2014 kern.info kernel: [  493.945823] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
Fri Oct 10 11:01:28 2014 kern.info kernel: [  493.966075] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
Fri Oct 10 11:01:29 2014 kern.info kernel: [  494.400092] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Fri Oct 10 11:01:29 2014 kern.info kernel: [  494.410641] device wlan0 entered promiscuous mode
Fri Oct 10 11:01:29 2014 kern.info kernel: [  494.462917] br-lan: port 2(wlan0) entered forwarding state
Fri Oct 10 11:01:29 2014 kern.info kernel: [  494.470035] br-lan: port 2(wlan0) entered forwarding state
Fri Oct 10 11:01:29 2014 kern.info kernel: [  494.477101] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Fri Oct 10 11:01:31 2014 kern.info kernel: [  496.461585] br-lan: port 2(wlan0) entered forwarding state
Fri Oct 10 11:01:39 2014 kern.info kernel: [  504.629588] device wlan0 left promiscuous mode
Fri Oct 10 11:01:39 2014 kern.info kernel: [  504.635962] br-lan: port 2(wlan0) entered disabled state
Fri Oct 10 11:01:40 2014 kern.info kernel: [  505.540070] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Fri Oct 10 11:01:40 2014 kern.info kernel: [  505.550384] device wlan0 entered promiscuous mode
Fri Oct 10 11:01:40 2014 kern.info kernel: [  505.557136] br-lan: port 2(wlan0) entered forwarding state
Fri Oct 10 11:01:40 2014 kern.info kernel: [  505.564202] br-lan: port 2(wlan0) entered forwarding state
Fri Oct 10 11:01:40 2014 kern.info kernel: [  505.620197] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Fri Oct 10 11:01:40 2014 daemon.notice netifd: Network device 'wlan0' link is up
Fri Oct 10 11:01:40 2014 daemon.notice netifd: lan (553): Performing a DHCP renew
Fri Oct 10 11:01:40 2014 daemon.notice netifd: lan (553): Sending renew...
Fri Oct 10 11:01:40 2014 daemon.notice netifd: lan (553): Lease of 192.168.100.194 obtained, lease time 14400
Fri Oct 10 11:01:42 2014 kern.info kernel: [  507.561581] br-lan: port 2(wlan0) entered forwarding state

When I now use my laptop to search for the wireless network OpenWrtPi I get no results.

Now in my second test I use r42861 but revert r41441 and r41442. I leave the config and files alone and just recompile. I do the same steps as in the first test and end up with the exact same logread output as above (minus different timestamps of course).

But now there is a difference! When I now use my laptop to search for the wireless network OpenWrtPi I not only get a result but I can even authenticate with it!

In both cases I also collected the dmesg output and it is nearly the same. I think the differences I spotted are not relevant:

@@ -131,22 +131,22 @@
 NET: Registered protocol family 17
 8021q: 802.1Q VLAN Support v1.8
 Waiting for root device /dev/mmcblk0p2...
-mmc0: read SD Status register (SSR) after 2 attempts
-mmc0: new high speed SDHC card at address 0001
 Indeed it is in host mode hprt0 = 00021501
+mmc0: could read SD Configuration register (SCR) at the 2th attempt
+mmc0: new high speed SDHC card at address 0001
 mmcblk0: mmc0:0001 SD4GB 3.67 GiB 
  mmcblk0: p1 p2
+usb 1-1: new high-speed USB device number 2 using dwc_otg
+Indeed it is in host mode hprt0 = 00001101
 EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
 VFS: Mounted root (ext4 filesystem) on device 179:2.
 Freeing unused kernel memory: 100K (c03a1000 - c03ba000)
-usb 1-1: new high-speed USB device number 2 using dwc_otg
-Indeed it is in host mode hprt0 = 00001101
 usb 1-1: New USB device found, idVendor=0424, idProduct=9514
 usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
 hub 1-1:1.0: USB hub found
 hub 1-1:1.0: 5 ports detected
-random: mktemp urandom read with 31 bits of entropy available
 usb 1-1.1: new high-speed USB device number 3 using dwc_otg
+random: mktemp urandom read with 28 bits of entropy available
 usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
 usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
 smsc95xx v1.0.4

As the last part of this update, here is the full dmesg output for the first (non-working) case:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.18 (josch@hoothoot) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42861) ) #5 Fri Oct 10 12:53:37 CEST 2014
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 114688
[    0.000000] free_area_init_node: node 0, pgdat c03c2788, node_mem_map dbc78000
[    0.000000]   Normal zone: 896 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 114688 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113792
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x10 bcm2708.serial=0x928da16e smsc95xx.macaddr=B8:27:EB:8D:A1:6E bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 rpitestmode=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 450416K/458752K available (2859K kernel code, 163K rwdata, 820K rodata, 102K init, 315K bss, 8336K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xdc800000 - 0xff000000   ( 552 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc03a0110   (3681 kB)
[    0.000000]       .init : 0xc03a1000 - 0xc03ba9bc   ( 103 kB)
[    0.000000]       .data : 0xc03bc000 - 0xc03e4d9c   ( 164 kB)
[    0.000000]        .bss : 0xc03e4d9c - 0xc043399c   ( 315 kB)
[    0.000000] NR_IRQS:394
[    0.000019] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483648000ns
[    0.000054] Switching to timer-based delay loop
[    0.000313] Console: colour dummy device 80x30
[    0.000773] console [tty1] enabled
[    0.000821] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[    0.000865] pid_max: default: 32768 minimum: 301
[    0.001028] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001067] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001709] CPU: Testing write buffer coherency: ok
[    0.002084] Setting up static identity map for 0x102d0 - 0x1032c
[    0.003418] devtmpfs: initialized
[    0.004567] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.005100] NET: Registered protocol family 16
[    0.009959] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.010489] cpuidle: using governor ladder
[    0.010533] cpuidle: using governor menu
[    0.010923] bcm2708.uart_clock = 0
[    0.012406] mailbox: Broadcom VideoCore Mailbox driver
[    0.012502] bcm2708_vcio: mailbox at f200b880
[    0.012597] bcm_power: Broadcom power driver
[    0.012628] bcm_power_open() -> 0
[    0.012649] bcm_power_request(0, 8)
[    0.513355] bcm_mailbox_read -> 00000080, 0
[    0.513384] bcm_power_request -> 0
[    0.513404] Serial: AMBA PL011 UART driver
[    0.513534] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3
[    0.826487] console [ttyAMA0] enabled
[    0.854823] bio: create slab <bio-0> at 0
[    0.859933] SCSI subsystem initialized
[    0.863939] usbcore: registered new interface driver usbfs
[    0.869585] usbcore: registered new interface driver hub
[    0.875094] usbcore: registered new device driver usb
[    0.881543] Switched to clocksource stc
[    0.898270] NET: Registered protocol family 2
[    0.903815] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.910967] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.917526] TCP: Hash tables configured (established 4096 bind 4096)
[    0.923985] TCP: reno registered
[    0.927235] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.933126] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.939717] NET: Registered protocol family 1
[    0.944723] bcm2708_dma: DMA manager at f2007000
[    0.949478] bcm2708_gpio: bcm2708_gpio_probe c03c5630
[    0.954976] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    0.964336] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.971454] msgmni has been set to 879
[    0.976070] io scheduler noop registered
[    0.980021] io scheduler deadline registered
[    0.984417] io scheduler cfq registered (default)
[    0.989455] BCM2708FB: allocated DMA memory 5b8f0000
[    0.994495] BCM2708FB: allocated DMA channel 0 @ f2007000
[    1.003857] Console: switching to colour frame buffer device 82x26
[    1.023067] brd: module loaded
[    1.032469] loop: module loaded
[    1.037244] vchiq: vchiq_init_state: slot_zero = 0xdc804000, is_master = 0
[    1.046697] usbcore: registered new interface driver smsc95xx
[    1.054124] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.261812] Core Release: 2.80a
[    1.266308] Setting default values for core params
[    1.272436] Finished setting default values for core params
[    1.479537] Using Buffer DMA mode
[    1.484182] Periodic Transfer Interrupt Enhancement - disabled
[    1.491315] Multiprocessor Interrupt Enhancement - disabled
[    1.498175] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.503809] Dedicated Tx FIFOs mode
[    1.508732] WARN::dwc_otg_hcd_init:1042: FIQ DMA bounce buffers: virt = 0xdcc20000 dma = 0x5b95c000 len=9024
[    1.521107] FIQ FSM acceleration enabled for :
[    1.521107] Non-periodic Split Transactions
[    1.521107] Periodic Split Transactions
[    1.521107] High-Speed Isochronous Endpoints
[    1.542865] dwc_otg: Microframe scheduler enabled
[    1.542922] WARN::hcd_init:473: FIQ at 0xc01f8834
[    1.548917] WARN::hcd_init:474: FIQ ASM at 0xc000cac0 length 36
[    1.556138] WARN::hcd_init:500: MPHI regs_base at 0xdcc1a000
[    1.563114] dwc_otg bcm2708_usb: DWC OTG Controller
[    1.569304] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    1.577864] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    1.584663] Init: Port Power? op_state=1
[    1.589807] Init: Power Port (0)
[    1.594596] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.602717] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.611190] usb usb1: Product: DWC OTG Controller
[    1.617151] usb usb1: Manufacturer: Linux 3.14.18 dwc_otg_hcd
[    1.624155] usb usb1: SerialNumber: bcm2708_usb
[    1.630827] hub 1-0:1.0: USB hub found
[    1.635961] hub 1-0:1.0: 1 port detected
[    1.641604] dwc_otg: FIQ enabled
[    1.641623] dwc_otg: NAK holdoff enabled
[    1.641632] dwc_otg: FIQ split-transaction FSM enabled
[    1.641655] Module dwc_common_port init
[    1.642049] usbcore: registered new interface driver usb-storage
[    1.649620] mousedev: PS/2 mouse device common for all mice
[    1.656646] bcm2708 watchdog, heartbeat=10 sec (nowayout=0)
[    1.663528] sdhci: Secure Digital Host Controller Interface driver
[    1.670920] sdhci: Copyright(c) Pierre Ossman
[    1.676601] sdhci: Enable low-latency mode
[    1.721596] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[    1.731943] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[    1.739173] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.746712] TCP: cubic registered
[    1.751357] NET: Registered protocol family 17
[    1.757228] 8021q: 802.1Q VLAN Support v1.8
[    1.766929] Waiting for root device /dev/mmcblk0p2...
[    1.844374] mmc0: read SD Status register (SSR) after 2 attempts
[    1.859390] mmc0: new high speed SDHC card at address 0001
[    1.866875] Indeed it is in host mode hprt0 = 00021501
[    1.933467] mmcblk0: mmc0:0001 SD4GB 3.67 GiB 
[    1.940701]  mmcblk0: p1 p2
[    2.054097] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
[    2.064465] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.072270] Freeing unused kernel memory: 100K (c03a1000 - c03ba000)
[    2.080307] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.088420] Indeed it is in host mode hprt0 = 00001101
[    2.292048] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    2.300253] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.309759] hub 1-1:1.0: USB hub found
[    2.315118] hub 1-1:1.0: 5 ports detected
[    2.595957] random: mktemp urandom read with 31 bits of entropy available
[    2.604524] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    2.711941] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    2.720400] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.733333] smsc95xx v1.0.4
[    2.795558] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:8d:a1:6e
[    2.901679] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[    3.029286] usb 1-1.3: New USB device found, idVendor=148f, idProduct=5370
[    3.037795] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.046666] usb 1-1.3: Product: 802.11 n WLAN
[    3.052515] usb 1-1.3: Manufacturer: Ralink
[    3.058112] usb 1-1.3: SerialNumber: 1.0
[    5.789650] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    8.182860] NET: Registered protocol family 10
[    8.219766] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.239902] hidraw: raw HID events driver (C) Jiri Kosina
[    8.278904] Loading modules backported from Linux version master-2014-09-26-0-g25e3efa
[    8.289400] Backport generated by backports.git backports-20140905-1-gde42785
[    8.302084] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.317742] nf_conntrack version 0.5.0 (7039 buckets, 28156 max)
[    8.342267] usbcore: registered new interface driver usbhid
[    8.349177] usbhid: USB HID core driver
[    8.372660] xt_time: kernel timezone is -0000
[    8.394602] cfg80211: Calling CRDA to update world regulatory domain
[    8.412137] cfg80211: World regulatory domain updated:
[    8.418692] cfg80211:  DFS Master region: unset
[    8.423178] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    8.436682] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    8.447565] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    8.458591] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    8.469763] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[    8.481136] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    8.492509] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    8.503955] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[    8.515435] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[    8.579825] PPP generic driver version 2.4.2
[    8.588047] NET: Registered protocol family 24
[    8.691687] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[    8.812371] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[    8.844240] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[    8.854095] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    8.856332] usbcore: registered new interface driver rt2800usb
[   10.400580] random: nonblocking pool is initialized
[   15.242143] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   15.252186] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.267927] device eth0 entered promiscuous mode
[   15.283081] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   17.101474] smsc95xx 1-1.1:1.0 eth0: link up, 10Mbps, full-duplex, lpa 0x4C61
[   17.133629] br-lan: port 1(eth0) entered forwarding state
[   17.140874] br-lan: port 1(eth0) entered forwarding state
[   17.148232] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   17.171723] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   17.190304] smsc95xx 1-1.1:1.0 eth0: link down
[   18.121639] br-lan: port 1(eth0) entered disabled state
[   19.526454] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   19.556294] br-lan: port 1(eth0) entered forwarding state
[   19.563433] br-lan: port 1(eth0) entered forwarding state
[   21.561569] br-lan: port 1(eth0) entered forwarding state
[  493.945823] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  493.966075] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
[  494.400092] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  494.410641] device wlan0 entered promiscuous mode
[  494.462917] br-lan: port 2(wlan0) entered forwarding state
[  494.470035] br-lan: port 2(wlan0) entered forwarding state
[  494.477101] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  496.461585] br-lan: port 2(wlan0) entered forwarding state
[  504.629588] device wlan0 left promiscuous mode
[  504.635962] br-lan: port 2(wlan0) entered disabled state
[  505.540070] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  505.550384] device wlan0 entered promiscuous mode
[  505.557136] br-lan: port 2(wlan0) entered forwarding state
[  505.564202] br-lan: port 2(wlan0) entered forwarding state
[  505.620197] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  507.561581] br-lan: port 2(wlan0) entered forwarding state

comment:11 follow-up: Changed 3 years ago by Toby

Very well spotted.
I can absolutely confirm this problem.

In my case I build the latest barrier breaker (14.07) branch. When I try to search for wireless networks I only get errors:

root@OpenWrt:~# iwlist wlan0 scanning
wlan0     No scan results
root@OpenWrt:~# iwinfo wlan0 scan
Scanning not possible
root@OpenWrt:~# iw dev wlan0 scan
(no output)

I now remove the two kernel patches that were added in r41441 and another one which was added later but depends on these two.

rm package/kernel/mac80211/patches/910-00-rt2x00-enable-rt2800soc-for-mt7620.patch 
rm package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
rm package/kernel/mac80211/patches/925-rt2x00-backport_rf5362.patch

Recompile and flash to SD.

Now scanning reveals my networks and everything seems to be fine.
This solved my problem - thank you very much!

comment:12 Changed 3 years ago by garthpen

Many thanks to the above posters.

I can confirm this works with a Panda Ralink RT5370 plugged into a Netgear WNDR3700 running OpenWrt Chaos Calmer r43063 kernel 3.14.22 compiled with the patches removed as suggested.

comment:13 in reply to: ↑ 11 Changed 3 years ago by tlg

Replying to Toby:

Very well spotted.
I can absolutely confirm this problem.

In my case I build the latest barrier breaker (14.07) branch. When I try to search for wireless networks I only get errors:

root@OpenWrt:~# iwlist wlan0 scanning
wlan0     No scan results
root@OpenWrt:~# iwinfo wlan0 scan
Scanning not possible
root@OpenWrt:~#

iw dev wlan0 scan

(no output)
}}}

I now remove the two kernel patches that were added in r41441 and another one which was added later but depends on these two.

rm package/kernel/mac80211/patches/910-00-rt2x00-enable-rt2800soc-for-mt7620.patch 
rm package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
rm package/kernel/mac80211/patches/925-rt2x00-backport_rf5362.patch

Recompile and flash to SD.

Now scanning reveals my networks and everything seems to be fine.
This solved my problem - thank you very much!

I can confirm that this fix also works with various Ralink devices on TP Link MR3020 and other AR933x based routers running a build based on BB r43321.

See also this thread on discussion forum for details:

https://forum.openwrt.org/post.php?tid=53848

Thanks to Toby et al for locating the issue.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.