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

Shibby or Victek or Toastman - Please help => Tomato for Netgear WNDR3700v3 or WNDR4000 or WNDR4300

Discussion in 'Tomato Firmware' started by jilebi, Aug 24, 2013.

  1. jilebi

    jilebi New Member Member

    Hi Everybody,

    I am a newbie, so I would certainly appreciate your help.

    I am buying a new router and I would like to run TomatoUSB on it. The two main choices I have are Netgear WNDR3700v3 or WNDR4000.

    1. Which of these two routers has TomatoUSB support for it - either Toastman, Shibby, Vicktek, Teaman, etc is fine with me?

    2. I saw on Shibby's website that he has experimental version (based on v108 I think) for WNDR3700v3. Does that mean going forward Shibby will be supporting WNDR3700v3? Also, if the experimental version works on my WNDR3700v3, does that mean, I can upload Shibby v112 firmware also?

    3. There is a possibility of my buying WNDR4300 (it is Atheros based) with 128MB RAM + 128MB flash. Although I know Tomato is only Broadcom based, is there any possibility of any of the Tomato builds (like Toastman, Shibby, Vicktek) supporting WNDR4300? Specifically, I see on Vicktek's website that he plans to support 'alternative platforms'. Which additional platforms is Vicktek referring to?

    Many thanks for any and all help!
  2. Victek

    Victek Network Guru Member

    Broadcom 4708A0 Dual Core CPU used in EA6700 - RT-AC56U and presumably in RT-AC68U ... I have no chance to work on Netgear devices.....
  3. jilebi

    jilebi New Member Member

    Hi Victek,

    Thanks for the prompt response! When do you expect to release for the Broadcom 4708A0 dual core?

    Hi Shibby/Toastman/Any Other Gurus,

    Do you have any response to my questions 1 and 2 above?

    Thanks!
  4. Victek

    Victek Network Guru Member

    No date, it's my hobby ;)... just at the beginning.
    Last edited: Aug 25, 2013
  5. jilebi

    jilebi New Member Member

    I understand, Vicktek :) Keep up the good work!
  6. jilebi

    jilebi New Member Member

    Hi Vicktek,

    A quick follow-up question. I am narrowing down my choice to Netgear WNDR3700v3 which is Broadcom based. The specs from DD-WRT website for WNDR3700v3 is as below.


    WNDR3700v3PY311200166Broadcom BCM4718A@480648SOC + BCM 4331a/b/g/n Dual Radio-114 LAN 1 WAN12V 2.5A1x USB 2.0, Gbit switchWNDR3700v3 - build 19327 - 20120319



    From the specs, as well as from other forum readings, I understand that these specs are almost identical to Cisco Linksys E4200.

    Do any of your builds support WNDR3700v3? Do you know of any Tomato builds which support WNDR3700v3 with the specs above? I desperately need Tomato support for my router.

    Thanks!
  7. Marcel Tunks

    Marcel Tunks Networkin' Nut Member

    If you're set on Tomato, why must you decide between only these particular routers?
  8. jilebi

    jilebi New Member Member

    Hi Marcel,

    I had bought a WNDR3800 from a shop, which has stopped working. The shop is willing to replace it for free, with only these 3 models - WNDR3700v3, WNDR4000 and WNDR4300. Hence I can only choose between these 3.

    Do you have any advice to help me out?

    Thanks!
  9. Victek

    Victek Network Guru Member

    Last edited: Aug 25, 2013
  10. jilebi

    jilebi New Member Member

    Hi Vickek,

    No problem. I will install dd-wrt and get you the NVRAM contents and CFE for WNDR3700v3.

    I followed the link to the tutorial above on DD-WRT website, but could not find the instructions for getting the NVRAM contents and CFE. How can extract these two and get them to you, after I install dd-wrt?

    Many thanks, Vicktek!
  11. Victek

    Victek Network Guru Member

  12. jilebi

    jilebi New Member Member

    Hi Vicktek,

    Thanks. I will get the NVRAM and CFE dump, as per the links above.

    Hi Toastman/Shibby/Others,

    Please let me know your thoughts too, on questions 1 and 2 in my original post above. I highly appreciate it.

    Thanks.
  13. shibby20

    shibby20 LI Guru Member

    No, i`m not.

    No, you can`t.
  14. jilebi

    jilebi New Member Member

    Hi Vicktek,

    As per you post above, I have purchased the WNDR3700v3, loaded dd-wrt on it, and taken a backup of NVRAM and CFE from dd-wrt. I have emailed both the files to you at victek@tomatoraf.com

    In addition, I am attaching the NVRAM and CFE backup files to this post, if the forum allows me to post files.

    Please have a look at the files, and let me know if you need any additional information.

    Many, many thanks for your kind help!
    Last edited: Sep 15, 2013
  15. Victek

    Victek Network Guru Member

    Last edited: Sep 15, 2013
  16. jilebi

    jilebi New Member Member

    Hi Victek,

    Sure. I will send it in next 5 minutes.

    Thanks.
  17. jilebi

    jilebi New Member Member

    Here you go, Vickek.

    Sorry it took a few more minutes than I expected. Since I am newbie, I had to lookup on Google on which command to use for nvram ascii dump ("nvram show") and then find how to execute it in dd-wrt (use "Command" option in Web interface).

    I hope I have done it right. Let me know if you need anything else.

    Thanks!
    Last edited: Sep 15, 2013
  18. Victek

    Victek Network Guru Member

    Perfect, please erase the file you posted since some information is visible. I'll look and answer you in short period (1-2 days)
  19. jilebi

    jilebi New Member Member

    Got it. I will erase the file.

    BTW, what is the best way for me to communicate with you - via email or via this forum?

    Thanks.
  20. Victek

    Victek Network Guru Member

    The best way is posting in the forum when no sensible information is sent, then my answer can be looked by other people searching about same subject or information.

    You're welcome
  21. jilebi

    jilebi New Member Member

    That makes sense, and is very thoughtful of you, to use forum postings so that it can help others too.

    I will use this forum, if I do not have any sensitive information to share. How often do you check this forum?

    I will email you if I need to share files, which are sensitive. Is the email address I posted above the right one (I got it from your website) or is there a different one that you check daily, which I should use?
  22. Victek

    Victek Network Guru Member

    Everytime you post I receive an alert by e.mail with your comment, if it makes sense I answer, if not I ignore (like I did with your post when I received the e.mail). And when I have free time I answer posts and scan latest threads. About e.mail address, use the one you like, all converge in one common tray.

    Thanks!
    Last edited: Sep 15, 2013
  23. Victek

    Victek Network Guru Member

    @jilebi , it's OK, working in WNR3700 for Tomato. 6-7 days. I'll send a PM with link to test version, check and post the bugs you may find.
    Thanks!
  24. jilebi

    jilebi New Member Member

    Great!! You are simply amazing, Victek ....

    I can't wait to try it out. BTW, I am planning to use it with USB/NTFS and Bittorrent. If you can compile the test firmware with these features, I will be happy to test all of it thoroughly. I don't have VPN currently, but if the test firmware has it, I will setup a OpenVPN server and test that functionality too.

    I am looking forward to testing it. Thanks again!
  25. Victek

    Victek Network Guru Member

    @jilebi Test version ready,

    Code:
    Creating TRX: image/tomato-WNR3700v3-1.28.9013MIPSR2-RAF-V1.2f.trx
    
    TRX Image:
    Total Size .... : 7950336 (7764.0 KB) (7.6 MB)
      Images ...... : 7950308 (0x00794fe4)
    
    May be the size is too big but I tried to include almost features, upgrade from your actual firmware and report, some LED's will be not correct.. then we can run GPIO test to find the right address. BT is not posible .. the unit have 8MB flash.

    The link to download it's on my web page, section Tomato RAF 1.28.9013 v.1.2 and seek model in Beta to v1.3 (page bottom).
  26. jilebi

    jilebi New Member Member

    Hi Victek,

    Great! A few immediate comments.

    1. When I go to your website to download, it gives me the error "404-Not Found". The link I used on yourwebsite was http://victek.is-a-geek.com/Reposit...mato-WNR3700v3-1.28.9013MIPSR2-RAF-V1.2f1.trx

    2. BT is very important for me. I do not need VPN at all. Is there any way you can remove things other than the core - USB/NTFS/BT/QOS - to make it fit in 8MB? I am really hopeful that you can work your magic to fit it in 8MB, since I see that all Shibby builds with both VPN and BT are less than 8MB. Hence perhaps BT alone for Victek build without VPN, can also fit in 8MB.

    3. This is a very minor point. The model name is WNDR3700v3, with a 'D' in it. The image name you have in your post below for the firmware is WNR3700v3, without the 'D'.

    Once we can get (1) resolved above, I will download the image and start testing.

    Many thanks again! You are the best!!

    Thanks.


  27. Victek

    Victek Network Guru Member

    I found similarities between WNDR3700 and E4200 .. it shares similar platform with a big difference and other minor ones.. the FLASH Size, then I removed the test version and I started doing tests with E4200 unit I have.. the first attempt made by szpunk was not bad, you can see it here http://www.linksysinfo.org/index.php?threads/tomato-raf-1-28-9013.63093/page-16#post-234144 then I built a second version and tested in my E4200 .... now it's bricked, so you're lucky.. I follow my tests.

    Each Tomato mod is different but we share code, Tomato RAF is hungry and build size is bigger..

    I apologize but I'll not include Transmission in Tomato RAF builds, if you need it then you can install easily using optware/entware in your router, it works fine too.
    Last edited: Sep 21, 2013
  28. jilebi

    jilebi New Member Member

    No problem on BT, Victek. As you correctly said, it can be installed later with optware/entware.

    Sorry to hear about your E4200 getting bricked! I hope you can recover it.

    Should I wait for you to upload the next test version? I am still unable to download V1.2f1.trx from your website.

    Thanks.


  29. Victek

    Victek Network Guru Member

    Yes, it's removed cause was not completely OK, it was first try.. I'll post again when test version will be ready. About bricking the router, it's normal when you integrate new models with few information since Openwrt is not working in this model and dd-wrt have some problems, it's what motivates Tomato team to work and enjoy it. I realized the brick in E4200 when I saw (later) that boardtype and revision was exactly the same as E4200.. too late :confused:
    Last edited: Sep 21, 2013
  30. jilebi

    jilebi New Member Member

    I can definitely sense that you like to work on new challenges. It seems to excite and motivate you!

    BTW, I can certainly understand how you must like doing this work. Some years ago, I too was working in open source, specifically Linux kernel development. I would make and build my own kernel (and sometimes even an entire distribution), fix bugs, add drivers, update makefiles, etc. It was pure joy.

    Seeing your work, I am tempted to build a Tomato source code environment in Ubuntu, and see if I can help you folks - You, Shibby, Toastman, Teaman - on bug fixes or new feature development. Perhaps, after you are done with creating a stable version of WNDR3700v3, I can start out with studying and maintaining it, to learn the process. If you have any guidance for a new developer to join or contribute to Tomato development, let me know.

    BTW, bleeding edge OpenWrt runs on WNDR3700v3. The TOH page on OpenWRT website (http://wiki.openwrt.org/toh/start#netgear) is wrong/outdated for WNDR3700v3. You can find the OpenWRT binary for WNDR3700v3 at http://downloads.openwrt.org/snapshots/trunk/brcm47xx/openwrt-wndr3700_v3-squashfs.chk
    Perhaps the OpenWRT source code might be of help to you, in porting Tomato to it.
    Last edited: Sep 21, 2013
  31. Victek

    Victek Network Guru Member

    If you like to keep your brain active the you can build sudoku.. or understand tomato! .. thanks for the info about Openwrt compatibilty, it will help a lot also, btw, f2 version available for test.
  32. arrmo

    arrmo Networkin' Nut Member

    Hi,

    Not trying to sidetrack this by any means, but I have a build working on my WNDR4000 (sort of at least ... :)). I would like to fix the few items I still have (detection, GPIO, etc.), so I can feed this back to other folks. Does anyone have any information on what all files have to be updated for new HW? A quick scan seems to say router/nvram/nvram.c, router/rc/buttons.c, router/rc/init.c, router/rc/mtd.c, router/shared/id.c, router/shared/led.c, router/shared/shared.h and router/www/advanced-vlan.asp ... correct? Any more that you know of?

    With this I hope to get the required updates figured out for WNDR3400 also - but let's see.

    Thanks!
  33. Victek

    Victek Network Guru Member

    What build are you using now for WNRDR4000? then..go to repo.cz, make a fork of the build with the name you like and add the files you modified.
    Files you mentioned are ok, but it depends on other router specs also, the best way is to post a cfe.bin and nvram.txt that you can extract using another third party firmware like dd-wrt.
  34. arrmo

    arrmo Networkin' Nut Member

    Hi,

    I can do that, no problem at all - but I was going to make the changes myself to try to help out (not "expecting" someone else to do this for me, so to speak). Figured if I could help out I'd be happy to.

    Is there any info around that details what needs to be updated / added to support new HW? I could take a cut, and feed the files back for a more official version.

    Thoughts?

    Thanks!
  35. Victek

    Victek Network Guru Member

    If you ask for a kind of template forms... no, the information needed varies from model to model, this is why I said that CFE.bin and nvram.txt is the first source I look to identify a possibility for porting. In some cases the information looks promising but later you found that the manufacturer protected the unit against third party firmwares and you need more tools to skip it ... not easy.
  36. arrmo

    arrmo Networkin' Nut Member

    OK, makes sense. I have cfe.bin, just need to figure out how to convert it - then will get it to you.

    FYI, I have Tomato running on it now (that I compiled for myself, from a stock build ... modified slightly to make the image smaller, and 64k NVRAM). So Tomato does run on it ... :).

    Thanks!
  37. Victek

    Victek Network Guru Member

    If everything works fine, led's, vlan, reboot, wireless, in short; If you are happy and the router works fine then you can try to use any of the forks (Toastman, Shibby, RAF .... ) in the git, add your code and then create a fork version with your identification.
    Then the code for this model can be isolated from any of the previous versions and if anybody wants to add this model to his branch can be a simple cherry-pick job.
    If something is not working 100% please notice in your branch commit also, then other contributor may help you to fix what's is not working.

    Thanks!

    Edit: And .. if you don't know how to do it, ask again ;)
    Last edited: Nov 12, 2013
  38. arrmo

    arrmo Networkin' Nut Member

    Hi,

    Well, it mostly works ... :). Not LED's and buttons (though I can manually work them), and the second band (5 GHz) isn't working ... so a few minor things, hence the desire to update it (and share it after).

    I'll send you the files and work with this in parallel. I have cfe.bin, not sure about nvram ... or are you fine with an nvram show dump? And how do I send them to you?

    Sorry, not sure what you mean by the Edit comment - if I frustrated you I apologize, definitely wasn't my intention!

    Thanks.
  39. Victek

    Victek Network Guru Member

    ;) About Edit, it's because I added this comment after I posted... no worries.

    Well ... 5GHz it's a big issue.. may be driver initialization or default nvram values to be created and inserted in nvram table are missing.....
    About LED's and buttons ... I think also the same as before, something in router/shared/id.c needs work ...
    A great step is if you booted Tomato in this model, did switch map, vlan's... so, congratulations! :)

    About sending me the files ... well .. it's not my intention to work on it now, I'm working in another model integration, but as I said to have a phisycal device to test is definetively a great advantage.

    To send it, first I need to know which tomato version you used as base version, enter in my web site, use contact button on top right and send e.mail with attached info:
    - Base Tomato version used and the link to download it.
    - cfe.bin
    - nvram dump
    - patch file or complete files ...

    Thanks!
  40. arrmo

    arrmo Networkin' Nut Member

    No problem at all! I wasn't expecting you to jump over to this - actually, I'm hoping to take care of it myself, to avoid bothering others, and to provide some "support" back to Tomato (and to all of those who have worked so hard on it already!).

    I do have 5 GHz working, at least partially - the Tx power seems low, need to look into this (but wl commands seem to work, and recognize the hardware). Also some items like LED's are messed up, and LAN port ordering is "wrong" ... but these should just be configuration items.

    Let me work on this for a bit, perhaps get back to you in a week or so with some files to look at, but in the meantime a couple questions if you don't mind (to put me on the right path),
    - are the nvram settigns taken from CFE (defaults), then appended by what is in the nvram partition? Just trying to understand the process / logic here. There seem to be settings in each (and BOARD_ID is in the nvram / board_data partition).
    - I manually wrote to GPIO line 7, enabling it multiple times, and the LED's sort of cycled (first time one turned on, the second time it turned off and another on, etc.). Does this make sense? I would have thought a GPIO line would be hard connected to an LED.

    Thanks!
  41. Victek

    Victek Network Guru Member

    Ok ... answering ..

    release/src/rc/init.c ... here you insert model name. network map and reset gpio. You can see many examples in this file... but let's see one example:

    Code:
        case MODEL_RTN16:
            mfr = "Asus";
            name = "RT-N16";
            features = SUP_SES | SUP_80211N | SUP_1000ET;
    #ifdef TCONFIG_USB
            nvram_set("usb_uhci", "-1");
    #endif
            if (!nvram_match("t_fix1", (char *)name)) {
                nvram_set("lan_ifnames", "vlan1 eth1");
                nvram_set("wan_ifnameX", "vlan2");
                nvram_set("wl_ifname", "eth1");
                nvram_set("vlan_enable", "1");
            }
            break;
    From this piece of code you can see the following:

    case MODEL_RT_N16: ---> the model name was defined in release/src/router/shared/id.c
    ....
    Then ... nvram_set("lan_ifnames", xxxxxx) is creating this value in the router nvram when it boots and the model name it's identified ... you don't need to create it ... but it's not sucked from the cfe when the router boots .. so, you have to declare these values.
    nvram_set("lan_ifnames" means ... write "vlan1 and eth1" for this value or what's the equivalent when you write in the system command prompt:

    nvram set lan_ifnames="vlan1 eth1"
    nvram commit

    Hope it helps.. ;)
  42. arrmo

    arrmo Networkin' Nut Member

    It does, thanks! Will dig into this further, and will let you know how it goes. I first need to figure out where "MODEL_RTN16" (or equivalent) is defined. I'm assuming it will be based on board name, etc. ... but I'll find it ... :).

    Thanks so much for the help and direction - much appreciated!
  43. Victek

    Victek Network Guru Member

    case MODEL_RT_N16: ---> the model name was defined in release/src/router/shared/id.c
  44. arrmo

    arrmo Networkin' Nut Member

    Yep, will dig into it. Stuck at work right now - it sucks when work gets in the way of fun ... ;-).
  45. arrmo

    arrmo Networkin' Nut Member

    Working through this, not forgotten ... :). Trying to resolve port connections to the switch right now (but board identification is working).

    One questions for others (who may have a WNDR4000) ... in nvram, do you have a variable "board_id" set? Trying to figure out if this came about due to other firmware loads (or if I can count on it to ID the board).

    Thanks!
  46. Victek

    Victek Network Guru Member

    If you don't find board_id ... you have to discover opening CFE.bin ...if this value in not set then use board_flag to identify the model or revision. And remember.. these values are created in id.c ..
  47. arrmo

    arrmo Networkin' Nut Member

    Yep, that's understood - and what I am modifying. It's working, but I have flashed / removed firmware so many times on this router that I don't know if board_id is reliable or not (for others). Or is the safest thing to use only variables in cfe.bin?

    It seems like the information in cfe.bin is used to seed / pre-load nvram (on reset) ... correct?

    Thanks!
  48. arrmo

    arrmo Networkin' Nut Member

    FYI, have the build now identifying the hardware, but not happy with the solution yet, as the WNDR3700v3 provides the same board information (boardrev, boardflags, boardflags2). Trying to find a unique way to identify the HW - then will work on the buttons and LEDs.
  49. Victek

    Victek Network Guru Member

    No problem, you can find any other value not equal in the CFE.bin, then declare this value in id.c and include to differentiate both models... or may be 3700v3 and 4000 are the same hardware only changing firmware look and case? ;) .. look this info http://wikidevi.com/wiki/Netgear_WNDR3700v3 versus http://wikidevi.com/wiki/Netgear_WNDR4000 .. yeah, same platform, neutered model, so since 3700v3 doesn't have 3x3:3 5GHz band make an else to differentiate model no.
    Last edited: Nov 16, 2013
  50. arrmo

    arrmo Networkin' Nut Member

    Yep, completely agreed! That's actually what I'm doing, just need to find what in cfe.bin can be used reliably to do this - but I will, you're exactly right about the goal.

    Thanks!
  51. arrmo

    arrmo Networkin' Nut Member

    Hmmm ... OK, did some digging around (DD-WRT code), and as I was worried about it seems that the difference is noted in the board_data partition. Netgear has a 64k partition below the nvram partition, that stores board information (S/N, MAC, BOARDID) ... and this BOARDID is what is different. Need to figure out now how to have Tomato not delete this partition, and make it part of JFFS. It really needs to be a separate partition.
  52. Victek

    Victek Network Guru Member

    Never mind about this subject, you build a new fileystem and partitions with tomato. I don't have access to both cfe.bin but I think the easiest cherry-pick will be model_name ... if exists.. then you can create different config, a simple else to add 3x3:5GHz id in case of WNDR4000 ... I think..
  53. arrmo

    arrmo Networkin' Nut Member

    Thanks for the pointers! Will dig into it - just a bit tied up this weekend with kids ... :).

    Thanks for all the help and suggestions! Will let you know what I find.
  54. arrmo

    arrmo Networkin' Nut Member

    Hi,

    Digging in to it, no good luck so far figuring out how to discern a WNDR4000 from a WNDR3700v3. I did check txchain and rxchain in CFE, but they are the same also. I did look at how DD-WRT does this, and this is what I found,

    if (nvram_match("boardnum", "01") && nvram_match("boardtype", "0xb4cf")
    && nvram_match("boardrev", "0x1100")) {
    setRouter("Netgear WNDR3400");
    return ROUTER_NETGEAR_WNDR3400;
    }
    if (nvram_match("boardnum", "01") && nvram_match("boardtype", "0xF52C")
    && nvram_match("boardrev", "0x1101")) {
    int mtd = getMTD("board_data");
    char devname[32];
    sprintf(devname, "/dev/mtdblock/%d", mtd);
    FILE *model = fopen(devname, "rb");
    if (model) {
    #define WNDR3700V3 "U12H194T00_NETGEAR"
    char modelstr[32];
    fread(modelstr, 1, strlen(WNDR3700V3), model);
    if (!strncmp(modelstr, WNDR3700V3, strlen(WNDR3700V3))) {
    fclose(model);
    setRouter("Netgear WNDR3700v3");
    return ROUTER_NETGEAR_WNDR4000;
    }
    fclose(model);
    }
    setRouter("Netgear WNDR4000");
    return ROUTER_NETGEAR_WNDR4000;
    }

    As you can see, it uses the board_data information (partition). I also did find that by not preserving this, if you enable JFFS2 on Tomato you trash this partition, and you cannot flash back to Netgear default firmware, as it looks for this flag. So it would be good to fix the partitioning to not trash the board_data partition, and this is also the best detection mechanism.

    For now ignoring WNDR3700v3, and working on the LED's and buttons, but it would be good to figure out the board_data also.

    Thanks!
    koitsu likes this.
  55. Victek

    Victek Network Guru Member

    OK, it looks very clean and this code can be ported directly to router/shared/id.c to set up routine for these models but in the case of wndr4000 it should be a slightly difference you can play with... the 3x3 5GHz should use another chipset or ID in the cfe.bin ... so look for hardware differences between these two models in the cfe.bin. In last case post both cfe.bin.. I'll take a look.
    You're in the right way... congrats!
  56. arrmo

    arrmo Networkin' Nut Member

    Yep, agreed. The code above relies on changing the partitioning ... will look at that too, but first will just assume WNDR4000, and fix WNDR3700v3 later. FYI, I have attached the two cfe.bin files - let me know if you see something to key off of, and I can easily incorporate that.

    For now working on the LED's. Not so simple for the WNDR4000 ... there is a serial to parallel converter that has to be pinged (IO Expander it looks like). Can be handled though.

    Thanks!

    Attached Files:

    • cfe.zip
      File size:
      224.4 KB
      Views:
      8
  57. Victek

    Victek Network Guru Member

    WNDR3700 code is already ported in my source code, look at the corresponding files... I'll take a look CFE.bin

    Thanks!
  58. arrmo

    arrmo Networkin' Nut Member

    Will take a look, thanks! Also digging in to how to control the WNDR4000 LEDs, given the serial to parallel shift register (not a biggie, just need to do it).

    FYI, last minute work trip, so I may (will) go silent for about 10 days ... :-(. Not going away though!

    Thanks for all the help!
  59. arrmo

    arrmo Networkin' Nut Member

    Hi,

    I did look at your code, and I see the information on WNDR3700 in id.c (in the header area), but not in the actual code. Am I missing something?

    Thanks!
  60. Victek

    Victek Network Guru Member

    ? .. YOU work on it, I help you with your doubts but I don't work in your project ... have other priorities.
  61. arrmo

    arrmo Networkin' Nut Member

    Completely agreed! Sorry if I gave you the wrong impression, that wasn't what I meant. I was just going by your comment above "WNDR3700 code is already ported in my source code, look at the corresponding files". I don't see this fully implemented, but it could be me being stupid - so just wanted to understand what is there currently, so I don't accidentally duplicate something you already have working. Make sense?

    Again, sorry for the confusion!

    FYI, will be mostly out of touch for about 10 days now, but I do have buttons working (and reacting properly), just not LED's (as this HW has a shift register ... know what to do, just need time to do it).

    Thanks!!!
  62. Victek

    Victek Network Guru Member

    Good to know it, about WNDR3700v3, the values I entered are enough.. you don't need to enter all cfe.bin values into id files since some values are recognized automatically by tomato, in any case, the best is test with a physical unit to know it works.
    Confusion solved, thanks!
  63. arrmo

    arrmo Networkin' Nut Member

    Hi,

    Was able to work on this a bit remotely, and got back home - and have the shift register and LED function working now for the WNDR4000 (also, WiFi for both bands). So pretty much there, but a couple open items (that I'm hoping someone has some suggestions about - thanks in advance if you do!).

    1) I have added a log to do_led, to see what LED commands Tomato is sending. It's interesting, but here is what I see (I have only modified how LED reacts),

    Dec 31 18:00:49 unknown user.info init[1]: WNDR4000 Shift Register (do_led): Bit Name = usb, which = 7, b = 255, Mode = Probe
    Dec 31 18:00:53 unknown user.info init[1]: WNDR4000 Shift Register (do_led): Bit Name = diag, which = 1, b = 1, Mode = Off
    Dec 31 18:00:53 unknown user.info init[1]: WNDR4000 Shift Register (do_led): Writing to Shift Register, intExtendedLEDStatus = 00000000
    Dec 31 18:00:53 unknown user.info init[1]: WNDR4000 Shift Register (do_led): Bit Name = dmz, which = 4, b = 255, Mode = Off
    Nov 30 09:14:46 unknown user.info init[1]: WNDR4000 Shift Register (do_led): Bit Name = diag, which = 1, b = 1, Mode = Off
    Nov 30 09:14:46 unknown user.info init[1]: WNDR4000 Shift Register (do_led): Writing to Shift Register, intExtendedLEDStatus = 00000000

    So it seems that the current build of Tomato doesn't actually turn the WLAN, etc. LED's on ... does anyone else see this (on other routers perhaps)? Also interesting, when I turn 5 GHz on or off, Tomato calls for the LED's for 2.4 GHz to be enabled / disabled. I can modify this, just need to find it ... :).

    2) Netgear detection (at least for WNDR routers) does seem to rely on the board_data partition ... and also, if this gets trashed (as Tomato will do if JFFS is used), then you can't go back to Netgear firmware or other builds (like DD-WRT) without some grief. So I do need to figure out how to change the partitioning, as it's not nice to put this limitation in place. Again, any suggestions would be much appreciated!


    FYI, I have to store the shift register status in a file (inside tmp), as there don't seem to be any state variables (and do_led is spawned only when needed, then exits). Any suggestions about state variables, or stick with the external file?

    Thanks!
  64. Victek

    Victek Network Guru Member

    You can see the gpio 'finder' I use, in my trunk ... I use frequently ... bcmgpio.c ...
    Yes, 5GHz LED it's a fake LED that Broadcom forgot to implement ... it's a headache, do the trick ... ;)
    I have (still) to look cfe's ... but the board_data info it's in the cfe, not?.. then it's available always (nvram get)

    Thanks!
  65. arrmo

    arrmo Networkin' Nut Member

    Yep, will take a look at bcmgpio.c! Just need to find it first ... ;)

    Nope, board_data is different than the cfe - it's a separate partition, and contains board information (like some MAC addresses), but also needed information like the HW ID from Netgear (U12H181T00_NETGEAR for WNDR4000). It's the 64 kB right below the nvram, and currently part of JFFS2 space ... :(.

    I admit, still a bit confused about entries in CFE vs. nvram ... is CFE the baseline, and nvram items added on top (by Tomato, etc.)?

    Thanks!
  66. arrmo

    arrmo Networkin' Nut Member

    OK, struggled a bit moving to your branch, but I think I'm there now ... :). A few questions,
    1) I don't find bcmgpio.c in the tree ... am I just missing something?
    2) I get warnings / errors (actually, input waiting) for Samba 3 configuration ... is there an easy fix that you know of for that?
    3) I'm struggling to get a build to work. I tried r2e for example, and get the following. Any thoughts? Will keep plugging away, but thought you may have an easy answer.

    make install-recursive
    make[6]: Entering directory `/mnt/ProgSSD/tomato/release/src/router/glib'
    Making install in .
    make[7]: Entering directory `/mnt/ProgSSD/tomato/release/src/router/glib'
    /bin/sh ./libtool --tag=CC --mode=compile mipsel-uclibc-gcc -DHAVE_CONFIG_H -I. -DG_LOG_DOMAIN=g_log_domain_glib -g -O2 -Wall -D_REENTRANT -MT garray.lo -MD -MP -MF .deps/garray.Tpo -c -o garray.lo garray.c
    ./libtool: 1564: ./libtool: preserve_args+= --tag CC: not found
    ./libtool: 1: eval: base_compile+= mipsel-uclibc-gcc: not found
    ./libtool: 1: eval: base_compile+= -DHAVE_CONFIG_H: not found
    ./libtool: 1: eval: base_compile+= -I.: not found
    ./libtool: 1: eval: base_compile+= -DG_LOG_DOMAIN=g_log_domain_glib: not found
    ./libtool: 1: eval: base_compile+= -g: not found
    ./libtool: 1: eval: base_compile+= -O2: not found
    ./libtool: 1: eval: base_compile+= -Wall: not found
    ./libtool: 1: eval: base_compile+= -D_REENTRANT: not found
    ./libtool: 1: eval: base_compile+= -MT: not found
    ./libtool: 1: eval: base_compile+= garray.lo: not found
    ./libtool: 1: eval: base_compile+= -MD: not found
    ./libtool: 1: eval: base_compile+= -MP: not found
    ./libtool: 1: eval: base_compile+= -MF: not found
    ./libtool: 1: eval: base_compile+= .deps/garray.Tpo: not found
    ./libtool: 1: eval: base_compile+= -c: not found
    OpenWrt-libtool: compile: you must specify a compilation command
    OpenWrt-libtool: compile: Try `libtool --help --mode=compile' for more information.
    make[7]: *** [garray.lo] Error 1
    make[7]: Leaving directory `/mnt/ProgSSD/tomato/release/src/router/glib'
    make[6]: *** [install-recursive] Error 1
    make[6]: Leaving directory `/mnt/ProgSSD/tomato/release/src/router/glib'
    make[5]: *** [install] Error 2
    make[5]: Leaving directory `/mnt/ProgSSD/tomato/release/src/router/glib'
    make[4]: *** [glib-install] Error 2


    Thanks!
  67. Victek

    Victek Network Guru Member

    cfe.bin is the ID_card ... then router ask during boot process, who are you? give me your ID_card...

    your name? = MAC addresses ... wan, wl0, wl2, .....
    from where? = model_board, id, boardflags
    how old are you? = CPU model, clock speed ...
    to drink? interface_name, lan map, ......

    With all these data transferred to nvram you configured your router to run tomato ...;)
  68. arrmo

    arrmo Networkin' Nut Member

    Makes sense, thanks! I think Netgear breaks this a bit with the information in the board_data partition. If it gets messed up, you can't even flash a .chk file ... it checks for this match ... :(. Will get it taken care of though!
  69. arrmo

    arrmo Networkin' Nut Member

    Hi,

    I think I misunderstood your response ... :(. I was thinking about just turning the LED on or off (solid), but I think you mean with traffic ... correct? That would explain the Broadcom link ... ;). Can you point me to your file (bcmgpio.c)? I admit, I'm not finding it - sorry!

    FYI, I do have the other LED's turning on as needed, so getting close. Still need to figure out the partitioning, but I'll get back to that.

    BTW, is your latest (RAF) code baseline compiling for you? I admit, I can get Toastman or Shibby building, but not RAF - but it's likely me ... :(.

    Thanks!
  70. Victek

    Victek Network Guru Member

    Yes ... with traffic.
    Yes, bcmgpio.c it's not in the trunk, as usual I use only during devel. You can find in asus source code for rt-ac66/56/68 .. it's where I found it.
    Yes, sure, latest source for V1.2v it's in the git ...
  71. arrmo

    arrmo Networkin' Nut Member

    OK, makes more sense now ... :). My bad, sorry!

    Will take a look, but to make it a bit easier (if possible) ... where do you apply the fix / trick? It must be added to one of your files (I hope ... ;)).

    Will try to build it again - likely me. Thanks again for all your help!
  72. Victek

    Victek Network Guru Member

    Since it's a daemon then I built in /release/src/router/rc .. add the corresponding object compile in Makefile.
  73. arrmo

    arrmo Networkin' Nut Member

    Will dig into it - thanks!!!

    I admit, getting myself confused now, as the LED control works on other routers (like my WRT610N, also dual-band), so I need to figure out why the commands to drive the LED are different here (as in both cases the same routine, do_led(), should be called). Will investigate ... :).

    Thanks again.
  74. arrmo

    arrmo Networkin' Nut Member

    Got it - it makes sense, and I have it working (manually for now). Perhaps another dumb question, but why is it only in the code for "CONFIG_BCMWL6"? It should work fine for WL5 also, no?

    Just trying to understand, so I don't break something I don't understand ... :)

    Thanks!
  75. arrmo

    arrmo Networkin' Nut Member

    Hi,

    Finally, a bit of an update ... :). I have this working now, with just a couple minor issues (noted below). But what is working (on an WNDR4000) ...
    - WiFi, dual band (and configured using Netgear parameters, which helps output power quite a bit). Bit rate checked with iPerf ... wired = 803 – 941 Mb/s, 5 GHz ("450 Mbps") = 195 – 235 Mb/s, 2.4 GHz ("144 Mbps") = 80 – 140 Mb/s (I do have another router close, which may limit 2.4 GHz BW)
    - LED's and Buttons work
    - Flash partitioning fixed, so loading Tomato does not overwrite board_data (from Netgear)
    - Updates work via the web interface / GUI

    The two (minor?) things I'm still working on (and please comment if you have any thoughts),
    - USB ... works, but when a device is plugged in it takes out the network (have to reboot to get it back)
    - Netgear checksum ... very minor, only visible on the console, but it annoys me ... :). If you have any information on how to calculate / store this (in the header) please let me know.

    All in all, pretty much fully functional (but needs to be tested ... so yell if you want to try it out). Source updates posted to the Git repo.

    Once I fix the couple minor issues above, next HW is the WNDR3400 and WNDR3700v3.

    Thanks!
  76. Victek

    Victek Network Guru Member

    @arrmo great progress .. about USB .. any message in syslog?
  77. arrmo

    arrmo Networkin' Nut Member

    Yep, syslog seems to just say happy things about USB ... ;). And USB seems to be up and working, it's just the switch that seems to be down (to be confirmed, but even the switch driven LED's go away). And no log entries about the switch. Wireless seems to stay up, but I need to make sure of that.

    I need to dig into the USB configuration. If you have any pointers by all means yell. Thanks!
  78. arrmo

    arrmo Networkin' Nut Member

    USB is working ... :). It was an issue where the LED was being probed ... which isn't really possible with the shift register on the WNDR4000. Just the checksum left to "fix" - and the file works when loaded from CFE (tftp), just not from the GUI. It's a minor issue (doesn't block anything, just annoys me ... ;)).
  79. arrmo

    arrmo Networkin' Nut Member

    OK, the checksum is fixed now too - properly writing the checksum to the right offset in the Linux partition. If anyone wants to try out the WNDR4000 it seems to be pretty much there now.

    Unrelated, but I have seen this message on boot (did before also, and on other routers - it's not specific here),
    too long file.
    LZMA boot failed

    Any thoughts about what this means? Thanks!
    J Wallace likes this.
  80. koitsu

    koitsu Network Guru Member

    I can't help with the nature of the error, but lzma is a compression algorithm; I wouldn't be surprised if portions of initrd or kernel bootstraps were compressed with lzma (historically they've been gzip'd); it may be some code somewhere is blindly assuming lzma compression and failing, then moving to alternate compression algorithms (gzip/zlib, etc.).

    Ignore the message if it does you no harm, especially if you've seen it on other models. If you think these consumer routers are "carrier grade" in quality, you're sadly mistaken :) Although even the Cantata/Excel VoIP/TDM hardware I've worked on (re: carrier grade, as in devices that enter into the 6-digit range in USD) throw craploads of "errors" that look horribly dangerous and indicate problems until you realise they're actually harmless. This is just the day/age we live in now.
  81. arrmo

    arrmo Networkin' Nut Member

    Yep, agree with you - it's not a biggie. But I admit, it bothers me when things don't work as they should ... ;). I did some digging, and it is related to the compression used during the build process. Can't quite figure it out yet, but I will get back to it. No reason this can't be made to work "correctly" ... :).

    FYI, I did find some bugs in the USB code, where GPIO lines were being written to directly, rather than using the do_led() function (which will limit HW compatibility). Did fix this in my latest code (and pushed it to Git).

    Thanks!
  82. J Wallace

    J Wallace New Member Member

    Question: Will you be posting configuration or files for WNDR4000 , I would like to try or test it out.

    Would like to try your findings out on a WNDR4000 I recently acquired. It was bricked by dd-wrt v24 - 22118 , given to me. I unbricked it ,without tftp help, which might have been a mistake, It works, but I like tomato, so if you would like to help a newbie, can I try your setup for WNDR4000 or will you be posting it soon. Either way Thanks, I'm just learning but it's fun.
    Funny,, the more I learn about computer science the dumber I feel.;)
    Thanks , I did get a lot from your post.
  83. arrmo

    arrmo Networkin' Nut Member

    Hi,

    Yes, it would be great if you could try this out - and I'd be more than willing to help you through it! Do you have access to the serial port (to enable / run tftp)?

    I'd like to post the file, just not sure where to do that. Any suggestions?

    Thanks!
  84. J Wallace

    J Wallace New Member Member

    update:
    I would like to thank arrmo and Victek , just reading you guys post helped me out. Arrmo I must wait a minute but I do want to try to place tomato in this WNDR4000, first I must correct an error. Will be in touch.
    Again thanks. Oh it has the wrong firmware installed. Hope to be able to install it correctly soon , won't reboot after shutdown and all led's stop working.
  85. arrmo

    arrmo Networkin' Nut Member

    Glad the thread helped! Yell if you have any questions, more than happy to help you out if possible.

    Do you have serial port access? If so getting back up and running is relatively easy.

    Good luck!
  86. arrmo

    arrmo Networkin' Nut Member

    One quick question for you ... is your board_data partition still good? If it is, do you mind sending me a copy of it? The reason for asking is because when I first tried Tomato on mine it torched the partition (this is fixed in my build now ... :)). I got the MAC and board_id information back, but as I'm starting on the WNDR3400 now I think the configuration for the wireless chips are also in this partition (I did recreate this in code, but it may not be necessary).

    Thanks!
  87. J Wallace

    J Wallace New Member Member

    If I can get back into router and understand what I'm doing, I might be able to help. Flashed mine back to Netgear wndr4000 firmware( WNDR4000-V1.0.094_9.1.84 ). If I can figure how to get the information I will. Remember I'm new at this so I must read before I act. That should have recreated all partitions and information needed I hope. I will try. If I'm wrong let me know. It working fine, for now.
  88. arrmo

    arrmo Networkin' Nut Member

    Glad you're back up and running - and don't worry, we'll get you through it ... :)

    If you log in to the router (telnet/ssh in), then
    cat /proc/mtd

    This will show you your mtd partitions. Find the one labeled board_data (or very close to this). Let's say it's 5 (as an example). Then,

    cd (to get to your home directory on the router)
    cat /dev/mtdxxxx > board_data.bin, where the xxxx is 5ro (or something like this, it varies slightly based on firmware

    This should give you a 64 kB file named board_data. Then just scp or ftp it out, and you're good to go.

    Let me know if this works for you. Thanks!


    PS: My WNDR4000 has been running well for > a week now, with 5-10 devices hanging off WiFi!
  89. J Wallace

    J Wallace New Member Member

    Sorry can't enter router. Seems Netgear doesn't like that. Still researching.

    Great glad to hear that your router is working great.
  90. arrmo

    arrmo Networkin' Nut Member

    No problem - yell if you need any help. The serial interface can be your friend ... ;)
  91. arrmo

    arrmo Networkin' Nut Member

    Hi,

    I am now working on the WNDR3400 - it's coming up, partitioning is working, LED's etc. are all good .. but (there has to be a but, doesn't there? ... :)).

    I get a kernel oops when bringing up the 5 GHz radio. It looks to be detecting a BCM4329 device, which may or may not support DMA and/or PIO access. I could be wrong, but I think this is the issue (my guess ... DMA is configured, but PIO is needed). The kernel seems to provide capability to configure this, but I don't think the driver in the kernel is actually being used, is it? I admit, this is where I get a bit confused - any help would be appreciated! But it seems like the B43 / B43xx part of the kernel is being skipped, and rather some sort of pre-compiled driver is being used.

    Thoughts?

    Thanks!
  92. Victek

    Victek Network Guru Member

  93. arrmo

    arrmo Networkin' Nut Member

    Yep, good information - thanks! Where I'm still confused is how to take differerent drivers / approaches into use. Need to figure that out, as it seems we're using a fixed driver.

    Thanks again!
  94. Victek

    Victek Network Guru Member

    I think Broadcom drivers update new chipsets manufactured, then the chipset should be identified using actual driver version (more actual than version exposed).

    You welcome.
  95. arrmo

    arrmo Networkin' Nut Member

    I admit - struggling to find how to use the b43 (Linux) driver instead of the wl (Broadcom) one. If anyone has done this - any pointers would be appreciated.

    Thanks!
  96. shibby20

    shibby20 LI Guru Member

    BCMa8e4 is a USB wireless adapter. The same as in RT-N53.
    http://repo.or.cz/w/tomato.git/commit/1af0f512b564b46e94a5fb6910cf729f233c0d2c

    This device is supported by wl_high module. Just compile Tomato with USBAP=y and should works ;)

    btw to compile tomato with USBAP=y you have to revert this commit
    http://repo.or.cz/w/tomato.git/commit/46f7c5f0da4204eb61ff5108c7dd7a835df39576
    Just go to my branch of git and
    git show 46f7c5f0da4204eb61ff5108c7dd7a835df39576 > 3g.patch

    then copy this file to your working directory with sources (to release dir) and
    patch -R -p1 < 3g.patch

    that`s all.
  97. arrmo

    arrmo Networkin' Nut Member

    Hi,

    I admit, confused here - should this work for the internal device? I did give it a try, but no luck - still the same kernel issue. I have tried removing the interface from the _ifnames nvram variables also, but no luck there as well ... I think this is happening as the interface is initialized (but I could be wrong!). Here is what I see on the console,

    Warning: unable to open an initial console.
    Algorithmics/MIPS FPU Emulator v1.5
    emf: module license 'Proprietary' taints kernel.
    eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.100.138.20
    wl_module_init: passivemode set to 0x0
    eth1: Broadcom BCM4329 802.11 Wireless Controller 5.100.138.20
    PCI: Enabling device 0000:01:01.0 (0000 -> 0002)
    Data bus error, epc == 8013cba8, ra == 8013dcbc
    Oops[#1]:
    Cpu 0
    $ 0 : 00000000 00000061 00000000 00000001
    $ 4 : 802ba2d0 a800882e 0000082e 18005000
    $ 8 : 00000000 0c0800af 00000004 8365f91c
    $12 : 00200200 8111d388 8111d390 00000000
    $16 : 830f3c00 a8008000 00000000 802c0000
    $20 : 802ba2d0 81311aa0 83660a6c 00000001
    $24 : 00000008 8013d968
    $28 : 81310000 81311a28 830f3800 8013dcbc
    Hi : 9fb1e936
    Lo : c9d67b20
    epc : 8013cba8 Tainted: P
    ra : 8013dcbc Status: 11009c03 KERNEL EXL IE
    Cause : 0000001c
    PrId : 00019740
    Modules linked in: wl(P) dnsmq(P) et(P) igs(P) emf(P)
    Process modprobe (pid: 310, threadinfo=81310000, task=811ba000)
    Stack : 830f3c00 8013dc68 18000000 8000eb20 830f3c00 00000001 00001400 8014f440
    ffffffe7 00000001 830f3c00 00000001 830f3400 8013ce7c 830f3800 830f3c00
    8014b508 00000000 830f3400 ffffffff 830f3800 830f3c00 00000300 8365fe80
    80140398 00000000 830f3c00 830f3c00 00000001 80150b20 00000180 00000004
    a800b800 a8008000 8365fe80 830f3c00 00000001 83660a68 80140c70 80140a24

    Any thoughts? BTW, I do think that the chip is being mis-detected. I think it's a 43224 (based on information on the internet), not 4329.

    Thanks!
  98. arrmo

    arrmo Networkin' Nut Member

    Hi,

    And one more piece of information ... I turned some kernel debugging on, rebuilt, installed and rebooted ... and this came up,

    Driver 'wl' needs updating - please use bus_type methods

    So I am thinking it's DMA vs. PIO, but ... is wl built, or is it pre-built and not available? I admit, I'm a bit past how I understand the code (so far ... :)).

    Thanks!
  99. Victek

    Victek Network Guru Member

    Let's try the following in this case, replace wl drivers by netgear wl drivers... it should work, just replace .ko binaries.

    Thanks!
  100. arrmo

    arrmo Networkin' Nut Member

    Makes sense, seems very logical! I'll load Netgear FW, pull the drivers. I just need to figure out how to get them in the Tomato build.

    Thanks!

Share This Page