OpenWrt Forum Archive

Topic: patch to create a /proc/sys/ciscobutton

The content of this topic has been archived on 28 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I've recieved a few emails asking if I could get this hack included into the official releases, though I've no idea who I even need to talk with to find out about this. So I figure the best bet is just to post in here and hopefully someone who may be interested can pick it up and get it included.

This is a modified version of the source for diag.o (originally from WhiteRussian RC2) to make a /proc/sys/ciscobutton, identical to the /proc/sys/reset one. This also adds a 0x02 and 0x08 to /proc/sys/diag to turn the cisco button orange and/or white respectively. Sorry, don't have a .diff of this handy to provide. sad

Source:
http://www.intherack.com/random-stuff/diag_led.c

-Kenneth Sanislo


EDIT: Forgot to include....
If anyone wants a drop-in binary of the module to use, you can find it at:
http://www.intherack.com/random-stuff/diag.o

(Last edited by CodePoet82 on 28 Dec 2005, 22:26)

Any feedback on if this got included or not?

I could definitely use this function for a current project.

I'd like to see extra buttons/leds supported as well.

For example WRT54G3G uses following GPIOs:

Power and DMZ are same as on other Linksys WRT54G series devices.
3G/UMTS Connect/Disconnect button is same as Cisco-button on others.

There's two-color 3G/UMTS led and one GPIO that controls if it's blinking or not. See below for complete list.
gpio enable  1    POWER LED ON
gpio disable 1    POWER LED FLASH
gpio enable  2    3G/UMTS LED ON (GREEN)
gpio disable 2    3G/UMTS LED OFF
gpio enable  3    3G/UMTS LED ON (BLUE, overrides green)
gpio disable 3    3G/UMTS LED OFF
gpio enable  5    3G/UMTS BLINK ON
gpio disable 5    3G/UMTS BLINK OFF
gpio enable  7    DMZ OFF
gpio disable 7    DMZ ON

To make adding support easier here's nvram variables that could be perhaps used to detect when diag.o is loaded on WRT54G3G:
boardflags2=0
boardflags=0x0318
boardnum=42
boardrev=0x10
boardtype=0x0101

Also presence of PCI device 104c:ac56 (TI Cardbus controller) quite clear sign that it's WRT54G3G.

I just loaded "nbd" firmware from 2/19/2006, onto my WRTSL54GS

I see /proc/sys/reset and /proc/sys/diag

That 3G unit looks quite interesting. Removable antenna, sweet! Too bad it has to sacrifice USB port, and not available in US sad

(Last edited by vincentfox on 2 Mar 2006, 21:13)

The discussion might have continued from here.