1

I have a spare BT HomeHub 5a clone (actually a PlusNet Hub One router). I would like to install the OpenWRT firmware on it, in order to reliably use it as a wired wifi range extender without a DHCP server or ADSL connection.

How do I use a Raspberry Pi to connect to the serial connections on the HomeHub, and to perform the firmware upgrade over tftp, so I don't have to affect any other computers in my household?

I did this 6 months ago and it took me ages to collect together all the information I needed in order to use my Raspberry Pi to achieve this.

I needed to do this again and found I could not remember everything, so had to go through the process of finding it all out again.

I am therefore simultaneously asking and answering this question in order to put all the steps in one place for when I need to do this again, and in the hope it may be helpful for others.

1

Note I am deliberately answering my own question

There are lots of detailed guides out there; this is an overview of the key points particularly with respect to using a Raspberry Pi as the host.

  1. Take apart the case and solder wires to the TX, RX and boot_sel2 soldering pads, and make an earth connection somewhere.
  2. Ensure the Raspberry Pi is not trying to use the serial port as a console:
    • sudo raspi-config
    • Select Advanced and serial and turn off the option to use the serial port as a console
    • Reboot
  3. Install minicom for serial access
    • apt-get update
    • apt-get install minicom
  4. Test serial access from the Raspberry Pi:
    • Connect together the TX and RX pins on the GPIO
    • Connect minicom: sudo minicom -D /dev/ttyAMA0
    • Type some stuff; you should see the characters echoed back which shows you've got the right GPIO pins and turned off the serial console correctly. (I always forget the -D option to minicom)
  5. Set up a breadboard with some resistors (I used 2.2k red-red-red because they were to hand) between the Pi and the HomeHub TX and RX pins, and a common ground between the Pi and the HomeHub.
  6. Connect TX from the Homehub to RX on the Pi, and vice-versa
  7. Connect boot_sel2 to Ground
  8. Power on the Homehub. You should see:
ROM VER: 1.1.4
CFG 04
UART
  1. Disconnect boot_sel2 from Ground
  2. Format a convenient USB flash drive as Fat32 (I prefer Gparted; mtools and dosfstools need to be installed)
  3. Download the sysupgrade file as per this. (I use version 17 due to reported bugs with speed on later versions; I read that they may be fixed but version 17 works fine for me so if it ain't broke don't fix it) and put a copy on the USB drive.
  4. Eject the USB drive from the Pi and plug it into the HomeHub
  5. Download the u-boot image to the Pi
  6. Use cat to transfer the u-boot image to the HomeHub: cat lede0kabtiq-bthomehubv5a_ram-u-boot.asc > /dev/ttyAMA0 in a separate terminal, while minicom is still connected in the first. There should be a line of *** across the minicom screen while this takes place (takes a minute or two).
  7. When this is complete, the red LEDs on the Homehub should be lit, and BTHOMEHUB5A displayed in the minicom terminal.
  8. Install tftpd: sudo apt-get install atftpd
  9. Download the install image.
  10. Disconnect the Pi's ethernet cable from the other end, and connect Pi and Homehub together. (Use one of the yellow ports).
  11. Get tftp running (note on the Pi atftpd is auto-started from inetd, so no need for the manual start commands found in other guides):
sudo ifconfig eth0 192.168.1.2
sudo cp lede-lantiq-xrx200-BTHOMEHUB5A-installimage.bin /srv/tftp/lede.bin
  1. Pull the install image across. In the minicom terminal, type
tftpboot 0x81000000 lede.bin; bootm 0x81000000

(note the shortening of the filename in the previous step to help with typing). That's six zeroes at the end. If it works, you'll get lots of # characters zipping across the screen. If not, a slow march of T characters.

  1. Backup the original flash image: nanddump --file /tmp/mounts/USB-A1/hh5a.nanddump /dev/mtd4 -- note this path can be filled in using tab-completion, but then take care not to overwrite the lede image.
  2. Install the new image: prepare and then sysupgrade /tmp/mounts/USB-A1/lided-17.01.4-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin
  3. The installation will reboot but in my experience this always goes to the CFG 04 UART prompt. In this case, power-cycle the Homehub.
  4. At this stage, the Homehub will start up as a DHCP server and the Pi will get a new address. The Homehub Luci interface will be available on http://192.168.1.1. At this point, all configuration can be done to get the router ready for connection to the main network.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.