delphidave / openwrt-on-dir-320-b1

Automatically exported from code.google.com/p/openwrt-on-dir-320-b1
0 stars 0 forks source link

wifi не запускается при загрузке роутера #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Прошивка: openwrt-AA-std-12.06.2013.bin 

лог:
Jun 12 22:50:35 OpenWrt daemon.info pppd[1180]: PPP session is 1679
Jun 12 22:50:35 OpenWrt daemon.warn pppd[1180]: Connected to 00:1b:21:48:ee:d1 
via interface eth0.2
Jun 12 22:50:35 OpenWrt daemon.info pppd[1180]: Using interface pppoe-wan
Jun 12 22:50:35 OpenWrt daemon.notice pppd[1180]: Connect: pppoe-wan <--> eth0.2
Jun 12 22:50:36 OpenWrt kern.info kernel: [   75.430000] ADDRCONF(NETDEV_UP): 
wlan0: link is not ready
Jun 12 22:50:36 OpenWrt user.info sysinit: Configuration file: 
/var/run/hostapd-phy0.conf
Jun 12 22:50:36 OpenWrt user.info sysinit: nl80211: Failed to add interface 
wlan0 into bridge eth0.1: Operation not supported
Jun 12 22:50:36 OpenWrt user.info sysinit: nl80211 driver initialization failed.
Jun 12 22:50:36 OpenWrt user.info sysinit: Failed to start hostapd for phy0
Jun 12 22:50:38 OpenWrt daemon.info pppd[1180]: CHAP authentication succeeded
Jun 12 22:50:38 OpenWrt daemon.notice pppd[1180]: CHAP authentication succeeded
Jun 12 22:50:38 OpenWrt daemon.notice pppd[1180]: peer from calling number 
00:1B:21:48:EE:D1 authorized

Original issue reported on code.google.com by Dofer.m...@gmail.com on 16 Jun 2013 at 8:36

GoogleCodeExporter commented 9 years ago
можно ваш /etc/config/wireless (пароль можете 
затереть)

Original comment by xakep6...@gmail.com on 17 Jun 2013 at 7:18

GoogleCodeExporter commented 9 years ago
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11ng'
        option macaddr 'b8:a3:86:b6:b6:ae'
        option htmode 'HT20'
        list ht_capab 'GF'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        option txpower '20'
        option country 'UA'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'DoferHomeNetwork'
        option encryption 'psk-mixed'
        option key '*********'

Original comment by Dofer.m...@gmail.com on 17 Jun 2013 at 7:23

GoogleCodeExporter commented 9 years ago
попробуйте после option type 'mac80211' в следующей 
строке добавить option path 'platform/rt2800_wmac.0'

Original comment by xakep6...@gmail.com on 17 Jun 2013 at 1:20

GoogleCodeExporter commented 9 years ago
не помогло

Jun 18 07:48:36 OpenWrt daemon.notice pppd[1222]: Connect: pppoe-wan <--> eth0.2
Jun 18 07:48:36 OpenWrt user.info sysinit: Configuration file: 
/var/run/hostapd-phy0.conf
Jun 18 07:48:36 OpenWrt user.info sysinit: nl80211: Failed to add interface 
wlan0 into bridge eth0.1: Operation not supported
Jun 18 07:48:36 OpenWrt user.info sysinit: nl80211 driver initialization failed.
Jun 18 07:48:36 OpenWrt user.info sysinit: Failed to start hostapd for phy0

но, добавив в /etc/rc.local строку 
wifi up
перед exit

wifi таки оживает

Original comment by Dofer.m...@gmail.com on 18 Jun 2013 at 8:35

GoogleCodeExporter commented 9 years ago
Для тех, кто не хочет портить rc.local можно 
сделать так:
(правим /etc/init.d/network, ОСТОРОЖНО!!! если 
накосячите, роутер не будет виден по сети 
никак)
1)start() {
        stop
        [ -e /proc/sys/kernel/core_pattern ] && {
                ulimit -c unlimited
                echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
        }
        service_start /sbin/netifd

        setup_switch() { return 0; }

        include /lib/network
        setup_switch
#важны следующие 3 строки
        sleep 5 #можно и больше, например 10
        /sbin/wifi down
        /sbin/wifi up
}
2)start() {
        stop
        [ -e /proc/sys/kernel/core_pattern ] && {
                ulimit -c unlimited
                echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
        }
        service_start /sbin/netifd

        setup_switch() { return 0; }

        include /lib/network
        setup_switch
#важны следующие 2 строки
        sleep 10
        /sbin/wifi up
}

Original comment by xakep6...@gmail.com on 24 Jun 2013 at 5:07

GoogleCodeExporter commented 9 years ago
Вариант 2 точно рабочий (проверено на 
тестовой bb)

Original comment by xakep6...@gmail.com on 5 Jul 2013 at 11:16