Hawking H2WR54G

From LinuxMIPS
Revision as of 00:47, 17 January 2006 by HH (talk | contribs) (Kernel Analysis)
Jump to: navigation, search

The Hawking H2WR54G is a dual-WAN SOHO gateway/router/AP based on the ADM5120 SoC (BGA). It has 2 WAN Ethernet ports and a 4 port LAN switch. The firmware contains the usual: Linux, Firewall, NAT, dhcp client and server, BusyBox, etc. The ADM5120 runs in little-endian mode. Hawking's Linux kernel is version 2.4.18 and userspace is bsaed on the uClibc library.

The H2WR54G is substantially the same product as the Planet XRT-402D.


The appearance of the external case in the Hawking product link differs from earlier versions that were sold. This is what the case used to look like when the product was first introduced in 2004:

100 0008.jpg

Hawking makes no distinction between the cases when it comes to their firmware, so the conclusion is that internally the two different cases contain the same hardware and only external appearance has changed.

USB Expansion Potential

Like the Planet XRT-402D and several Edimax models, there are places on the PCB for two USB connectors and associated electronics that are not populated. The stock H2WR54G does not offer USB connectivity as a result. As with the Edimax BR6104KP, it may be possible to add the missing parts and achieve USB support.

Circuit Board

The main circuit board is pictured here.

100 0105.jpg

The space for the unpopulated USB connectors can be seen at the top of the board. At the bottom center one can see the 14-pin JTAG connector and the 8-pin serial port connector. If you take a look at the picture links for the Planet XRT-402D router you will see that the circuit boards appear to be almost identical.

CPU & Memory

The ADM5120 SoC (System-On-Chip) and memory components are pictured here.

100 0077.jpg

The ADM5120 is visible in this picture. Below and to the right of the ADM5120 the MX29LV320 ABTC-90 flash memory chip can be seen. It is a 32 MBit device that is configurable as 2,097,152 x 16-bit words or 4,194,304 x 8-bit bytes (4 MBytes). At the left the two SDRAM chips are seen. They are HY57V281620HCT devices; each is 128 Mbits internally organized as 4 banks of 2,097,152 x 16. Together they provide 32 MBytes of SDRAM.

WiFi mini-PCI Card

The Inprocomm wireless miniPCI card is pictured here.

100 0096.jpg

The IPN2220 WiFi chip is provided with only a binary driver supplied as a kernel module, IPN2220AP.o. There is no native Linux source code for this driver, so unless you're willing to run ndiswrapper you are pretty much stuck with the Linux 2.4.18 kernel since modules compiled for one version of the kernel will not work with other versions.

Kernel Analysis

I've managed to compile my own 2.4.18 kernel using the Edimax source code and the Hawking initrd disk image files. It boots and runs but the Hawking scripts that manage the dual-WAN setup do not run properly. I'm pretty sure this is because of the dual-WAN nature of the H2WR54G. The Edimax source code does not account for this feature. In particular, the file


defines the VLAN interfaces for the kernel. The Edimax source code has

static long vlan[MAX_VLAN_GROUP] = {0x5E, 0x41, 0, 0, 0, 0};

while the Hawking kernel was built with

static long vlan[MAX_VLAN_GROUP] = {0x41, 0x42, 0x7C, 0, 0, 0};

The kernel network code assigns each VLAN group to an ethernet device. For the Edimax code, the devices would be eth0 and eth1, while the Hawking code adds eth2 to the mix. This reflects the addition of the second WAN port. This information was only obtainable by examining the binary kernel in the Hawking firmware. There are undoubtedly more kernel changes, such as the one that prevents boot-time printk messages from appearing, that are extremely subtle and hard to pin down without access to the source code. It would be nice if someone would light a fire under Hawking or Planet to get them to release their source code, but it's hard to drum up interest in this since these are two minor vendors in the grand scheme of things.


After hooking up a serial port to the router and powering it on there is a distinct lack of output during the boot process. One up and running, the 'dmesg' command does not show any information. It appears as though Hawking has modified the kernel code somehow to turn off all printk output during the boot process. Replacing the firmware with a custom-built 2.4.18 kernel results in all the normal boot-time messages one would normally expect from Linux. Current experiments involve disassembling the Hawking Linux kernel to try and ascertain a way to patch it so that the boot-time messags are printed.