OpenWrt Forum Archive

Topic: SD mod on WHR-HP-G54 not working

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

Hei, I'm having trouble getting the SD mod working on a European Buffalo WHR-HP-G54 (bought in Finland).
We (I got the help of my dad who is an electronics engineer) followed the instructions on http://www.dd-wrt.com/wiki/index.php/SD/MMC_mod, with the exception of adding a resistor in place of the missing LED on GPIO 3.

Pictures of the mod:
http://gethome.no/~jskogtv/whr-hp-g54_sdmod_1.jpg
http://gethome.no/~jskogtv/whr-hp-g54_sdmod_2.jpg

I'm running WhiteRussian 0.9 using the mmcold.c module from DD-WRT. I've also tried the mmc.c for buffalo found on the wiki (with proper GPIO #defines).

Output from loading the module:

root@OpenWrt:~# echo 0x6a > /proc/diag/gpiomask
root@OpenWrt:~# insmod mmc DDDI=0x40 DDDO=0x20 DDCLK=0x8 DDCS=0x2
Using /lib/modules/2.4.30/mmc.o
insmod: init_module: mmc: Operation not permitted
root@OpenWrt:~# dmesg | tail
br0: port 1(vlan0) entering learning state
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan0) entering forwarding state
br0: topology change detected, propagating
vlan1: Setting MAC address to  00 16 01 d1 66 15.
vlan1: add 01:00:5e:00:00:01 mcast address to master interface
mmc: starting module with: SD_DI=0x40, SD_DO=0x20, SD_CLK=0x8, SD_CS=0x2
mmc: this board has no MMC mod installed!
mmc: error in mmc_init (-1)
root@OpenWrt:~#

I've checked that the insmod variables are correct.
Using a multimeter and an oscilloscope we have verified that each SD pin is correct (can be toggled using gpio, activity when the module is loaded) and that there is activity (a short pulse) on SD 7 (Data Out) when the module is loaded.

We have tried two different SD cards:
* 1 GB Dan-Elec SD card
* 32 MB SD card that came with a Canon camera
Same result on both.

Next up we'll probably get a SD connector (instead of soldering directly on the SD card) and a 1GB SanDisk SD card.

Any ideas or suggestions are welcome.

I use different gpios on freifunk-firmware, based on openwrt (http://ff-firmware.sourceforge.net/) .
Access to GPIO7 (Diag-LED) ist not possibel in my case. (tested with gpio-tool).
I dont know is this only a special problem on my ff-firmware or for the WHR-(HP)-G54(S).

I use :

#define SD_DI (1 << 5)
#define SD_DO (1 << 6)
#define SD_CLK (1 << 3)
#define SD_CS (1 << 1)

Excellent work!

Are there any plans out there that are Buffalo specific?  These photos you posted of your work seem to be the only source out there for someone who wants to attempt the same.  The wiki appears to be Linksys centric.

[EDIT] Nevermind.. I just noticed the bottom of the wiki has closeups of Buffalo solder joints.

(Last edited by jgombos on 10 Nov 2007, 23:18)

The discussion might have continued from here.