Difference between revisions of "Hawking H2WR54G"

From LinuxMIPS
Jump to: navigation, search
(WiFi mini-PCI Card: ndiswrapper does NOT work on MIPS...)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The [http://www.hawkingtech.com/support/details.php?CatID=19&FamID=13&ProdID=185 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 [http://www.hawkingtech.com/support/details.php?CatID=19&FamID=13&ProdID=185 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, uClibc, etc.  The ADM5120 runs in little-endian mode.  Hawking's Linux kernel, like most of the Edimax-clone devices, is version 2.4.18.
  
  
Line 5: Line 5:
  
  
=== Appearance ===
+
== Appearance ==
  
 
The appearance of the external case in the [http://www.hawkingtech.com/support/details.php?CatID=19&FamID=13&ProdID=185 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:
 
The appearance of the external case in the [http://www.hawkingtech.com/support/details.php?CatID=19&FamID=13&ProdID=185 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:
  
  
[[Image:100_0008.jpg]]
+
[[Image:100_0008_sm.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.
+
Althouth the case design has changed radically, the firmware downloads are compatible so it would be resonable to assume that they are identical on the inside.
  
  
=== USB Expansion Potential ===
+
== 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 [http://sprite.student.utwente.nl/~jeroen/projects/lb000021/usb_tutorial/ add the missing parts] and achieve USB support.
+
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.  As with the Edimax BR6104KP, it may be possible to [http://sprite.student.utwente.nl/~jeroen/projects/lb000021/usb_tutorial/ add the missing parts] and achieve USB support.  The ADM5120 implements USB version 1.1 only.
  
  
=== Circuit Board ===
+
== Circuit Board ==
  
 
The main circuit board is pictured here.
 
The main circuit board is pictured here.
Line 29: Line 29:
  
  
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 [http://www.linux-mips.org/wiki/ADMtek#Products_based_on_the_ADM5120 picture links for the Planet XRT-402D] router you will see that the circuit boards appear to be almost identical.
+
The space for the unpopulated USB connectors can be seen at the top of the board.  At the bottom center you can see the 14-pin JTAG connector and the 8-pin serial port connector.  If you take a look at the [http://www.linux-mips.org/wiki/ADMtek#Products_based_on_the_ADM5120 picture links for the Planet XRT-402D] router you will see that the circuit boards are almost identical.
  
=== CPU & Memory ===
+
 
 +
== CPU & Memory ==
  
 
The ADM5120 SoC (System-On-Chip) and memory components are pictured here.
 
The ADM5120 SoC (System-On-Chip) and memory components are pictured here.
Line 39: Line 40:
  
  
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.
+
The ADM5120 is visible in this picture.  Below and to the right of it the MX29LV320ABTC-90 flash memory chip can be seen.  It is a bottom-boot 32 MBit device that is configurable as 2,097,152 x 16-bit words (4 MBytes).  At the left are the two SDRAM chips.  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 ===
+
== WiFi mini-PCI Card ==
  
 
The Inprocomm wireless miniPCI card is pictured here.
 
The Inprocomm wireless miniPCI card is pictured here.
Line 50: Line 51:
  
  
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.
+
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 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 (and ndiswrapper does not work on MIPS, since it just executes the Windows Intel code).
  
 +
== 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
 +
 +
<pre>
 +
.../linux-2.4.18-adm/drivers/net/am5120sw/swdrv.c
 +
</pre>
 +
 +
defines the VLAN interfaces for the kernel.  The Edimax source code has
 +
 +
<pre>
 +
static long vlan[MAX_VLAN_GROUP] = {0x5E, 0x41, 0, 0, 0, 0};
 +
</pre>
 +
 +
while the Hawking kernel was built with
 +
 +
<pre>
 +
static long vlan[MAX_VLAN_GROUP] = {0x41, 0x42, 0x7C, 0, 0, 0};
 +
</pre>
 +
 +
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.
 +
 +
Sergio Aguayo's [http://www.amilda.org/ AMiLDA] Linux distro also runs on the H2WR54G.  Vladislav Moskovets' [http://midge.vlad.org.ua/wiki/ Midge] distro runs on it as well.
 +
 +
=== ADM5120 Switch ===
 +
 +
The [[ADM5120_switch]] page describes a utility to configure the VLANs managed by the ADM5120 Switch.  The utility does not work on the H2WR54G router, either with the stock firmware kernel or a custom 2.4.18 kernel built from the Edimax source.  [http://www.amilda.org/ AMiLDA] is based on the 2.4.32 Linux kernel and the admswconfig utility ''does'' work when running AMiLDA.
  
 
=== Experimenting ===
 
=== Experimenting ===
  
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 get printed.
+
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.
 +
 
 +
 
 +
=== EJTAG ===
 +
 
 +
Work is now underway to see if a bricked H2WR54G can be brought back to life through the use of the JTAG connector on the PCB.  An update will be posted once testing is complete.

Latest revision as of 00:39, 5 February 2007

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, uClibc, etc. The ADM5120 runs in little-endian mode. Hawking's Linux kernel, like most of the Edimax-clone devices, is version 2.4.18.


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


Appearance

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 sm.jpg


Althouth the case design has changed radically, the firmware downloads are compatible so it would be resonable to assume that they are identical on the inside.


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. As with the Edimax BR6104KP, it may be possible to add the missing parts and achieve USB support. The ADM5120 implements USB version 1.1 only.


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 you 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 are 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 it the MX29LV320ABTC-90 flash memory chip can be seen. It is a bottom-boot 32 MBit device that is configurable as 2,097,152 x 16-bit words (4 MBytes). At the left are the two SDRAM chips. 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 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 (and ndiswrapper does not work on MIPS, since it just executes the Windows Intel code).

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

.../linux-2.4.18-adm/drivers/net/am5120sw/swdrv.c

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.

Sergio Aguayo's AMiLDA Linux distro also runs on the H2WR54G. Vladislav Moskovets' Midge distro runs on it as well.

ADM5120 Switch

The ADM5120_switch page describes a utility to configure the VLANs managed by the ADM5120 Switch. The utility does not work on the H2WR54G router, either with the stock firmware kernel or a custom 2.4.18 kernel built from the Edimax source. AMiLDA is based on the 2.4.32 Linux kernel and the admswconfig utility does work when running AMiLDA.

Experimenting

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.


EJTAG

Work is now underway to see if a bricked H2WR54G can be brought back to life through the use of the JTAG connector on the PCB. An update will be posted once testing is complete.