1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

wl_high module finally compiled

Discussion in 'Tomato Firmware' started by shibby20, Oct 18, 2012.

  1. shibby20

    shibby20 Network Guru Member

    Little step for me and big step for users of Asus RT-N53 and The newest linksys routers.

    Breaking news
    Finally!! i compiled module wl_high and second radio (USB wireless adapter) on those routers works!!

    I will not include this module in next v102 release because i have to make few tests and make clean of sources ;P
     
    Toastman likes this.
  2. lefty

    lefty Networkin' Nut Member

    excellent work shibby! also as friendly reminder, please add tvlz's patch for E1550 support, i notice the RT-N E1550 101 builds are still on the site for download which will brick an E1550.
     
  3. leandroong

    leandroong Addicted to LI Member

    hopefully, this will lead to dualwan.... Good job !!!
     
  4. shibby20

    shibby20 Network Guru Member

  5. Fractal

    Fractal Serious Server Member

    This is indeed great news!!! congrats... I will watch for checkins for the wl_high.o object files ect.

    -Fractal
     
  6. arch06

    arch06 Serious Server Member

    first of all, thanks for the great work..
    is there any progress related to 3200 5hz module or any possible date to release firmware update above v.102 ?
     
  7. leandroong

    leandroong Addicted to LI Member

  8. arch06

    arch06 Serious Server Member

    thanks for the update..hopefully, it is just a matter of time for us to see the new release..
     
  9. shibby20

    shibby20 Network Guru Member

    test builds with wl_high module (support 5GHz)

    http://tomato.groov.pl/download/K26RT-N/build5x-102-EN/testing/wl_high/

    RT-N53 was tested by me
    E2500 was tested by user @tvlz
    If someone can test and give me a feedback about E3200 i will be happy.

    After install tomato you have to erase nvram (administration, configuration and erase all data in nvram).
    After reboot eth2 should works. If it will not works and basic, network menu will be broken, then go to advanced, mac and restore default MAC address for eth2, then save.

    Best Regards!
     
  10. wappy

    wappy Serious Server Member

    Nice shibby.

    i will try it on my e3200, stay tuned.

    K updated router and i see now the 5Ghz under settings.

    Wireless (5 GHz / eth2) (hide)
    MAC Address 58:6D:8F:**:**:**
    Wireless Mode Access Point
    Wireless Network Mode Auto
    Interface Status Up (LAN)
    Radio Enabled
    SSID Routertje5.0Ghz
    Broadcast Enabled
    Security WPA / WPA2 Personal + AES
    Channel 36 - 5.180 GHz
    Channel Width 40 MHz
    Interference Level Acceptable
    Rate 270 Mbps

    Testing now.

    Getting some errors in log:
    Nov 17 12:21:22 unknown user.err kernel: ipt_account [checkentry]: table found, rule network/netmask/shortlisting not match table network/netmask/shortlisting.
    Nov 17 12:21:22 unknown user.crit dhcpc-event[2134]: Error while loading rules. See /etc/iptables.error file.
    Nov 17 12:21:24 unknown user.err kernel: ipt_account [checkentry]: table found, rule network/netmask/shortlisting not match table network/netmask/shortlisting.
    Nov 17 12:21:24 unknown user.crit init[1]: Error while loading rules. See /etc/iptables.error file.
    Nov 17 12:21:25 unknown user.err kernel: ipt_account [checkentry]: table found, rule network/netmask/shortlisting not match table network/netmask/shortlisting.
    Nov 17 12:21:25 unknown user.crit init[1]: Error while loading rules. See /etc/iptables.error file.
    Nov 17 12:21:26 unknown daemon.err apcupsd[2025]: apcupsd FATAL ERROR in linux-usb.c at line 609 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>.
    Nov 17 12:21:26 unknown daemon.err apcupsd[2025]: apcupsd error shutdown completed

    On 5Ghz getting 270Mbit/300Mbit rate, realspeed around 80Mbit on a 120Mbit connection, beter than the 2,4Ghz there a get only 20a25mbit(overcrouded here)

    5Ghz is working on my laptop so is should work on the e3200, only that error stays, but i think little tweaking and all is good :)
     
  11. imran

    imran Serious Server Member

    @shibby20, if i install your firmware how easy it would be for me to revert back to stock Cisco E3200, as i just came of of the mess after installing Tomato.Raf firmware on my router, which broke my router but did not kill it.
     
  12. arch06

    arch06 Serious Server Member

    i have just tested, 5 ghz works at e3200, no problem with eth 2..if any additional information is needed, feel free to contact me..thanks for that great work..
     
  13. tvlz

    tvlz Addicted to LI Member

    I don't think anybody will have to default the eth2 mac address, it should have the correct one after the reboot.
     
  14. callous

    callous Network Guru Member

    Does 2.4ghz and 5ghz work simutaneously on 2 wireless computers connected?
     
  15. strfr

    strfr Serious Server Member

    hey! great work! running here @3200 both 2,4 and 5GHz
    One question: 802.1Q VLAN tagging is not supported on this model? I guess it should be, the chip is capable to dothat..
    And looks line upload bandwidth limit is not effective on wl0.1 interface (download works as expected..)
     
  16. shibby20

    shibby20 Network Guru Member

    of course
     
  17. strfr

    strfr Serious Server Member

    greetings shibby, of course means it is supported, or it capable but is not implemented yet?
    IP traffic is also not really working, at least it stays empty.. or am I just missing something?
    I guess my setup was all right (nvram erased etc.)
    Any way: big thanks for great work, 5GHz support is most welcomed feature in whole community I guess ;]
     
  18. wappy

    wappy Serious Server Member


    Yes is works like it should be :D, thanx to shibby :)
     
  19. shibby20

    shibby20 Network Guru Member

    glad to hear that :)
     
  20. wappy

    wappy Serious Server Member

    Still running stable uptime 7hours without a problem :D, also 2,4Ghz stable.
     
  21. callous

    callous Network Guru Member

    As this is my one and only router, if need be, how would i go about flashing back to stock firmware in case of problems?
     
  22. lefty

    lefty Networkin' Nut Member

    Should be able to flash back to stock firmware by downloading the stock firmware and flashing from tomato's webgui, be sure to reset to defaults before flashing for best results. Also a 30-30-30 after flashing doesn't hurt either.
     
  23. strfr

    strfr Serious Server Member

    well: tried dd-wrt Fractal's build 20202 and 802.1Q tagget VLANs are working.. would love to see it working in tomato as well ;]
    thanks!
     
  24. lissny

    lissny Networkin' Nut Member

    Captive Portal Login Pages.. attached.
    can u help me more in this to compile and make it complete and final..thanx ..
    Click TO dowonload
    pass: SajjadMemon

    thanx
     
  25. MikeR25

    MikeR25 Networkin' Nut Member

    Hooray !! 5Ghz + 2.4GHz both working well on my E2500. Shibby you rock!

    Happy Thanksgiving
     
  26. anony_mos_1

    anony_mos_1 Serious Server Member

    Will this work for E4200 also? I will test it if it doesn't brick mine. I would kill for a stable 5ghz connection.
     
  27. shibby20

    shibby20 Network Guru Member

    5GHz radio on E4200 works on any RT-N builds. Which tomato version are you using? Besides wl_high module support only wireless USB adapters.
     
  28. lissny

    lissny Networkin' Nut Member

    Captive Portal Login Pages.. attached.​
    can u help me more in this to compile and make it complete and final..thanx ..​
    pass: SajjadMemon​

    thanx​
    and
    1-How Can I Enable Captive portal for all ports of router there is only one port to select..
    2-how can I Enable captive portal in " tomato with Wireless Ethernet Bridge". i enable it but not working. thanx..
     
  29. anony_mos_1

    anony_mos_1 Serious Server Member

    Right now it's running tomato-E4200USB-NVRAM60K-1.28.RT-N5x-MIPSR2-102-Mega-VPN, which I'm pretty sure is your build. I'm guessing 5ghz works for all builds, but not when the router is set as a client bridge.
     
  30. shibby20

    shibby20 Network Guru Member

    yes, this is my build. Well you have a problem with connect to E4200 via 5GHz when E4200 is configured as Wireless ethernet bridge? Am i right? Or maybe wireless client (WISP)? The question is: is that problem only with E4200 or maybe with a drivers and problem exists on all routers using K26RT-N builds.
     
  31. lissny

    lissny Networkin' Nut Member

    i m using e2500 tomato shibby build103
    i disabled 5ghz radio but when i restart the router it will enable automatically..
     
  32. rafwes

    rafwes Serious Server Member

    Thank you! It's stable on my e2500 but the performance on the 5GHz band with 40 MHz is lower than on the network with 2.4 and 20 MHz. With stock firmware the performance was better, so there is still room for improvement.
     
  33. anony_mos_1

    anony_mos_1 Serious Server Member

    I have my E4200 set up as wireless ethernet bridge and connect devices by cable to it. Tomorrow I should have time where I can switch my routers, so the E4200 is broadcast and see if my other router can connect to it with 5ghz as wireless ethernet bridge.
     
  34. lissny

    lissny Networkin' Nut Member

    ok it can be disable from netowrk basic settings.. but i was disabling thru status page, thats why it enable again when restart.
     
  35. callous

    callous Network Guru Member

    Hi Shibby, I just installed your Version 1.28 by shibby firmware released on Dec4th on my E3200.

    I see in Access Restriction Overview:
    iptables-restore: line 129 failed

    Is this a bug in the firmware?
     
  36. callous

    callous Network Guru Member

    Thanks for the firmware btw!
     
  37. callous

    callous Network Guru Member

    How do I enable a guess wireless that has a different password than my normal wireless login, and wont auto-share files using Tomato?
     
  38. lefty

    lefty Networkin' Nut Member

    You'd need to make a virtual wireless interface and use iptables to restrict it from your LAN/WLAN, this way they could only use the internet and/or use files within their own WLAN.
     
  39. callous

    callous Network Guru Member


    how do i use iptables to restrict it from accessing the ips of other computers?
     
  40. callous

    callous Network Guru Member

    Also a small error:

    Total / Free NVRAM 60.00 KB / 33.43 KB (55.71%). I know my nvram for e3200 is 16megs, so the total and free nvram tomato is reporting cant be correct
     
  41. wappy

    wappy Serious Server Member


    Reboot router and problem is gone, same here on E3200 but only whene update to new or old firmware, but after reboot is gone and working.

    That is no error total 60KB settings nvram, and you have 32KB free in nvram for settings, nvram have nothing todo with flash is still 16MB.
     
  42. callous

    callous Network Guru Member

    Ok thanks! I will try rebooting. Since I did use the "erase all data in nvram memory" then did the use "restore default router settings (normal)" setting, wouldnt a reboot fixing this issue imply that not everything in nvram was erased properly?


    Have you tried testing the 5ghz wireless for speed, compared to the default linksys e3200 firmware? I was wondering what your experience was for the tomato speed vs linksys firmware speed for 5ghz module. I wish i performed a more thorugh test prior to flashing, but I do believe the linksys firmware was giving me about 20% higher speeds compared to tomato. Could this could be because the driver used for the 5ghz was from a lower end router?

    I think having much better qos is a nice tradeoff however :)
     
  43. callous

    callous Network Guru Member

    I am unable to view the graphs using internet explorer, but works under chrome. Does some form of an add-on need to be installed to view the charts in the router pages?
     
  44. imran

    imran Serious Server Member

    Can some one confirm to me if Easytomato, can be used over CiscoE3200?
     
  45. wappy

    wappy Serious Server Member

    I never used the original firmware, i have buyed this router and direct flashed to tomato :) speed on 2Ghz is around 35mbit max here, but here are allot of 2.4Ghz routers, on 5Ghz a get around 120Mbit/s, allot faster.

    @callous. yes you need adobe svg (Scalable Vector Graphics) plugin.
     
  46. callous

    callous Network Guru Member

    SVG worked well thanks. Now to try and figure out how to get multiple SSIDs and wireless only for guests - these parts not so easy
     
  47. callous

    callous Network Guru Member

    I am using the E3200, 1.28 shibby version.

    I tried creating a Guest network with a totally new ssid as per: http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&eotf=1&u=http://openlinksys.info/forum/viewthread.php?thread_id=14849#post_104752&act=url

    The new ssid showed up and I can connect properly. However, I am unable to get dns informatoin from the server. I can ping 8.8.4.4 but cannot ping google.com as I get "general failure". If i changed the network adapter so that the dns server is now 4.2.2.2 instead of the router, I can get to any website.

    Is this a known issue with the firmware? :) I can replicate this issue on 2 wireless computers. Any ideas would be much appreciated!
     
  48. Anil Jangity

    Anil Jangity Serious Server Member

    I just upgraded my RT-N53 to tomato-K26-1.28.RT-N5x-MIPSR2-104-Max.
    I did a Erase all NVRAM and unplugged/rebooted. I still don't see eth2. Does this version of the firmware not have the 5Ghz enabled?

    root@unknown:/proc/net# dmesg |grep eth
    eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.100.138.20
    eth1: Broadcom BCM4329 802.11 Wireless Controller 5.100.138.20
    device eth0 entered promiscuous mode
    device eth1 entered promiscuous mode
    br0: port 2(eth1) entering forwarding state
    root@unknown:/proc/net#

    Thanks for the great work shibby! This is just awesome.
     
  49. Anil Jangity

    Anil Jangity Serious Server Member

    I re-read some of the other posts and it seems I guess the wl_high module is only supported with other USB wireless adapters. That's a bummer. How do you get a USB adapter for RT-N53, it doesn't have any. :)
    I guess I will need to toss this router out or go back to using stock firmware to get 5Ghz.
     
  50. shibby20

    shibby20 Network Guru Member

  51. Anil Jangity

    Anil Jangity Serious Server Member

    Thanks, that did it! I now see 5Ghz but strangely, I don't see the 5Ghz light get turned on. I did a NVRAM reset as suggested. I do see it when I do a "shutdown", it comes on. Weird.

    When I click on the Default MAC for eth2, it assigns:
    12:BF:48:* eth2
    10:BF:48:* eth1
    Router LAN MAC address 10:BF:48:*
    WAN MAC 10:BF:48:*

    After reboot, it goes back to using the same 10:BF:48:3C:5E:DF.
     
  52. callous

    callous Network Guru Member


    Update (so that if the developers one day continue the work on the firmware):
    I got a guest network/SSID added, but only 2.4ghz works.
    - 5.0ghz is broken for a VLAN. If added, the 5.0ghz ssid will have zero signal strength and cant be connected to
    - 2.4ghz is also broken, and will accept ONLY 192.168.x.x. Any attempt to change this to say 192.172.x.x will also cause a dns issue between the router and the device connecting to it
    - The VLAN SSID is isolated from the primary network so that part works
    - Wireless filter only applies to the primary network, and not to VLAN added which is great


    If there are any ideas for getting the 5.0ghz VLAN working then Im very interested!
     
  53. rafwes

    rafwes Serious Server Member

    @callous

    by default clients on the guest network can talk to other clients on the regular network, access your router configuration page, telnet/ssh it and flood your link with tcp/udp connections. to prevent this add these lines to you firewall script:

    Code:
    iptables -t nat -A PREROUTING -s `nvram get lan1_ipaddr`/`nvram get lan1_netmask` -p tcp --syn -m connlimit --connlimit-above 400 -j DROP
    iptables -t nat -A PREROUTING -s `nvram get lan1_ipaddr`/`nvram get lan1_netmask` -p udp -m limit --limit 5/sec --limit-burst 200 -j ACCEPT
    iptables -A FORWARD -i br1 -o ! vlan2 -m state --state NEW -j DROP
    iptables -A FORWARD -i ! vlan2 -o br1 -m state --state NEW -j DROP
    iptables -A FORWARD -i br1 -d `nvram get wan_ipaddr`/`nvram get wan_netmask` -m state --state NEW -j DROP
    iptables -D INPUT -i br1 -j ACCEPT
    iptables -A INPUT -p udp --dport 67 -j ACCEPT
    iptables -A INPUT -p udp --dport 53 -j ACCEPT
    iptables -A INPUT -p tcp --dport 53 -j ACCEPT
    
    in this case br1 (lan1) is your guest interface, wan is at vlan2.

    first 2 lines deal with the connection limits. next 2 drop every package that is not going out to the internet, for instance reaching clients on your private lan. 5th line prevents them from getting in thru the wan interface if you got any port forwardings going on. 6th prevents the router from being reached and the last lines open it just for dhcp and dns.

    this will break captive portal, you may need to allow its port and port 80. notice that there is no way run the captive portal and at the same time block access to the web interface. that sucks. since captive portal will also break upload bandwith limits, i do not recommend it.
     
  54. rafwes

    rafwes Serious Server Member

    On a second glance I do not like the second rule, since it only limits the rates of udp connection creation, but not their total number. I replaced it with better ones. Now 500 connections to the internet will be allowed (250 tcp and 250 udp/icmp/etc) plus 100 to the router (for dns and dhcp) per IP. That's more than enough even for p2p. In this scenario you would need 8 IPs maxing out their p2p at the same time to reach the router's standard conntrack overall limit of about 4000 connections. These limits just apply to IPs on your guest lan, on your private lan you are free to open as many connections as your router can handle.

    Code:
    iptables -t nat -A PREROUTING -s `nvram get lan1_ipaddr`/`nvram get lan1_netmask` -d `nvram get lan1_ipaddr` -m connlimit --connlimit-above 100 -j DROP
    iptables -t nat -A PREROUTING -p tcp -s `nvram get lan1_ipaddr`/`nvram get lan1_netmask` -d ! `nvram get lan1_ipaddr` -m connlimit --syn --connlimit-above 250 -j DROP
    iptables -t nat -A PREROUTING -p ! tcp -s `nvram get lan1_ipaddr`/`nvram get lan1_netmask` -d ! `nvram get lan1_ipaddr` -m connlimit --connlimit-above 250 -j DROP
    iptables -A FORWARD -i br1 -o ! vlan2 -m state --state NEW -j DROP
    iptables -A FORWARD -i ! vlan2 -o br1 -m state --state NEW -j DROP
    iptables -A FORWARD -i br1 -d `nvram get wan_ipaddr`/`nvram get wan_netmask` -m state --state NEW -j DROP
    iptables -D INPUT -i br1 -j ACCEPT
    iptables -A INPUT -p udp --dport 67 -j ACCEPT
    iptables -A INPUT -p udp --dport 53 -j ACCEPT
    iptables -A INPUT -p tcp --dport 53 -j ACCEPT
     
  55. callous

    callous Network Guru Member

    How do I enable logging so that failed attempts to enter my wireless networks show up in the logs? I currently checked off all the options but still dont see the logs showing clients that fail to get on the network due to the wireless filtering
     
  56. callous

    callous Network Guru Member


    Thank you! I will experiment around with this!
     
  57. callous

    callous Network Guru Member

    I hope I am not viewed as someone who is complaining - since these are test builds I think feedback on errors might be appreciated: (on the 1.28 shibby test build)

    I am getting no connectivity to the router when transferring larges files only on the 5ghz. The win7 icon will show an exclaimation mark showing no internet access, and it still shows connected to router. However when I try pinging the router I cannot. The logs show the following:

    For try 1:
    Dec 10 18:46:36 unknown user.warn kernel: Transaction mismatch: expected:0xe96f got:0xe96e type: 1
    Dec 10 18:46:43 unknown user.warn kernel: Transaction mismatch: expected:0x8a2d got:0x8a2c type: 1
    Dec 10 18:46:45 unknown user.warn kernel: Transaction mismatch: expected:0xbb19 got:0xbb18 type: 1
    Dec 10 18:46:47 unknown user.warn kernel: Transaction mismatch: expected:0xe96f got:0xe96e type: 1
    For try 2:
    Dec 10 18:48:20 unknown user.warn kernel: Transaction mismatch: expected:0x8a2d got:0x8a2c type: 1
    Dec 10 18:48:22 unknown user.warn kernel: Transaction mismatch: expected:0xbb19 got:0xbb18 type: 1
    Dec 10 18:48:30 unknown user.warn kernel: Transaction mismatch: expected:0xe96f got:0xe96e type: 1
    I did do the nvram erase feature in the gui and multiple 30/30/30 when flashing the firmware as well as restore to defaults before entering my own settings. I've tried multiple channels inaddition to setting channel on Auto.

    I will be happy to assist in troubleshooting this further as needed!
     
  58. lissny

    lissny Networkin' Nut Member

  59. callous

    callous Network Guru Member

    Hi Tvlz,

    The 1.28.0001 for E3200 the save button on the Wireless Basic settings page still doesnt work, same as for 1.28.0000. Also the 5ghz portion on that same page isnt there, even after a reboot and I did the 30-30-30 and nvram erase, and also restore default settings.

    Thanks for trying though!
     
  60. callous

    callous Network Guru Member

    Shibby released 105 a few days ago. Is there an email service that alerts to a new build? I found the new build today, and at least 1/4 of the people on the tomatoanon already updated to 105 days earlier...
     
  61. lefty

    lefty Networkin' Nut Member

    The easiest ways i found to keep updated on when shibby builds are released is either watch into this forum as most times new builds are announced within the shibby build thread, or subscribe to the RSS feed on shibby's website.
     
  62. callous

    callous Network Guru Member

    I love how shibby's 105 TCP Vegas is back! It works well for me.
     
  63. occamsrazor

    occamsrazor Network Guru Member

    @callous - what settings are you using?
     
  64. Toastman

    Toastman Super Moderator Staff Member Member

  65. callous

    callous Network Guru Member

  66. Toastman

    Toastman Super Moderator Staff Member Member

    What is the purpose of it?
     
  67. leandroong

    leandroong Addicted to LI Member

  68. Toastman

    Toastman Super Moderator Staff Member Member

    Yes, but what do you expect it to achieve on a router?

    Just curious why this old thing has been brought up again :p
     
  69. Monk E. Boy

    Monk E. Boy Network Guru Member

    People like the warm comforting glow of checkboxes.
     
    Toastman and occamsrazor like this.
  70. callous

    callous Network Guru Member

    I find that it works well, with lots of BT and HTTP going at once
     
  71. rhester72

    rhester72 Network Guru Member

    Really? :)

    You might want to go back and read some necro threads here on the subject.

    Rodney
     
  72. callous

    callous Network Guru Member

    Can tomato/shibby act as a media server for one of the computers?
     
  73. callous

    callous Network Guru Member

    I found a small bug for the shibby 105 tomato:
    If on Basic>network page you uncheck the "Enable Wireless" radio button for the 2.4 and save the setting, you can still connect to the 2.4 using your wireless adapter

    Clicking on Disable on the overview page completely disables the wireless radio. So one is working the other isnt right now

    Just something to look into down the road.
     
  74. Monk E. Boy

    Monk E. Boy Network Guru Member

    If you uncheck that box and reboot the router, is the 2.4Ghz interface down?
     
  75. leandroong

    leandroong Addicted to LI Member

    uncheck and saved before rebooting
     
  76. callous

    callous Network Guru Member

    yes rebooting the router allows the 2.4ghz to remain disabled.

    Is this just a tomato oversight? Normally if a setting requires a router reboot the router will reboot for you. It's odd that I can disable the interface from Overview page but to save that setting permanently i have to reboot the router
     
  77. Monk E. Boy

    Monk E. Boy Network Guru Member

    I don't remember if this happened under older versions of Tomato with old routers or not. I think it did.

    When you uncheck the box, save the config, then you've changed the saved configuration but not the running configuration. By disabling the radio on your own you've changed the running configuration to match the saved configuration, so there's no need to reboot at that point.

    Tomato lets you bring up "disabled" interfaces that will go away after the router is rebooted (or disable interfaces that will be enabled after a reboot), which is a nice feature if you're experimenting with settings.
     
  78. callous

    callous Network Guru Member

    106 is out
     
  79. callous

    callous Network Guru Member

    I tried Shibby's 106 on my E3200 and is the most bug-free version yet!. I did find however that the channel always stays at channel 6 when it is on "Auto". I've never seen that before - in 105 and 104 the channels change depending on how many networks are interferring in my apartment.

    I can of couse manually change the channel but Auto seems to default to channel 6 and wont change channels by itself

    Anyone else found this issue?
     
  80. callous

    callous Network Guru Member

    Nevermind - it does change channels. I guess my area just got more congested with the new people moving in and channel 6 is now the new best channel
     
  81. abubin

    abubin Addicted to LI Member

    oops..posted in wrong section...
     
  82. AndreyPopov

    AndreyPopov Connected Client Member

    need help.

    I try make Asuswrt-Merlin firmware for ASUS RT-N series routers
    http://forums.smallnetbuilder.com/showthread.php?t=18624
    and some problems with 5G on RT-N53 - with wl_high drivers.

    now I use last Merlin 376.48 (ASUS 376.2679)

    I comment in mod_devicetable.h
    __u8 bInterfaceNumber;
    and wl_high.o from ASUS RT-N53 374.4561 compiled to firmware wl_high.ko - it start but with error and no 5G (eth2) interface up.

    I found in init-broadcom.c code to up eth2:
    Code:
    #ifdef RTCONFIG_BRCM_USBAP
    /* We have to load USB modules after loading PCI wl driver so
    * USB driver can decide its instance number based on PCI wl
    * instance numbers (in hotplug_usb())
    */
    modprobe("usbcore");
    #ifdef LINUX26
    mount("usbfs", "/proc/bus/usb", "usbfs", MS_MGC_VAL, NULL);
    #else
    mount("usbdevfs", "/proc/bus/usb", "usbdevfs", MS_MGC_VAL, NULL);
    #endif /* LINUX26 */
    {
    char insmod_arg[128];
    int i = 0, maxwl_eth = 0, maxunit = -1;
    char ifname[16] = {0};
    int unit = -1;
    char arg1[20] = {0};
    char arg2[20] = {0};
    char arg3[20] = {0};
    char arg4[20] = {0};
    char arg5[20] = {0};
    char arg6[20] = {0};
    char arg7[20] = {0};
    const int wl_wait = 3; /* max wait time for wl_high to up */
    /* Save QTD cache params in nvram */
    sprintf(arg1, "log2_irq_thresh=%d", nvram_get_int("ehciirqt"));
    sprintf(arg2, "qtdc_pid=%d", nvram_get_int("qtdc_pid"));
    sprintf(arg3, "qtdc_vid=%d", nvram_get_int("qtdc_vid"));
    sprintf(arg4, "qtdc0_ep=%d", nvram_get_int("qtdc0_ep"));
    sprintf(arg5, "qtdc0_sz=%d", nvram_get_int("qtdc0_sz"));
    sprintf(arg6, "qtdc1_ep=%d", nvram_get_int("qtdc1_ep"));
    sprintf(arg7, "qtdc1_sz=%d", nvram_get_int("qtdc1_sz"));
    modprobe("ehci-hcd", arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    /* Search for existing PCI wl devices and the max unit number used.
    * Note that PCI driver has to be loaded before USB hotplug event.
    * This is enforced in rc.c
    */
    #define DEV_NUMIFS 8
    for (i = 1; i <= DEV_NUMIFS; i++) {
    sprintf(ifname, "eth%d", i);
    if (!wl_probe(ifname)) {
    if (!wl_ioctl(ifname, WLC_GET_INSTANCE, &unit,
    sizeof(unit))) {
    maxwl_eth = i;
    maxunit = (unit > maxunit) ? unit : maxunit;
    }
    }
    }
    /* Set instance base (starting unit number) for USB device */
    sprintf(insmod_arg, "instance_base=%d", maxunit + 1);
    modprobe("wl_high", insmod_arg);
    /* Hold until the USB/HSIC interface is up (up to wl_wait sec) */
    sprintf(ifname, "eth%d", maxwl_eth + 1);
    i = wl_wait;
    while (wl_probe(ifname) && i--) {
    sleep(1);
    }
    if (!wl_ioctl(ifname, WLC_GET_INSTANCE, &unit, sizeof(unit)))
    cprintf("wl%d is up in %d sec\n", unit, wl_wait - i);
    else
    cprintf("wl%d not up in %d sec\n", unit, wl_wait);
    }
    #endif /* __CONFIG_USBAP__ */
    }
    
    but even I try on stock ASUS firmware 374.4561
    rmmod wl_high
    modprobe wl_high
    eth2 NOT up!

    what I must to do in console to up eth2 on stock?

    and how up eth2 on Asuswrt-Merlin?
     
    Last edited: Nov 13, 2014
  83. shibby20

    shibby20 Network Guru Member

    is RTCONFIG_BRCM_USBAP set in router/.config?
     
  84. AndreyPopov

    AndreyPopov Connected Client Member

    yes!

    in target.mak USBAP=y an in router/.config after start become RTCONFIG_BRCM_USBAP=y

    lsmod show that wl_high loaded.

    but in found code
    ehic_hcd loaded with some arguments
    modprobe("ehci-hcd", arg1, arg2, arg3, arg4, arg5, arg6, arg7);

    and wl_high loaded with instance_base argument
    sprintf(insmod_arg, "instance_base=%d", maxunit + 1);
    modprobe("wl_high", insmod_arg);

    first I want repeat these commands in console on stock RT-N53 374.4561 to up eth2.
    are you know console command for
    modprobe("ehci-hcd", arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    and
    modprobe("wl_high", insmod_arg);

    also used wl_probe and wl_ioctl functions?

    when upping eth2 from console on stock RT-N53 374.4561 than try on my mod ASuswrt-Merlin and see what's wrong.
     
    Last edited: Nov 13, 2014
  85. shibby20

    shibby20 Network Guru Member

    USB support is build-in. Usbcore and usb2.0 modules are loaded? Did you compare your target options with adus original sources for this router?
     
  86. AndreyPopov

    AndreyPopov Connected Client Member

    usbcore module loaded
    ehci_hcd loaded
    wl_high loaded


    Linux kernel target option compared - differencies only in usbnet and cdc_modem usbmon options.
    I try use Linux kernel options like in stock 374.4561 - same result

    this is stock 374.4561 log:
    Code:
    Jan  1 01:00:12 kernel: usbcore: registered new interface driver usbfs
    Jan  1 01:00:12 kernel: usbcore: registered new interface driver hub
    Jan  1 01:00:12 kernel: usbcore: registered new device driver usb
    Jan  1 01:00:13 kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    Jan  1 01:00:13 kernel: ehci_hcd 0000:00:04.1: EHCI Host Controller
    Jan  1 01:00:13 kernel: ehci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 1
    Jan  1 01:00:13 kernel: ehci_hcd 0000:00:04.1: EHCI Fastpath: New EHCI driver starting
    Jan  1 01:00:13 kernel: ehci_hcd 0000:00:04.1: irq 5, io mem 0x18004000
    Jan  1 01:00:13 kernel: ehci_hcd 0000:00:04.1: USB 0.0 started, EHCI 1.00
    Jan  1 01:00:13 kernel: usb usb1: configuration #1 chosen from 1 choice
    Jan  1 01:00:13 kernel: hub 1-0:1.0: USB hub found
    Jan  1 01:00:13 kernel: hub 1-0:1.0: 2 ports detected
    Jan  1 01:00:13 kernel: usb 1-2: new high speed USB device using ehci_hcd and address 2
    Jan  1 01:00:13 kernel: usb 1-2: configuration #1 chosen from 1 choice
    Jan  1 01:00:13 kernel: Symbol usb_deregister is being used by a non-GPL module, which will not be allowed in the future
    Jan  1 01:00:13 kernel: Please see the file Documentation/feature-removal-schedule.txt in the kernel source tree for more details.
    Jan  1 01:00:13 kernel: bcm_rpc_up: waiting to be connected
    Jan  1 01:00:13 kernel: bcm_rpc_buf_recv_mgn_high: Reason: 0 Dongle Version: 0x5648a89
    Jan  1 01:00:13 kernel: bcm_rpc_buf_recv_mgn_high: Connected!
    Jan  1 01:00:13 kernel: eth2: Broadcom BCMa8e4 802.11 Wireless Controller 5.110.27.20012
    Jan  1 01:00:13 kernel: usbcore: registered new interface driver dbus_usbdev
    
    this is my mod log:
    Code:
    Jan  1 00:00:27 kernel: usbcore: registered new interface driver usbfs
    Jan  1 00:00:27 kernel: usbcore: registered new interface driver hub
    Jan  1 00:00:27 kernel: usbcore: registered new device driver usb
    Jan  1 00:00:27 kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    Jan  1 00:00:27 kernel: ehci_hcd 0000:00:04.1: EHCI Host Controller
    Jan  1 00:00:27 kernel: ehci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 1
    Jan  1 00:00:27 kernel: ehci_hcd 0000:00:04.1: EHCI Fastpath: New EHCI driver starting
    Jan  1 00:00:27 kernel: ehci_hcd 0000:00:04.1: irq 5, io mem 0x18004000
    Jan  1 00:00:27 kernel: ehci_hcd 0000:00:04.1: USB 0.0 started, EHCI 1.00
    Jan  1 00:00:28 kernel: usb usb1: configuration #1 chosen from 1 choice
    Jan  1 00:00:28 kernel: hub 1-0:1.0: USB hub found
    Jan  1 00:00:28 kernel: hub 1-0:1.0: 2 ports detected
    Jan  1 00:00:28 kernel: usb 1-2: new high speed USB device using ehci_hcd and address 2
    Jan  1 00:00:28 kernel: usb 1-2: configuration #1 chosen from 1 choice
    Jan  1 00:00:28 kernel: Symbol usb_deregister is being used by a non-GPL module, which will not be allowed in the future
    Jan  1 00:00:28 kernel: Please see the file Documentation/feature-removal-schedule.txt in the kernel source tree for more details.
    Jan  1 00:00:28 kernel: dbus_usbdev: probe of 1-2:1.0 failed with error -1
    Jan  1 00:00:28 kernel: usbcore: registered new interface driver dbus_usbdev
    


    more differencies in mod_devicetable.h

    https://raw.githubusercontent.com/R...nux/linux-2.6/include/linux/mod_devicetable.h

    with untouched Asuswrt-Merlin mod_devicetable.h during compiling wl_high.ko I received error.

    replace for mod_devicetable.h from stock 374.4561 - firmware compiled but give error:
    Jan 1 00:00:28 kernel: dbus_usbdev: probe of 1-2:1.0 failed with error -1

    after more than 20 variants I find option that in Asuswrt-Merlin mod_devicetable.h give error during compile.
    in that structure
    Code:
    struct usb_device_id {
    /* which fields to match against? */
    __u16 match_flags;
    /* Used for product specific matches; range is inclusive */
    __u16 idVendor;
    __u16 idProduct;
    __u16 bcdDevice_lo;
    __u16 bcdDevice_hi;
    /* Used for device class matches */
    __u8 bDeviceClass;
    __u8 bDeviceSubClass;
    __u8 bDeviceProtocol;
    /* Used for interface class matches */
    __u8 bInterfaceClass;
    __u8 bInterfaceSubClass;
    __u8 bInterfaceProtocol;
    /* Used for vendor-specific interface matches */
    __u8 bInterfaceNumber;
    /* not matched against */
    kernel_ulong_t driver_info
    __attribute__((aligned(sizeof(kernel_ulong_t))));
    };
    
    I comment:
    // __u8 bInterfaceNumber;

    and with this modification firmware and driver compiled.
    but still give error
    Jan 1 00:00:28 kernel: dbus_usbdev: probe of 1-2:1.0 failed with error -1
     
    Last edited: Nov 13, 2014
  87. AndreyPopov

    AndreyPopov Connected Client Member

    any help?
     
  88. shibby20

    shibby20 Network Guru Member

    compare directories shared, include and linux between RMerlin and Asus stock sources. Merlin doesn`t suport any router with wl_high module well maybe he didn`t include all needed code.
     
  89. AndreyPopov

    AndreyPopov Connected Client Member

    Merlin support RT-N16 and RT-N66 that use Linux kernel 2.6 and dir src-rt and src-rt/Linux contain all needed files.

    once again:

    - if compile with untouched Merlin source (only change target.mak file and add src-rt/wl/sysdeps/RT-N53 with wl*.o) than during compiling receive error wl_high.ko on mod_devicetable.h structure error.

    - I try use mod_devicetable.h and others usb files and kernel options from stock RT-N53 374.4561 - wl_high.ko compiled but during start give error:
    Jan 1 00:00:28 kernel: dbus_usbdev: probe of 1-2:1.0 failed with error -1

    - I again use Merlin source and find that if in Merlin's mod_devicetable.h comment // __u8 bInterfaceNumber; than wl_high.ko module also compiled, but same error during start:
    Jan 1 00:00:28 kernel: dbus_usbdev: probe of 1-2:1.0 failed with error -1

    wl_high started in init-broadcom.c with next commands:
    modprobe("ehci-hcd", arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    modprobe("wl_high", insmod_arg);

    where arg1, arg2, arg3, arg4, arg5, arg6, arg7 are:
    Code:
    sprintf(arg1, "log2_irq_thresh=%d", nvram_get_int("ehciirqt"));
    sprintf(arg2, "qtdc_pid=%d", nvram_get_int("qtdc_pid"));
    sprintf(arg3, "qtdc_vid=%d", nvram_get_int("qtdc_vid"));
    sprintf(arg4, "qtdc0_ep=%d", nvram_get_int("qtdc0_ep"));
    sprintf(arg5, "qtdc0_sz=%d", nvram_get_int("qtdc0_sz"));
    sprintf(arg6, "qtdc1_ep=%d", nvram_get_int("qtdc1_ep"));
    sprintf(arg7, "qtdc1_sz=%d", nvram_get_int("qtdc1_sz"));
    

    and insmod_arg is
    Code:
    sprintf(insmod_arg, "instance_base=%d", maxunit + 1);
    
     
  90. shibby20

    shibby20 Network Guru Member

    but as you can see there is mismatch between Asus stock sources and rmerlins sources (different mod_devicetable.h file). Well RMerlin propably didn`t merge all asus`s changes for wl_high module.

    You can also compare mod_devicetable.h file from tomato. Here is my commit where i added wl_high support to tomato
    http://repo.or.cz/w/tomato.git/commit/1858f85c6132e4b3548e955f4b7589812b5d0d70

    as you can see a didn`t have to modify structure of devicetable.

    Here is kernel sources of tomato http://repo.or.cz/w/tomato.git/tree...589812b5d0d70:/release/src-rt/linux/linux-2.6
     
  91. AndreyPopov

    AndreyPopov Connected Client Member

    Asus stock 374.4561 (last available GPL for RT-N53 where I can find wl_high.o) and Asus stock 376.2678 (GPL from RT-N16) - Merlin use latest available from Asus.

    compare your commit and Asus 376.2679
    release/src-rt/linux/linux-2.6/Makefile
    already contain:
    Code:
    ifneq ($(CONFIG_BCM_CTF),)
    CFLAGS += -DHNDCTF -DCTFPOOL -DCTFMAP -DPKTC -DCTF_PPPOE -DCTF_PPTP
    ifneq ($(CONFIG_WL_USBAP),)
    CFLAGS += -DCTFPOOL_SPINLOCK
    endif
    
    added -DPKTC -DCTF_PPPOE -DCTF_PPTP

    release/src-rt/linux/linux-2.6/config_base
    in config_rt-n53
    CONFIG_WL_USE_HIGH=y
    CONFIG_WL_USBAP=y
    but still exist
    CONFIG_WL_APSTA="wlconfig_lx_router_apsta"

    release/src-rt/linux/linux-2.6/drivers/base/core.c
    contain:
    Code:
    EXPORT_SYMBOL_GPL(device_unregister);
    EXPORT_SYMBOL_GPL(get_device);
    EXPORT_SYMBOL_GPL(put_device);
    EXPORT_SYMBOL_GPL_FUTURE(device_create_file);
    EXPORT_SYMBOL_GPL_FUTURE(device_remove_file);
    
    in you commit
    EXPORT_SYMBOL(device_create_file);
    EXPORT_SYMBOL(device_remove_file);


    release/src-rt/linux/linux-2.6/drivers/net/hnd/Kconfig
    not contain your changes

    release/src-rt/linux/linux-2.6/drivers/net/wl/Makefile
    same in your commit

    release/src-rt/linux/linux-2.6/drivers/net/wl/wl_apsta/Makefile
    same

    release/src-rt/linux/linux-2.6/drivers/net/wl/wl_generic.mk
    here:
    Code:
    ifdef CONFIG_PLC
    PLC=1
    endif
    ifdef CONFIG_DPSTA
    DPSTA=1
    endif
    PKTC=1
    include $(WLCFGDIR)/$(WLCONFFILE)
    include $(WLCFGDIR)/wl.mk
    
    absent PKTC=1


    your commit
    Code:
    ifeq ($(WLCLMAPI),1)
    $(call WLAN_GenClmCompilerRule,$(src)/$(SRCBASE)/wl/clm/src,$(src)/$(SRCBASE),--ccrev all)
    clean-files += $(SRCBASE)/wl/clm/src/wlc_clm_data.c
    endif
    
    asus
    Code:
    ifeq ($(WLCLMAPI),1)
    CLM_TYPE := generic
    $(call WLAN_GenClmCompilerRule,$(src)/$(SRCBASE)/wl/clm/src,$(src)/$(SRCBASE))
    endif
    
    release/src-rt/linux/linux-2.6/drivers/net/wl/wl_high/Makefile
    same

    release/src-rt/linux/linux-2.6/drivers/usb/core/driver.c
    asus: EXPORT_SYMBOL_GPL_FUTURE(usb_deregister);
    your: EXPORT_SYMBOL(usb_deregister);

    release/src-rt/linux/linux-2.6/drivers/usb/core/urb.c
    same

    release/src-rt/wl/config/wl.mk
    same

    release/src-rt/wl/config/wlconfig_lx_router_high [new file with mode: 0644]
    exist

    release/src-rt/wl/config/wlconfig_lx_wl_stadef [new file with mode: 0644]
    exist

    release/src-rt/wl/config/wltunable_rte_43236b1_usbap.h [new file with mode: 0644]
    exist

    release/src-rt/wl/linux/wl_high.o [new file with mode: 0644]
    exist

    release/src-rt/wl/sys/wlc_channel.c [new file with mode: 0644]
    exist

    release/src/Makefile
    now in asus:
    define RouterOptions
    Code:
    if [ "$(USBAP)" = "y" ]; then \
    sed -i "/RTCONFIG_BRCM_USBAP/d" $(1); \
    echo "RTCONFIG_BRCM_USBAP=y" >>$(1); \
    if [ "$(RTAC53U)" != "y" ]; then \
    sed -i "/EPI_VERSION_NUM/d" include/epivers.h; \
    sed -i "/#endif \/\* _epivers_h_ \*\//d" include/epivers.h; \
    echo "#define EPI_VERSION_NUM $(DONGLE_VER)" >>include/epivers.h; \
    echo "#endif /* _epivers_h_ */" >>include/epivers.h; \
    fi; \
    fi; \
    
    define KernelConfig
    Code:
    sed -i "/CONFIG_WL_USE_HIGH/d" $(1); \
    sed -i "/CONFIG_WL_USBAP/d" $(1); \
    if [ "$(USBAP)" = "y" ]; then \
    echo "CONFIG_WL_USE_HIGH=y" >> $(1); \
    echo "CONFIG_WL_USBAP=y" >>$(1); \
    else \
    echo "# CONFIG_WL_USE_HIGH is not set" >> $(1); \
    echo "# CONFIG_WL_USBAP is not set" >>$(1); \
    
    release/src/router/config/config.in
    asus
    Code:
    config RTCONFIG_BRCM_USBAP
    bool "USB AP Support"
    depends on RTCONFIG_USB
    default n
    
    release/src/router/config_base
    at asus exist
    # RTCONFIG_BRCM_USBAP is not set

    release/src/router/rc/usb.c
    this code now in rc/sysdeps/init-broadcom.c

    but your code is:
    Code:
    +#ifdef TCONFIG_USBAP
    + char instance[20];
    + sprintf(instance, "instance_base=1");
    + modprobe("wl_high", instance );
    +#endif
    
    asus code is:
    Code:
    #ifdef RTCONFIG_BRCM_USBAP
    /* We have to load USB modules after loading PCI wl driver so
    * USB driver can decide its instance number based on PCI wl
    * instance numbers (in hotplug_usb())
    */
    modprobe("usbcore");
    #ifdef LINUX26
    mount("usbfs", "/proc/bus/usb", "usbfs", MS_MGC_VAL, NULL);
    #else
    mount("usbdevfs", "/proc/bus/usb", "usbdevfs", MS_MGC_VAL, NULL);
    #endif /* LINUX26 */
    {
    char insmod_arg[128];
    int i = 0, maxwl_eth = 0, maxunit = -1;
    char ifname[16] = {0};
    int unit = -1;
    char arg1[20] = {0};
    char arg2[20] = {0};
    char arg3[20] = {0};
    char arg4[20] = {0};
    char arg5[20] = {0};
    char arg6[20] = {0};
    char arg7[20] = {0};
    const int wl_wait = 3; /* max wait time for wl_high to up */
    /* Save QTD cache params in nvram */
    sprintf(arg1, "log2_irq_thresh=%d", nvram_get_int("ehciirqt"));
    sprintf(arg2, "qtdc_pid=%d", nvram_get_int("qtdc_pid"));
    sprintf(arg3, "qtdc_vid=%d", nvram_get_int("qtdc_vid"));
    sprintf(arg4, "qtdc0_ep=%d", nvram_get_int("qtdc0_ep"));
    sprintf(arg5, "qtdc0_sz=%d", nvram_get_int("qtdc0_sz"));
    sprintf(arg6, "qtdc1_ep=%d", nvram_get_int("qtdc1_ep"));
    sprintf(arg7, "qtdc1_sz=%d", nvram_get_int("qtdc1_sz"));
    modprobe("ehci-hcd", arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    /* Search for existing PCI wl devices and the max unit number used.
    * Note that PCI driver has to be loaded before USB hotplug event.
    * This is enforced in rc.c
    */
    #define DEV_NUMIFS 8
    for (i = 1; i <= DEV_NUMIFS; i++) {
    sprintf(ifname, "eth%d", i);
    if (!wl_probe(ifname)) {
    if (!wl_ioctl(ifname, WLC_GET_INSTANCE, &unit,
    sizeof(unit))) {
    maxwl_eth = i;
    maxunit = (unit > maxunit) ? unit : maxunit;
    }
    }
    }
    /* Set instance base (starting unit number) for USB device */
    sprintf(insmod_arg, "instance_base=%d", maxunit + 1);
    modprobe("wl_high", insmod_arg);
    /* Hold until the USB/HSIC interface is up (up to wl_wait sec) */
    sprintf(ifname, "eth%d", maxwl_eth + 1);
    i = wl_wait;
    while (wl_probe(ifname) && i--) {
    sleep(1);
    }
    if (!wl_ioctl(ifname, WLC_GET_INSTANCE, &unit, sizeof(unit)))
    cprintf("wl%d is up in %d sec\n", unit, wl_wait - i);
    else
    cprintf("wl%d not up in %d sec\n", unit, wl_wait);
    }
    #endif /* __CONFIG_USBAP__ */
    


    compared.
     
    Last edited: Nov 20, 2014
  92. AndreyPopov

    AndreyPopov Connected Client Member

    I compared differencies.

    please see and say what of them are critical?
     
  93. AndreyPopov

    AndreyPopov Connected Client Member

    modify files according to you commit and try.

    1. during compile asking:

    rt-n53_wl_high.jpg
    what variant use - 4 (default) or added 8.

    if choose 4 - than receive wl.ko and wl_high.ko drivers but with error during start
    if choose 8 - than wl.ko become wl_high.ko and no wifi

    if compile with untouched mod_devicetable.h than receive error:
    rt-n53_wl_high_moddevice.jpg
    Code:
    FATAL: drivers/net/wl/wl_high: sizeof(struct usb_device_id)=24 is not a modulo of the size of section __mod_usb_device_table=140.
    Fix definition of struct usb_device_id in mod_devicetable.h
    /root/asuswrt-merlin/release/src-rt/linux/linux-2.6/scripts/Makefile.modpost:70: ошибка выполнения рецепта для цели «__modpost»
    
     
    Last edited: Nov 22, 2014
  94. AndreyPopov

    AndreyPopov Connected Client Member

    any ideas and help?

    please say what and where to check?
     
  95. AndreyPopov

    AndreyPopov Connected Client Member

    any help what and where?
     
  96. AndreyPopov

    AndreyPopov Connected Client Member

    ASUS release RT-N53 3.0.0.4.376.3754 and now all compiled and work.
     
    AndreDVJ likes this.

Share This Page