OpenWrt Forum Archive

Topic: OpenWRT Kamikaze on TP-link tl-wa501g?

The content of this topic has been archived between 31 Aug 2014 and 5 May 2018. Unfortunately there are posts – most likely complete pages – missing.

xssa thank's a million you'r the best unfourtanetly i bricked my router trying to flash my own redboot so i have to use spipgm...

will report back as fast as possible

hello xssa

My wr542gv7 has a 2mb spi flash (Cfeon f16-100HIP) in the forum you
say to desolder pins 1,2,5,6 and make connection between pins 8-3.
i googled spipgm and it takes me to this site here
http://rayer.ic.cz/elektro/spipgm.htm...
here it says that an additional 3.3v has to be given to the flash

so my question is
1)which pins do i have to provide 3.3v volts
2)what should i write to the flash redboot or the vxkiller.....
3) if i flash it with redboot will the BOARD DATA be detected.......

1) pins 7,8 should be driven by 3,3V but in in this setup you should use Tplink's mainboard power source. Don't forget to power it on and connect grounds between board and computer.
2) you should only write 2MB fullflash dump because AFAIK spipgm can not write regions. Read your flash to a file, backup it in safe place, replace first 64kB with correct RedBoot and flash it back. And you'll get it.
3) WHAT?! SPIPGM will erase whole chip before writing and lead you to lose all BOARD DATA settings. Read 2) again.

xssa wrote:

pins 7,8 should be driven by 3,3V but in in this setup you should use Tplink's mainboard power source. Don't forget to power it on and connect grounds between board and computer.

WHAT so additional 3.3v is not required ????
So i should give power to board and connect to spi flash
like this:
     FLASH                LPT
(CS)  1 --------------- 7    (D5)
(DO)  2 --------------- 10  (ACK)
         4 --------------- 18  GND (gnd between board and computer)
(DIO) 5 --------------- 9   (D7)
(CLK) 6 --------------- 8   (D6)
and   flash               flash 
         8 --------------- 3 (?)  (PLEASE CONFIRM)

so pin 7,8 and additional 3.3v is not required ?? (PLEASE CONFIRM)

xssa wrote:

2) you should only write 2MB fullflash dump because Read your flash to a file, backup it in safe place, replace first 64kB with correct RedBoot and flash it back. And you'll get it..

The router does not have any linux on it. only the redboot. i tried to flash new redboot i made and the router got bricked. so now if i dump the flash i will get
: 64(Redboot)-64(eeprom)-64(option FIS)
      corrupted     
how to put the new redboot in the place of the corrupted redboot in the flash dump file

PS: I DON'T HAVE A FULL FLASH DUMP FOR THIS ROUTER AS I USED THE VXKILLER FIRST AND THEN ERASED FLASH  AND TRIED TO CHANGE REDBOOT

thanks for the help....

(Last edited by drekthar on 16 Dec 2011, 15:51)

Flash layot for near all atheros ports are many times described on this site and are similiar.
For 2mb tplink it looks like:
64kB MicroRedBoot
1856kB kernel+rootfs
64kB FIS+redboot config
64kB EEPROM+board

Eeprom is at the end.

WinHex is a good tool...

xssa i still can not send you a PM....
do you have any advance in tp-link 340 versions 3.x and 4.x ?

xssa i can give you free space like ftp/web, just PM me.

sanitaru have seen my pm

what do you think ?

I did ebtables and vconfig now 340 is stable working everything in bridge.
Now i am trying tp-link 542. I flashed with vxkiller from wiki but router is dead.
I have access to serial seeing microredboot but i have no ping. No ping but can type some commands.
Is there anyway i can flash with xymodem ?

which version of wr542 do you have ?  i flashed my wr542 v7 with the vxkiller with no problem switch is correct initialized (it has the same switch as the wr340g marvel 88)

identify the switch in your router and compile microredboot from ddwrt accordingly
the wr542g  has 16mb so it is capable hardware

sanitariu wrote:

I did ebtables and vconfig now 340 is stable working everything in bridge

could you upload your image somewhere send it to me via email :ajay.acer@gmail.com

(Last edited by drekthar on 30 Mar 2012, 14:40)

TP-link 542 is version 7.x
I flashed with vxkiller from wiki page. Now have microredboot but "fis init" and stuff like that does not work.
Also have no ping. Seems like switch is not initialiazed.
Is there any way to reflash with xyz/modem ?

Steps to get openwrt:

svn co svn://svn.openwrt.org/openwrt/trunk/ 340 -r 20972

take configs from mysite. one is for kernel the other is for the system.
http://free.gorna.net/tplink-340/

then kompile and put on the router.
kernel is small 603519KB but is taking 655360KB because 64k stuff.
Maximum i can do is 596K.
Note that in the config there is only ebtables. You can remove and put iptables/dhcp and dnsmasq.
There is 340KB free space.
Using the device as router with iptables+masq will make too slow speeds !
Linux is missing some NDA extensions of the marvell switch so for router go to original software.
Also i do not put any psk/wpa stuff. They take space and are hackable in 1 hour smile
My image is good for vlan+bridge stuff.

(Last edited by sanitariu on 30 Mar 2012, 15:37)

open the router up and find the switch micro redboot source code is in ddwrt website probably you got the atheros switch

I already opened and put serial. I have access to serial console in microredboot. But seems like the boot is little broken. No ping.
Is there any way to reflash with xyz/modem.

dude what is the switch on the router ?????

