We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Omega2: WiFi Client with Lede Image



  • Hi,

    I have a problem setting up a stock Lede Image (Reboot (SNAPSHOT, r3866-322a722)) as WiFi client. I getting follwoing log (partly copied):

    [   73.169182] wlan0: authenticate with c0:25:06:a2:ab:58
    [   73.193115] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3)
    [   73.208673] wlan0: authenticated
    [   73.218475] wlan0: associate with c0:25:06:a2:ab:58 (try 1/3)
    [   73.285887] wlan0: RX AssocResp from c0:25:06:a2:ab:58 (capab=0x431 status=0 aid=3)
    [   73.296354] wlan0: associated
    [   79.388765] wlan0: disassociated from c0:25:06:a2:ab:58 (Reason: 2)
    [   80.429614] wlan0: authenticate with c0:25:06:a2:ab:58
    [   80.453474] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3)
    [   81.068250] wlan0: send auth to c0:25:06:a2:ab:58 (try 2/3)
    [   82.068227] wlan0: send auth to c0:25:06:a2:ab:58 (try 3/3)
    [   83.068230] wlan0: authentication with c0:25:06:a2:ab:58 timed out
    [   88.089179] wlan0: authenticate with c0:25:06:a2:ab:58
    [   88.113038] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3)
    [   88.127131] wlan0: authenticated
    [   88.138342] wlan0: associate with c0:25:06:a2:ab:58 (try 1/3)
    [   88.207698] wlan0: RX AssocResp from c0:25:06:a2:ab:58 (capab=0x431 status=0 aid=3)
    [   88.218149] wlan0: associated
    [   94.069667] wlan0: authenticate with c0:25:06:a2:ab:58
    [   94.089164] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3)
    [   94.102877] wlan0: authenticated
    [   94.108454] wlan0: associate with c0:25:06:a2:ab:58 (try 1/3)
    [   94.191309] wlan0: RX AssocResp from c0:25:06:a2:ab:58 (capab=0x431 status=0 aid=3)
    [   94.201786] wlan0: associated
    [   98.196571] wlan0: deauthenticating from c0:25:06:a2:ab:58 by local choice (Reason: 3=DEAUTH_LEAVING)
    

    The Wifi associates with the base station and disconnects again. With a Omega2 Image it does work. It there a difference in the WiFi driver ?

    Here my config:

    root@LEDE:/etc/config# cat wireless 
    
    config wifi-device 'radio0'
            option type 'mac80211'
            option channel '11'
            option hwmode '11g'
            option path 'platform/10300000.wmac'
            option htmode 'HT20'
            option country 'DE'
    
    config wifi-iface 'default_radio0'
            option device 'radio0'
            option network 'wlan'
            option ssid 'Fischernetz'
            option mode 'sta'
            option encryption 'psk2'
            option key 'geheim'
    
    root@LEDE:/etc/config# cat network 
    
    config interface 'loopback'
            option ifname 'lo'
            option proto 'static'
            option ipaddr '127.0.0.1'
            option netmask '255.0.0.0'
    
    config globals 'globals'
            option ula_prefix 'fd8e:2845:f08a::/48'
    
    config interface 'lan'
            option type 'bridge'
            option ifname 'eth0'
            option proto 'dhcp'
            option ip6assign '60'
    
    config device 'lan_dev'
            option name 'eth0'
            option macaddr '40:a3:6b:c0:75:aa'
    
    config interface 'wlan'
            option ifname 'wlan0'
            option proto 'dhcp'
    
    config switch
            option name 'switch0'
            option reset '1'
            option enable_vlan '0'
    
    root@LEDE:/# dmesg | grep mt76_wmac
    [   10.243057] mt76_wmac 10300000.wmac: ASIC revision: 76280001
    [   12.292223] mt76_wmac 10300000.wmac: Firmware Version: _e2_mp
    [   12.298076] mt76_wmac 10300000.wmac: Build Time: 20150211175503
    

    Regards

    Gerd



  • same issue



  • @Gerhard-Bertelsmann I find the solution, check the known issue list,https://docs.onion.io/omega2-docs/known-firmware-issues.html

    It works for me.



  • @james-lee said in Omega2: WiFi Client with Lede Image:

    @Gerhard-Bertelsmann I find the solution, check the known issue list,https://docs.onion.io/omega2-docs/known-firmware-issues.html

    It works for me.

    This list refers to the Onion firmware, which is not the same as stock LEDE.

    @Gerhard-Bertelsmann: Yes, Onion uses another (propriertary?) WiFi driver which is not included in public LEDE.

    I'm also looking for Wifi that works with self-built LEDE images, see my recent post.

    With my LEDE image, the log looks similar - WiFi is associating and disconnecting in irregular intervals. However, the deauthentication reason is always PREV_AUTH_NOT_VALID in my case, at least as far as I could observe)

    [   27.557240] wlan0: deauthenticated from 28:37:37:49:e3:9c (Reason: 2=PREV_AUTH_NOT_VALID)
    

    I'm very interested in any hints about what could be the problem.



  • @luz
    I new here, and don't know how to solve it through the driver layer.
    I just modify the config file, and it works.

    Modify the /etc/config/wireless, make sure all the option are same as the wifi router.
    such as
    option channel "auto", --> option channel "11"
    option encryption "psk2" --> option encripyton "psk+ccmp"

    Both on router and omega2, I modify all the "auto" options, make them specific.



  • @james-lee my (and the @Gerhard-Bertelsmann 's) problem is only with a stock LEDE image. From your comments it seems to me you are using the regular Omega2 firmware, as offered by Onion; am I wrong?





  • @luz my story-
    I flashed my omega2+ to stock LEDE image and met wifi issue, and I tried to find out the answer from official wiki, docs, and commuity. Then I found that the known-firmware-issue was similiar with my
    issue. I follow the instruction, and modifed the config file on omega2+ and settings on the router. It worked, but it was not very stable.



  • @luz , @james-lee
    thanks for your replies.

    It's really sad that only the blob wifi driver is stable. I've seen a 4.4.50 mtk-wifi in the wild (Widora). Did somebody testetd it ?
    I would like to use the OpenWRT/Lede SDK because most of my work is based on it. I could live with a blob for a while (and with a Kernel 4.4.50) if the blob driver could be cleanly integrated in Lede build environment ...



  • @james-lee thanks for the clarification!

    I got the WiFi working too with plain LEDE images, even without disabling the "auto" options.

    But as you said, it's not really stable. Sometimes it's good for a longer time (hours) but sometimes it just drops the connection after a few minutes and needs another few minutes to connect again.



  • @Gerhard-Bertelsmann said in Omega2: WiFi Client with Lede Image:

    I would like to use the OpenWRT/Lede SDK because most of my work is based on it. I could live with a blob for a while (and with a Kernel 4.4.50) if the blob driver could be cleanly integrated in Lede build environment ...

    Exactly same situation here. Having LEDE is more important than WiFi, my application is normally using wired ethernet anyway. But still, working WiFi would be nice to have.

    So thanks for your hint to widora!

    I reverted my LEDE to the last commit with kernel 4.4.50 (514854d), copied mtk-wifi from widora's commit with the promising title "wifi seems ok and stable" and am now building my application image based on this.

    Still building, will let you know as soon as I can test it…



  • @Gerhard-Bertelsmann The link form the commit I mentioned in the last post is wrong, that's a version not working with 4.4.50 kernel.

    However, with mtk-wifi from https://github.com/noblepepper/mtk-wifi, the access point works, and is stable!

    Something is still wrong in my config, because I haven't yet managed to get it connect in station mode, but I guess I'll figure that out eventually πŸ˜‰



  • @luz can you plase tell us how exactly you did compile that module
    When I add that url to feeds.conf (src-git mtkwifi https://github.com/noblepepper/mtk-wifi) I am getting the following error:

    Create index file './feeds/mtkwifi.index'
    grep: feeds/mtkwifi/Makefile:$(eval: No such file or directory
    grep: $(call: No such file or directory
    grep: BuildPackage,mtk-wifi))/Makefile: No such file or directory
    /home/geroy/dev/lede-project/lede/feeds/mtkwifi.tmp/info/.files-packageinfo.mk:1: *** target pattern contains no '%'. Stop.
    Collecting target info: done



  • @Nikolay-Hristov https://github.com/noblepepper/mtk-wifi itself is not a feed, but just one package from a feed. So you can't directly use it as a feed url.

    So what I did was copy the mtk-wifi folder into the folder of my own feed in lede/feeds. Then I ran

    ./scripts/feeds update -i plan44
    

    to index it, and then it can be installed

    ./scripts/feeds install kmod-mtk-wifi
    

    Then start menuconfig to enable it for build, it's under "Ralink SDK Mango" in the menu.
    Finally, built it with

    make package/mtk-wifi/compile
    

    Please let us know when you manage to configure it as client πŸ™‚

    Along with the mtk-wifi driver, the package also brings a utility shell script called widora_mode. It supposedly creates the correct config for different wifi modes such as access point, bridge, client. I got my Omega2 work as client immediately after typing widora_mode client MYSSID mypassword. However, after restarting the Omega, the WiFi does not connect again.
    I don't understand that, because all widora_mode does, is issuing some UCI commands to modify the /etc/config/network and /etc/config/wireless, and then call /etc/init.d/network restart. I would have expected that config to still work after reboot.



  • hm, am I doing something wrong?
    I have cloned https://github.com/noblepepper/mtk-wifi to feeds/mtk-wifi:

    lede@bender:~/dev/lede-project/lede$ ./scripts/feeds update -i mtk-wifi
    lede@bender:~/dev/lede-project/lede$ ./scripts/feeds install kmod-mtk-wifi
    WARNING: No feed for package 'kmod-mtk-wifi' found, maybe it's already part of the standard packages?

    it didnt show in make menuconfig menu..

    Sorry but I'm not (yet) familiar with the openwrt/lede build process



  • @Nikolay-Hristov said in Omega2: WiFi Client with Lede Image:

    I have cloned https://github.com/noblepepper/mtk-wifi to feeds/mtk-wifi:

    The individual packages need to be one level deeper than just feeds, meaning you need to have a folder like feeds/myfeed and clone mtk-wifi into that folder as feeds/myfeed/mtk-wifi

    You could probably hijack one of the existing feeds (onion's for example) and just plant mtk-wifi there as a cuckoo's egg πŸ˜‰

    But I can only recommend having an own feed for these types of experiments - essentially just a git repo somewhere of which you put the url into feeds.conf.default. Then you can copy packages to examine/modify there. As scripts/feeds install allows to specify a preferred feed, you can even copy packages from another feed to your own to develop and test modifications. I do this with omega2-ctrl, because @onion still hasn't found the time to process the pull request [Update: no longer, @Lazar-Demin just merged the PRs, thx πŸ‘ :-))



  • Hi @Gerhard-Bertelsmann, @james-lee, @Nikolay-Hristov and everybody else trying to get reliable WiFi with LEDE: Great news - just forget about mtk-wifi (and freezing kernel versions because of it)!

    Latest commits from today (e209988) on lede-project master seem to fix the reliability and performance issues with the open source mt76 driver!

    The commit messages looked very promising, so I just rebuilt my project's image based on today's LEDE master, installed it, rebooted, and - WiFi just works! Not a single "wlan deauthenticated" message in dmesg any more. I haven't really tested in depth, but performance also felt normal scp-ing a firmware image to /tmp.

    Really cool! πŸ˜„



  • @luz Hi. Tried to build image on Ubuntu 16.04 but make menuconfig behaves strange.
    e.g. can't see cursor if I resize terminal.

    Do you have such problems or you are using imagebuilder/edit config by hands?



  • @M-S192 I'm using LEDE buildroot on macOS (in a case-sensitive disk image), and menuconfig works fine with the standard Terminal app.



  • @luz I've got it up and running but still not even close to stable wifi... i cant connect it in STA mode, only in AP mode
    it works but when I do:

    iw wlan0 scan

    I'm getting MCU errors and then module crashes:

    root@LEDE:/etc/config# [ 811.948503] MCU message 40 (seq 6) timed out
    [ 812.948492] MCU message 8 (seq 7) timed out
    [ 813.948503] MCU message 40 (seq 😎 timed out
    [ 814.948495] MCU message 8 (seq 9) timed out
    [ 815.948499] MCU message 40 (seq 10) timed out
    [ 815.957183] ------------[ cut here ]------------
    [ 815.966395] WARNING: CPU: 0 PID: 6 at /.../dev/lede-project/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7688/mt76-2017-03-17-712b8e8f/mt7603_mac.c:1219 mt7603_mac_work+0xf0/0x284 mt7603e
    [ 816.002894] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 iptable_nat ipt_REJECT ipt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt mt76x2e mt7603e mt76 mac80211 batman_adv libcrc32c cfg80211 compat ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables msdos vfat fat nls_utf8 nls_iso8859_1 nls_cp437 usb_storage leds_gpio ohci_platform ohci_hcd ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache usbcore nls_base usb_common crc16 crc32c_generic crypto_hash
    [ 816.173337] CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 4.4.61 #0
    [ 816.185596] Workqueue: phy0 mt7603_mac_work [mt7603e]
    [ 816.195602] Stack : 87c03410 87c1eb98 00000088 8004ae38 87c2dbac 80396d63 80333f8c 00000006
    8035cc5c 87c49d64 80390000 80048da4 00000088 8004ae38 80339494 80390000
    00000003 87c49d64 80390000 80038db4 00000088 87c49d9c 000000ef 00000000
    00000001 00000000 8757d1dc 87e83a00 87e83900 30796870 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    ...
    [ 816.266064] Call Trace:
    [ 816.270917] [<8001486c>] show_stack+0x50/0x84
    [ 816.279553] [<80025418>] warn_slowpath_common+0xa0/0xd0
    [ 816.289911] [<800254d0>] warn_slowpath_null+0x18/0x24
    [ 816.299935] [<8757d2cc>] mt7603_mac_work+0xf0/0x284 [mt7603e]
    [ 816.311344] [<80036ccc>] process_one_work+0x1f8/0x334
    [ 816.321361] [<80037ae0>] worker_thread+0x2b0/0x404
    [ 816.330868] [<8003be98>] kthread+0xd8/0xec
    [ 816.338988] [<80004478>] ret_from_kernel_thread+0x14/0x1c
    [ 816.349681]
    [ 816.352624] ---[ end trace 54759357b623713d ]---

    so... not stable 😞


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.