Modify

Opened 5 years ago

Closed 5 years ago

#12751 closed defect (worksforme)

WiFi not working on latest trunk

Reported by: socram8888@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

Apparently /sbin/wifi is calling setup_interface on /lib/network/config.sh before the network.interface.lan is up, ubus throws "Command failed: not found" and Wifi does not start.

Using "/etc/init.d/network restart" does not work either.

The system is a Comtrend CT5365 router, running the latest bcm63xx version from the svn trunk repository. The profile is Broadcom BCM43xx WiFi, using the propietary wl.o driver. Compiled with the preset packages.

Attached is a quick workaround for the problem.

Attachments (1)

wifi_patch (341 bytes) - added by socram8888@… 5 years ago.
Quick workaround

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by socram8888@…

Quick workaround

comment:1 Changed 5 years ago by socram8888@…

Forgot something: using "wifi down; wifi" to restart the WiFi driver does not work. I have to use "/etc/init.d/network restart" with the patch applied to restart the wifi network without rebooting the device.

I don't know if it is relevant or not, but I am using my device as a Wifi-Ethernet bridge, and I have it configured as stated on the Wiki: http://wiki.openwrt.org/doc/recipes/bridgedclient

comment:2 Changed 5 years ago by nlh

This can happen with the firewall as well if you have more than a basic network configuration (attempting to initialize before the lan is up).

comment:3 Changed 5 years ago by freifunk@…

I found the same problem exists in the Attitude adjustment branch. Calling 'wifi' will restart the wifi interface but not the associated network. Also the patch by socram8888 (add a sleep before the error happens) didn't help here. Here is some information that hopefully helps to kill that bug:

ATTITUDE ADJUSTMENT (Attitude Adjustment, r35153) running on WR1043ND with ath9k.

/etc/config/wireless, only option network changed here

config wifi-device  radio0
	option type     mac80211
	option channel  11
	option macaddr	f8:d1:11:90:f0:86
	option hwmode	11ng
	option htmode	HT20
	list ht_capab	SHORT-GI-40
	list ht_capab	DSSS_CCK-40
	# REMOVE THIS LINE TO ENABLE WIFI:
	option disabled 0

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

The wireless0 interface in /etc/config/network

config interface 'wireless0'
	option dns '8.8.8.8 212.204.49.83 141.1.1.1'
	option netmask '255.255.192.0'
	option proto 'static'
	option ipaddr '10.11.0.100'
root@10-11-0-100:~# ifconfig  wlan0
wlan0     Link encap:Ethernet  HWaddr F8:D1:11:90:F0:86  
          inet addr:10.11.0.100  Bcast:10.11.63.255  Mask:255.255.192.0
          inet6 addr: fdca:ffee:ffa:64::1/64 Scope:Global
          inet6 addr: fe80::fad1:11ff:fe90:f086/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:0 (0.0 B)  TX bytes:1412 (1.3 KiB)

root@10-11-0-100:~# wifi
Command failed: Not found
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr f8:d1:11:90:f0:86 and ssid "OpenWrt"
Command failed: Not found
root@10-11-0-100:~# ifconfig  wlan0
wlan0     Link encap:Ethernet  HWaddr F8:D1:11:90:F0:86  
          inet6 addr: fe80::fad1:11ff:fe90:f086/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:0 (0.0 B)  TX bytes:460 (460.0 B)

When i add set -x to /lib/wifi i can see where the problem is:

[...]
+ setup_interface wlan0 wireless0  
+ local iface=wlan0
+ local config=wireless0
+ [ -n wireless0 ]
+ ubus call network.interface.wireless0 add_device { "name": "wlan0" }
Command failed: Not found
[...]

So, like the op said it happens in the start_net function in /lib/wifi. Imo this should get a high priority because it also affects changing interface settings in LuCI.


comment:4 Changed 5 years ago by freifunk@…

to correct myself: the problem is in /sbin/wifi, not /lib/wifi as i wrote above

comment:5 Changed 5 years ago by socram8888@…

Just a note: my quick fix is far from perfect. You have to manually reset the network using "/etc/init.d/network restart" every time you power on the device. Without the patch, this command does not work either.

The patch is therefore just a temporary fix for those who have no other choice.

comment:6 Changed 5 years ago by nbd

  • Resolution set to worksforme
  • Status changed from new to closed

looks like an old bug that was fixed a long time ago

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.