Wireless client

Specific forum for all wireless related issues. Even if you have a wireless router, only post here if you have a question about issues with the wireless functionality of it. Questions about wireless access points, cards, hot-spots etc. are also welcome here.
rospo
Novice
Novice
Posts: 12
Joined: Sat Nov 13, 2010 6:21 pm

Re: Wireless client

Post by rospo » Fri Mar 18, 2011 12:22 am

thechief wrote:
rospo wrote:Hi. I have a Qwest branded ActionTec GT701Wg router/modem as yours. I would like to flash RT on it. I tried with OpenWRT, but its firmware broke the router. I was able to restore original actiontec firmware. adam2 not corrupted.

I run linux, I use TNFTP to flash images. I would appreciate if you could explain step by step how to flash the RT firmware onto this router. There's a lot of people around trying to do it. Thanks.
viewtopic.php?f=16&t=4027&p=48592#p48592
Thanks. I've got it working! I splitted the firmware with wine firmware_tool.exe , then used tnftp (xferbuf 512) to put filesystem to mtd0 and kernel to mtd1. Rebooted and got it working! Thanks a lot!

Here's a little howto for gnu/linux users. See this before:

http://oldwiki.openwrt.org/OpenWrtDocs% ... ngAR7.html

and use tnftp instead of ftp. For some reason, ftp freezes when tryng to upload the new
firmware image. Somewhere I found that under linux we have to use tnftp with xferbuf=512 option.

1) split the RT firmware image using wine RT firmware_tool.exe

Let's say the last RT firmware is: RouterTech_3.6.0D_20110103_2.95_AR7WRD_Adam2_1-Port_firmware.upgrade.img; after splitting it with "wine RT firmware_tool.exe", you will get in the same directory 2 new files:

a) RouterTech_3.6.0D_20110103_2.95_AR7WRD_Adam2_1-Port_firmware.upgrade.filesystem.bin
b) RouterTech_3.6.0D_20110103_2.95_AR7WRD_Adam2_1-Port_firmware.upgrade.kernel.bin

2) ifconfig eth0 192.168.0.100

3) unplug router; plug router and while power led is red, do step 4

4) tnftp 192.168.0.1 (ftp will not work, because it does not have xferbuf 512 - at least I don't know how to set it)

Connected to 192.168.0.1.
220 ADAM2 FTP Server ready.
Name (192.168.0.1:user): adam2
Password:adam2
230 User adam2 successfully logged in.
Remote system type is UNIX.

ftp> binary
ftp> quote MEDIA FLSH
ftp> xferbuf 512
ftp> put RouterTech_3.6.0D_20110103_2.95_AR7WRD_Adam2_1-Port_firmware.upgrade.filesystem.bin "filesystem.bin mtd0"

wait for the transfer to finish;

ftp> put RouterTech_3.6.0D_20110103_2.95_AR7WRD_Adam2_1-Port_firmware.upgrade.kernel.bin "kernel.bin mtd1"

wait for the transfer to finish;

ftp> quote REBOOT

Wait for the router reboots.

That's all. Have fun!

Edit: name of "Firmware Tool" binary corrected by thechief
Last edited by rospo on Fri Mar 18, 2011 11:44 am, edited 2 times in total.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Wireless client

Post by thechief » Fri Mar 18, 2011 10:20 am

Thanks for this additional tutorial for Linux users. But please note that mtd0 and mtd1 need to be correctly set first - otherwise, the router will not boot.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: Wireless client

Post by mstombs » Fri Mar 18, 2011 10:47 am

Any explanation why this procedure needed? Its just luck isn't it that the old mtd1 an 0 are appropriate size for RT kernel and filesystem? Is it not possible to flash combined image with bootloader (too big maybe?). If mtd4 set can subsequent upgrades be done using web gui and single image?
rospo
Novice
Novice
Posts: 12
Joined: Sat Nov 13, 2010 6:21 pm

Re: Wireless client

Post by rospo » Fri Mar 18, 2011 11:21 am

thechief wrote:Thanks for this additional tutorial for Linux users. But please note that mtd0 and mtd1 need to be correctly set first - otherwise, the router will not boot.
Thanks chief. I was very lucky, because I didn't setenv new partitions before flashing the firmware.
The RT fs and kernel stored perfectly in original ActionTec partition. Great luck, my stupidity.
rospo
Novice
Novice
Posts: 12
Joined: Sat Nov 13, 2010 6:21 pm

Re: Wireless client

Post by rospo » Fri Mar 18, 2011 11:43 am

mstombs wrote:Any explanation why this procedure needed? Its just luck isn't it that the old mtd1 an 0 are appropriate size for RT kernel and filesystem? Is it not possible to flash combined image with bootloader (too big maybe?). If mtd4 set can subsequent upgrades be done using web gui and single image?
Q 1) just luck, me stupid!

Q 2) I did try it, with no success using OpenWrt procedure. Spanning mtd1 and mtd4 in mtd5, the uploaded RT combined image. Got brick.

Q 3) I stil did not test it. If you tell me the procedure I could try.

Some data:

this is the flash map of ActionTec GT701WG:

partition, start , end, what's in

mtd0, 0x900d0000, 0x903e0000 - squashfs filesystem

mtd1, 0x90010000, 0x900d0000 - kernel

mtd2, 0x90000000, 0x90010000 - ADAM2

mtd3 0x903f0000, 0x90400000 - ADAM2 environment variables followed by config.xml

mtd4 0x903e0000 0x903f0000 - unknown/unused (32 zero bits followed entirely by ones)

