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

Asking any current active programmer of Tomato

Discussion in 'Tomato Firmware' started by Kiwi8, May 21, 2008.

  1. Kiwi8

    Kiwi8 LI Guru Member

    Hello!

    U see, I have a WRT54G 2.2, but it does not have the SES button. But flashing the firmware still results in a SES configuration page on the web interface. I wish to recompile the firmware such that it will display a "This feature is not supported on this router." on that page, which is the case for my WRT54G 2.0.

    Can anyone help me out on this?

    Thanks in advance.
     
  2. nvtweak

    nvtweak LI Guru Member

    This can be done with simple nvram toggle of t_features variable. No recompile necessary.

    For example, on my WHR-G125 I can set t_features to 0x0 and the admin-buttons page displays "This feature is not supported on this router."

    If you're interested how I figured it out. I looked at the source code rc/init.c section for WRT54G.

    Code:
    mfr = "Broadcom";
    	name = NULL;
    	features = 0;
    	switch (model) {
    	case MODEL_WRT54G:
    		mfr = "Linksys";
    		name = "WRT54G/GS/GL";
    		switch (check_hw_type()) {
    		case HW_BCM4712:
    			nvram_set("gpio2", "adm_eecs");
    			nvram_set("gpio3", "adm_eesk");
    			nvram_unset("gpio4");
    			nvram_set("gpio5", "adm_eedi");
    			nvram_set("gpio6", "adm_rc");
    			break;
    		case HW_BCM4702:
    			nvram_unset("gpio2");
    			nvram_unset("gpio3");
    			nvram_unset("gpio4");
    			nvram_unset("gpio5");
    			nvram_unset("gpio6");
    			break;
    		case HW_BCM5352E:
    			nvram_set("opo", "0x0008");
    			nvram_set("ag0", "0x02");
    			// drop		
    		default:
    			nvram_set("gpio2", "ses_led");
    			nvram_set("gpio3", "ses_led2");
    			nvram_set("gpio4", "ses_button");		
    			features = SUP_SES | SUP_WHAM_LED;
    			break;
    		}
    		break;
    
    shared.h (gives you bit settings of SUP_SES and SUP_WHAM_LED);

    Code:
    #define SUP_SES			(1 << 0)
    #define SUP_BRAU		(1 << 1)
    #define SUP_AOSS_LED	(1 << 2)
    #define SUP_WHAM_LED	(1 << 3)
    #define SUP_HPAMP		(1 << 4)
    #define SUP_NONVE		(1 << 5)
    #define SUP_80211N		(1 << 6)
    
     
  3. Kiwi8

    Kiwi8 LI Guru Member

    Thanks! It works!
     

Share This Page