sanitaru: the wiki is outdated i forgot to update sorry....
this is the correct redboot that will initialize the total ram http://www.4shared.com/file/IYNjEKO4/mrb61_16ram.html   THIS IS MADE BY XSSA

PS: the wr542g has 16mb rram as opposed to  8mb

(Last edited by drekthar on 30 Mar 2012, 16:51)

switch is marvell i know is double ram. if it is anyway to reflash via serial will be good.
the device is the same as 340 except the ram.

hello sanitaru
sorry for late reply
try this in serial

RedBoot> fco -d
Run script at boot: false ? false                   ----leave false as this is custom redboot which is not hardcoded in anyway
Use BOOTP for network configuration: false ? false  ----leave false
Local IP address: 192.168.1.1 ? default             ---ipaddrr reboot should listen to
Default server IP address: 192.168.1.5 ?            ---the ipaddr of the tftp server redboot is going to listen
Console baud rate: 115200 ?                         ---  default serial speed
GDB connection port: 9000 ?                         ---port to listen
Force console for special debug messages: false ?   --- leave false
press y to save change

i have never tried to send data via the serial port don't know if you can ??

you can try spipgm to programme the flash via the lpt port from pc
here is the link : http://rayer.ic.cz/elektro/spipgm.htm

thank you for the how to for 340g smile

(Last edited by drekthar on 30 Mar 2012, 22:55)

sure i can try the lpt programmer but i need original hex file to write....

Hey

I am new to this forum and interestet in having openWRT on my WA501G. (HW-Rev 1)
I do not really understand how to chive this? Is it even possible without desoldering any chips?

Is there any full image?

sanitariu wrote:

sure i can try the lpt programmer but i need original hex file to write....

no need read above what xssa say's
all you need to do is just dump the contents on the flash to the computer and edit first 64k with redboot by xssa redboot http://www.4shared.com/file/IYNjEKO4/mrb61_16ram.html

dark alex wrote:

Hey

I am new to this forum and interestet in having openWRT on my WA501G. (HW-Rev 1)
I do not really understand how to chive this? Is it even possible without desoldering any chips?

Is there any full image?

what is the hardware spec
cpu ?
switch  ?
ram  ?
Flash ?
start off by giving information of hardware by updating the openwrt wiki with the device name

sanitariu wrote:

Steps to get openwrt:

svn co svn://svn.openwrt.org/openwrt/trunk/ 340 -r 20972

take configs from mysite. one is for kernel the other is for the system.
http://free.gorna.net/tplink-340/

then kompile and put on the router.
kernel is small 603519KB but is taking 655360KB because 64k stuff.
Maximum i can do is 596K.
Note that in the config there is only ebtables. You can remove and put iptables/dhcp and dnsmasq.
There is 340KB free space.
Using the device as router with iptables+masq will make too slow speeds !
Linux is missing some NDA extensions of the marvell switch so for router go to original software.
Also i do not put any psk/wpa stuff. They take space and are hackable in 1 hour smile
My image is good for vlan+bridge stuff.

okay i build my own image according to you instructions but in openwrt wifi was not detected so manually inserted the config

config wifi-device  wifi0
        option type     atheros
        option channel  10
        option mode   11g

config wifi-iface
        option device   wifi0
        option network  wan 
        option mode     sta
        option ssid     ******
        option encryption psk
        option key *****

after this when i intializes wifi i get

/sbin/wifi: eval: line 1: can't create /proc/sys/dev/wifi0/countrycode: nonexistent directory
/sbin/wifi: eval: line 1: can't create /proc/sys/dev/wifi0/outdoor: nonexistent directory
cat: can't open '/proc/sys/dev/wifi0/dev_name': No such file or directory
wlanconfig: ioctl: No such device
enable_atheros(wifi0): Failed to set up sta vif

could you tell me how to set this up
thanks in advance for your help

(Last edited by drekthar on 1 Apr 2012, 05:48)

drekthar wrote:
dark alex wrote:

Hey

I am new to this forum and interestet in having openWRT on my WA501G. (HW-Rev 1)
I do not really understand how to chive this? Is it even possible without desoldering any chips?

Is there any full image?

what is the hardware spec
cpu ?
switch  ?
ram  ?
Flash ?
start off by giving information of hardware by updating the openwrt wiki with the device name

Arte those so different within the model?
I mean this whole thread is about this model.

As I wrote previous ... i do not use any wifi detect stuff auto scripts and sort of things just because the router is too slow !!! Also I do not use any kind of authorization like wep/wpa2. Router TP-link 340 is USABLE under openwrt only in bridge mode !!!
So you can make rc.local and setup like this:

sleep 30
sync
modprobe wlan
sync
sleep 3
modprobe ath_ahb
sync
sleep 5

# create master AP device ath0
wlanconfig ath0 create wlandev wifi0 wlanmode ap bssid

# set SSID
iwconfig ath0 essid some_word

# set G protection mode
iwpriv ath0 protmode 0

# set channel
iwconfig ath0 channel 8

# set radar background scan
iwpriv ath0 bgscan 0

# set isolate 1
iwpriv ath0 ap_bridge 1

# run STP on the bridge
brctl stp br-mynet 1


That is !
No you bridge the LAN and do authorization somwhere else.





For flashes about 54x you must edit the wiki and inlcude which flash is for atheros switch and which is for marvell.
Now the file is misleading and someone like me will kill his router smile

Sorry, posts 251 to 250 are missing from our archive.