This is the suggested new partition map suggested when splitting RT firmware
with wine firmware-tool.exe:

setenv mtd0 0x9008f000,0x903f0000
setenv mtd1 0x90010090,0x9008f000
setenv mtd2 0x90000000,0x90010000
setenv mtd3 0x903f0000,0x90400000
setenv mtd4 0x90010000,0x903f0000
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Wireless client

Post by thechief » Fri Mar 18, 2011 1:04 pm

rospo wrote:This is the suggested new partition map suggested when splitting RT firmware
with wine firmware-tool.exe:

setenv mtd0 0x9008f000,0x903f0000
setenv mtd1 0x90010090,0x9008f000
setenv mtd2 0x90000000,0x90010000
setenv mtd3 0x903f0000,0x90400000
setenv mtd4 0x90010000,0x903f0000
These settings are for single-image upgrades.

If you are using separate (i.e., split) images, then the mtd1 setting will not work. For separate images, the beginning of mtd1 needs to end with "00", not "90" - i.e., "setenv mtd1 0x90010000,0x9008f000" - not "setenv mtd1 0x90010090,0x9008f000"
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Wireless client

Post by thechief » Fri Mar 18, 2011 1:26 pm

rospo wrote:
thechief wrote:Thanks for this additional tutorial for Linux users. But please note that mtd0 and mtd1 need to be correctly set first - otherwise, the router will not boot.
Thanks chief. I was very lucky, because I didn't setenv new partitions before flashing the firmware.
The RT fs and kernel stored perfectly in original ActionTec partition. Great luck, my stupidity.
In this case, your good luck was because the spaces reserved for the kernel (768kb) and filesystem (3136kb) in the mtd blocks were more than enough. The Firmware Tool calculates the minimum space required for the kernel image (in this case, 508kb), and thereby provides space for a bigger filesystem (in this case, 3460kb).

Your original mtd settings means that such calculations are not required - as long as the kernel image is smaller than 768kb and the filesystem is smaller than 3136kb - which would be the case with every RouterTech firmware to date (and perhaps for the foreseeable future). But what your original settings means is that the mtd1 partition is about 260kb bigger than it needs to be. That space (that is currently being wasted) could be recovered and used for a minix partition for example. But it is not doing you any harm to leave it as it is (and it may well be that a fixed kernel space is required for separate images).

By the way, your mtd4 is only 64kb - so don't ever try to flash a single-image firmware without repartitioning your mtd blocks!
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: Flashing Actiontec DSL modems & routers

Post by hiteck » Fri Dec 09, 2011 8:36 pm

The procedure using tnftp above works with the OEM MTD set using separate images, but takes much more work IMHO. And I am not sure a webgui upgrade of RT firmware is possible if MTD4 is not changed to span the FS and kernel. The tutorial I wrote up last march was done because RRT does not do well when trying to flash these routers with separate images.

I have verified my single image process using RRT many times now with GT701wg. The MTDs for the 4 port GT704wg are a bit different and must be set per the RT docs for the the RT firmware being flashed. Search for my posts & tutorial to get the details.

Basically... After using RUC to backup the environment and config (mtd3), I setup the PC IP with RRT, boot into the bootloader upon power-up, set the MTDs with RRT, then flash single image with RRT then wait 5 MINUTES !. Reboot router, reset PC IP and login to 192.168.1.1. The config file s/be reset to defaults upon boot. After basic configuration I can also setup a BIG minix partition (in spite of warnings) using

Code: Select all

makemtd.sh mtd5 640 auto_minix
then reboot, wait 5 minutes for mtd5 to get formatted, reboot again and the env is set to automount /nvram on mtd5. Script city now !

As for Openwrt, the flashing procedure (and MTDs) are much different (use ftp to set MTD5 and flash per openwrt website). Do not load openwrt unless you NEED a wireless client (without wep, wpa or wds). And it will not be bridged either, it will act like a wireless router in reverse but the wireless MAC may become generic. And kamikaze will fill up the flash with inactive files so beware. And much traffic on the airwaves (ie; ch 6) will cause the openwrt acx driver to hang ! Routertech rules Actiontec for DSL and AP needs.

Use telnet for getenv & setenv, use fixenv to defrag after changes to the env. Here is an example of jewels in my environment:

mtd5 0x90350000,0x903f0000
RT_init_nvram mount -t minix /dev/mtdblock/5 /nvram/
led_conf led.gt704wg
cron_enable 1
RT_cmd_1 write_crontab.sh '47' '8' '*' '*' '*' '/sbin/reboot'
netshaper_enable 1
RT_cmd_2 netshaper -d 192.168.1.255/24 50000
RT_cmd_3 netshaper -s 192.168.1.255/24 50000
utelnetd_timeout 7200

Note that the reboot function must be setup using

Code: Select all

cronjob-env.sh '/sbin/reboot' '22' '2' '*' '*' '*' 'RT_cmd_1'
from the command line. Do not use setenv to enter that due to the quotes.

I found a common cause of bricking due to trying to set MTDs manually with FTP QUOTE or telnet or ssh. If you use the backspace key when typing the commands, the BS code gets into the env and even PCtool and CICLamab tools can make the env worse. CICLamab may truncate the env. SO new revelation - do not use ftp or telnet to change the mtds. Use the RRT Router Repair tool only. And use care when using setenv. Using unsetenv will not remove the trashed entries in the env. Blank lines in the env are evidence of corrupt entries. Blame adam2 bootloader for all of this.

Peer separation, IP accounting and Netshaper are what makes RouterTech firmware standout :) !
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
Post Reply