Recovering a bricked Beetel 220BX ADSL Router / Modem

Either the BSNL wiring to my house is faulty or I'm very [un]lucky, eitherway my BSNL modem / router gets fried every three months or so. Instead of buying a new device each time, I have turned to used devices which I can get for about Rs 100 shipped from eBay after coupons.

So I bought a used Beetel 220BX which arrived in a not-so bad physical condition, I kept it aside to be used when my current modem fails. It was only when I tried to configure it two months later that I realized the modem was faulty.

beetel-220bx

Initial observations

  • Powers on.
  • Power and Link LEDs are solid even without the DSL cable.
  • PC/USB LED glows when an ethernet cable is attached.
  • Does not respond to a DHCPDISCOVER, DHCP server doesn't appear to be running/enabled.
  • Assigned an IP address in the 192.168.1.0/24 subnet to a PC directly attached to the device, 192.168.1.1 does not respond to ping, web interface is not accessible. An nmap scan shows no active services listening on any port.
  • Tried pressing and holding the reset button for well over 2-3 min, but no difference.

So it became perfectly clear that the device is either severely bricked or simply dead. As I didn't want to just trash the device, I opened the device and was happy to see that there was an easily accessible serial port. Connected my serial adapter using the wire tester hooks and I was looking at the serial output in no time. The pins are GND-TX-RX-VCC from the bottom.

The serial output had lot of SQUASHFS errors and it looked like the filesystem got corrupt somehow. Full boot log here.

BusyBox v1.00 (2006.06.14-14:54+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands.

Loading drivers and kernel modules...

CodeReal: invalid data

SQUASHFS error: lzmafs error while decompressing! SQUASHFS error: Unable to read page, block 10a9c1, size 5379
CodeReal: invalid data
SQUASHFS error: lzma
fs error while decompressing!
SQUASHFS error: Unable to read page, block 10a9c1, size 5379

There is an option to interrupt the boot process which would drop you in a CFE shell. CFE acts like a boot loader and the limited shell gives you the option to flash a firmware from a TFTP server. Now all I had to do was to find the right firmware for my modem and flash away (or I thought). Luckily Shanker Balan had uploaded the firmware image for this modem on his site.

While researching more, I came across two excellent articles which proved to be invaluable in getting my modem fixed. Thank you mrmt32!

Only after reading those articles I realised that I cannot directly flash the image file as it contained three components ie CFE + Kernel + Filesystem and the CFE firmware flash tool was expecting an image file without the CFE component. I used mrmt32's tool to create an image in the right format for the Beetel 220BX. Here is the final image file, ready to flash.

Now, all you need to do is setup your TFTP server on a PC, assign the PC an IP address in the 192.168.1.0/24 subnet. From the CFE shell, run the flashimage command.

flashimage 192.168.1.100:bcm963xx_fs_kernel

Loading 192.168.1.2:bcm963xx_fs_kernel ... Finished loading 1817620 bytes
..........................

That's it, type reset and your modem should now boot cleanly. Here is a boot log after flashing the firmware.


comments powered by Disqus