OpenWrt Forum Archive

Topic: Compile and install on Aztech HW550-3G

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

Here are the JTAG Specs for the HW550-3G incase anyone kills their bootloader.

The unit has 8 small holes on the bottom which in turn are connected to a 14-pin header inside the unit.

The pin assignments are as follows with the leds away from you and the antennas pointing towards you.

TP6 (JTAG_TCLK) | TP9 (JTAG_TMS) | TP5 (JTAG_TD0) | TP7 (JTAG_TRST_N)
TP4 (JTAG_RST#) | TP10 (3.3VDC) | TP8 (GND) | TP3 (JTAG_TD1)

The recommended tool is TRACE32 or any ICE jtag tools!

LinkZ wrote:

To flash the Aztech HW550-3G (from the default Ralink firmware) w/o a serial cable:

1. Connect to CLI (via telnet or ssh)
2. cd /tmp
3. wget [http/ftp-url-to-image-file]
4. mtd_write -r write [image-file] /dev/mtd3
5. wait for router to reboot and OpenWrt to firstboot

Note that the Ralink firmware on the Aztech HW550-3G uses "mtd_write" instead of "mtd".  Also, double check the mtd partition you are writing to (cat /proc/mtd).  You want to write to the "linux" partition (I'm pretty sure it's /dev/mtd3).

Regards,
Layne

i'm new to this and got into the router via telnet. What do it need to do to get 3

according to the wiki, you have to build your own image and put it on a http or ftp server. after telnet into your router and cd /tmp you need to download the firmware using wget url (where url is the http/ftp address of your firmware file on the server).

MBS wrote:

according to the wiki, you have to build your own image and put it on a http or ftp server. after telnet into your router and cd /tmp you need to download the firmware using wget url (where url is the http/ftp address of your firmware file on the server).

Don't do it.
I wrote the wiki, the only surefire way is to get serial to TTL and flash it over tftp.
If you use the mtd_write you risk bricking the bootloader, it may overwrite the bootloader.
I bricked one this way.
I will recommend you to use serial to ttl method it is guranteed to work.

Never mind it is my fault for poor soldering skills.
I believe I did not clean up ChipQuick throughly the first round resulting in broken joints after cooling.
This time I desoldered the chip completely, clean the contacts and IC legs up using soldering wick completely before soldering it back.
It works.
You really need to be meticulous during soldering.

(Last edited by alphasparc on 11 Apr 2012, 12:37)

I find with most devices, unless they are in RC you are probably going to want to have a serial cable handy just in case.

Either way, looking at this router it has clearly marked JTAG pins and a serial port that just screams 'hack me!!'... for my mind in this case, flashing via serial would be the preferred method over trying to use mtd.

LinkZ wrote:

To flash the Aztech HW550-3G (from the default Ralink firmware) w/o a serial cable:

1. Connect to CLI (via telnet or ssh)
2. cd /tmp
3. wget [http/ftp-url-to-image-file]
4. mtd_write -r write [image-file] /dev/mtd3
5. wait for router to reboot and OpenWrt to firstboot

Note that the Ralink firmware on the Aztech HW550-3G uses "mtd_write" instead of "mtd".  Also, double check the mtd partition you are writing to (cat /proc/mtd).  You want to write to the "linux" partition (I'm pretty sure it's /dev/mtd3).

Regards,
Layne

DO NOT USE THIS STEP!!!>> It Will Brick your Router! It should be mentioned at pageone.

I do agree with doctordbx "flashing via serial would be the preferred method over trying to use mtd."

Please help... I have huawei e153 usb modem that am trying to have it working with my aztech hw550-3g. the router have an attitude adjustment platform. looking at kernel log and comparing it with the references on wiki, it seems that everything in configuration was ok but i could not have the 3g dongle work with router and have an internet connection. please see the attached log and configuration of network and firewall which i have in my hw550-3g. THANK YOU IN ADVANCED FOR YOUR HELP.

KERNEL LOG

[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sun Nov 18 18:54:19 UTC 2012
[    0.000000] prom: fw_arg0=00000001, fw_arg1=01f5bfb0, fw_arg2=01f5c3b0, fw_arg3=00000000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x800000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x800000
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3052 id:1 rev:3 running at 384.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 80254770, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=HW550-3G console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),6976k(rootfs),7872k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=0000a680
[    0.000000] Readback ErrCtl register=0000a680
[    0.000000] Memory: 29672k/32768k available (2046k kernel code, 3096k reserved, 340k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.100000] Mount-cache hash table entries: 512
[    0.110000] NET: Registered protocol family 16
[    0.120000] MIPS: machine is Aztech HW550-3G
[    0.130000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.140000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.150000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.170000] bio: create slab <bio-0> at 0
[    0.180000] Switching to clocksource MIPS
[    0.190000] NET: Registered protocol family 2
[    0.200000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.210000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.230000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.240000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.250000] TCP reno registered
[    0.260000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.270000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.290000] NET: Registered protocol family 1
[    0.320000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.330000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.360000] msgmni has been set to 57
[    0.360000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.380000] io scheduler noop registered
[    0.390000] io scheduler deadline registered (default)
[    0.400000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.410000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.430000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.450000] physmap platform flash device: 00800000 at bf000000
[    0.460000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
[    0.480000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.490000]   Amd/Fujitsu Extended Query version 1.1.
[    0.500000] number of CFI chips: 1
[    0.510000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[    0.520000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.540000] 0x000000000000-0x000000030000 : "u-boot"
[    0.550000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.560000] 0x000000040000-0x000000050000 : "factory"
[    0.570000] 0x000000050000-0x000000130000 : "kernel"
[    0.590000] 0x000000130000-0x000000800000 : "rootfs"
[    0.600000] mtd: partition "rootfs" set to be root filesystem
[    0.610000] mtd: partition "rootfs_data" created automatically, ofs=2F0000, len=510000
[    0.630000] 0x0000002f0000-0x000000800000 : "rootfs_data"
[    0.640000] 0x000000050000-0x000000800000 : "firmware"
[    0.660000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 33, using 33
[    0.680000] TCP cubic registered
[    0.690000] NET: Registered protocol family 17
[    0.700000] Bridge firewalling registered
[    0.700000] 8021q: 802.1Q VLAN Support v1.8
[    0.720000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.730000] Freeing unused kernel memory: 176k freed
[    2.530000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    2.620000] Button Hotplug driver version 0.4.1
[    2.770000] Registered led device: hw550-3g:green:usb
[    2.770000] Registered led device: hw550-3g:green:3g
[    2.770000] Registered led device: hw550-3g:green:status
[    2.770000] Registered led device: hw550-3g:green:wps
[    5.990000] JFFS2 notice: (381) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 49 of xref (0 dead, 42 orphan) found.
[    7.830000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    7.850000] Backport based on wireless-testing.git master-2012-09-07
[    7.860000] compat.git: wireless-testing.git
[    7.900000] cfg80211: Calling CRDA to update world regulatory domain
[    7.910000] cfg80211: World regulatory domain updated:
[    7.920000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    7.940000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    7.960000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.970000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.990000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.000000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.380000] NET: Registered protocol family 10
[    8.740000] usbcore: registered new interface driver usbfs
[    8.750000] usbcore: registered new interface driver hub
[    8.760000] usbcore: registered new device driver usb
[    9.210000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.210000] Registered led device: rt2800pci-phy0::radio
[    9.210000] Registered led device: rt2800pci-phy0::assoc
[    9.210000] Registered led device: rt2800pci-phy0::quality
[    9.270000] PPP generic driver version 2.4.2
[    9.340000] IPv6 over IPv4 tunneling driver
[    9.520000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.780000] NET: Registered protocol family 24
[    9.810000] nf_conntrack version 0.5.0 (466 buckets, 1864 max)
[   10.340000] xt_time: kernel timezone is -0000
[   10.550000] dwc_otg: version 2.72a 24-JUN-2008
[   10.550000] dwc_otg: Core Release: 2.66a
[   10.760000] dwc_otg: Periodic Transfer Interrupt Enhancement - disabled
[   10.780000] dwc_otg: Multiprocessor Interrupt Enhancement - disabled
[   10.790000] dwc_otg: Using DMA mode
[   10.800000] dwc_otg: Device using Buffer DMA mode
[   10.810000] dwc_otg dwc_otg.0: DWC OTG Controller
[   10.820000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[   10.830000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[   10.840000] dwc_otg: Init: Port Power? op_state=1
[   10.850000] dwc_otg: Init: Power Port (0)
[   10.860000] hub 1-0:1.0: USB hub found
[   10.870000] hub 1-0:1.0: 1 port detected
[   10.930000] usbcore: registered new interface driver usbserial
[   10.940000] USB Serial support registered for generic
[   10.950000] usbcore: registered new interface driver usbserial_generic
[   10.970000] usbserial: USB Serial Driver core
[   11.030000] USB Serial support registered for IPWireless converter
[   11.050000] usbcore: registered new interface driver ipwtty
[   11.060000] ipw: v0.4:IPWireless tty driver
[   11.090000] USB Serial support registered for GSM modem (1-port)
[   11.110000] usbcore: registered new interface driver option
[   11.120000] option: v0.7.2:USB Driver for GSM modems
[   11.420000] usb 1-1: new high-speed USB device number 2 using dwc_otg
[   15.800000] device eth0.1 entered promiscuous mode
[   15.810000] device eth0 entered promiscuous mode
[   15.830000] br-lan: port 1(eth0.1) entered forwarding state
[   15.840000] br-lan: port 1(eth0.1) entered forwarding state
[   15.860000] ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   17.380000] cfg80211: Calling CRDA for country: PH
[   17.380000] cfg80211: Regulatory domain changed to country: PH
[   17.400000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   17.410000] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   17.430000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[   17.840000] br-lan: port 1(eth0.1) entered forwarding state
[   20.280000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   20.320000] device wlan0 entered promiscuous mode
[   20.450000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   23.010000] ramips-wdt: timeout value 60 must be 0 < timeout <= 33, using 33
[   23.070000] br-lan: port 2(wlan0) entered forwarding state
[   23.080000] br-lan: port 2(wlan0) entered forwarding state
[   23.090000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   25.080000] br-lan: port 2(wlan0) entered forwarding state
[   26.610000] eth0: no IPv6 routers present
[   26.920000] eth0.2: no IPv6 routers present


NETWORK AND FIREWALL CONFIGURATION


BusyBox v1.19.4 (2012-11-18 16:44:02 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
-----------------------------------------------------
ATTITUDE ADJUSTMENT (12.09-rc1, r34185)
-----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
-----------------------------------------------------
root@Aztech-RT01:~# cd ..
root@Aztech-RT01:/# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.1'

config interface 'wan'
        option _orig_ifname 'eth0.2'
        option _orig_bridge 'false'
        option proto 'pppoe'
        option ifname 'eth0.2'
        option username 'ymarae'
        option password '9itw937n'

config switch
        option name 'rt305x'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'rt305x'
        option vlan '1'
        option ports '1 2 3 4 5 6t'

config switch_vlan
        option device 'rt305x'
        option vlan '2'
        option ports '0 6t'

config interface 'broadband'
        option _orig_ifname 'usb'
        option _orig_bridge 'false'
        option proto '3g'
        option device '/dev/ttyUSB2'
        option service 'umts'
        option apn 'SMARTBRO'

root@Aztech-RT01:/# cat /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option network 'lan hotspot'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        option network 'wan broadband'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option src_ip 'fe80::/10'
        option src_port '547'
        option dest_ip 'fe80::/10'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config include
        option path '/etc/firewall.user'

config redirect
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option proto 'tcp udp'
        option src_dport '2013'
        option dest_ip '192.168.1.254'
        option dest_port '80'
        option name 'ipcam'

root@Aztech-RT01:/#

The discussion might have continued from here.