OpenWrt Forum Archive

Topic: gpiomask documentation

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

Hello,

Could anyone explain howto set the gpiomask? It would be nice to have something about this at the wiki in a bit more detail. I have done the SD/MMC mod on an WRT54GL with kamikaze 7.09 installed. It works fine but as soon as I mask out (every?) gpio line with my wlan led is constantly off. I use the router in client mode and the wlan interface is the wan interface so this led is the only indication if any data are transmitted to the outside world.

I have used "echo 0x9c > /proc/diag/gpiomask". I would like to be able to just mask out

gpio2 white led
gpio3 orange led
gpio4 cisco switch
gpio7 dmz led

which are the lines I have used for the mod. What is the right mask for that? Could anyone who knows about this in more detail produce a masking table? I have followed the excellent howto from http://home.versatel.nl/janssenmaj/mmc-sd-mod.html for the mod. Thanks for the nice tutorial and the good work!

Alexander

(Last edited by pohl3345 on 26 Nov 2007, 19:32)

Hi,

Ok, I have found what I was looking for in another post at

http://forum.openwrt.org/viewtopic.php?id=8543

Here is a list with the GPIOs and its hex values:
GPIO PIN 0: 0x01
GPIO PIN 1: 0x02
GPIO PIN 2: 0x04
GPIO PIN 3: 0x08
GPIO PIN 4: 0x10
GPIO PIN 5: 0x20
GPIO PIN 6: 0x40
GPIO PIN 7: 0x80
GPIO PIN 8: 0x100
GPIO PIN 9: 0x200
GPIO PIN 10: 0x400
GPIO PIN 11: 0x800
GPIO PIN 12: 0x1000
GPIO PIN 13: 0x2000
GPIO PIN 14: 0x4000
GPIO PIN 15: 0x8000

If I add up the gpio lines I have used in the mod I get a hex value of 0x9c, so the mask command is alright. The led's can be fixed with

echo "1" >/proc/diag/led/power
echo "1" >/proc/diag/led/wlan

Alexander

(Last edited by pohl3345 on 27 Nov 2007, 01:11)

The discussion might have continued from here.