4

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 Answer 1

5

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 (depending on your version of raspi-config, this option may be in the devices or interfaces submenu).
  • Reboot
  1. Install minicom for serial access
  • apt-get update
  • apt-get install minicom
  1. Test serial access from the Raspberry Pi:
  • Connect together the TX and RX pins on the GPIO
  • Connect minicom: sudo minicom -D /dev/serial0 (ttyAMA0 on older versions)
  • 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). (@Pa_ reports that minicom needs -osD and disabling both HW and SW flow control in order for step 14 to work.)
  1. 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. (@Pa_ reports that the resistors aren't necessarily required but they are definitely recommended to protect both the hub and the Pi.)
  2. Connect TX from the Homehub to RX on the Pi, and vice-versa
  3. Connect boot_sel2 to Ground
  4. 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. (@Pa_ notes that this takes a while and initially nothing appears to happen).
  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.
3
  • 1
    Thank you very much for this extremely useful stepbystep sum up. I would also like to add some notes from my experience 1. i used a RPi1b first gen, in my case i didnt have a resistor so i tried without, and it worked out 2. In my case the menu to disable console on serial was on a different submenu (devices) 3. minicom needed -osD and then disabling both HW and SW flow control. Otherwise cat'ing the bootloader over the serial failed every time 4. nanddump takes a while and in the beginning the stick remains silent. Just wait. 5. i used the Pi over ssh and a second eth for the HH5
    – Pa_
    Commented Jan 27, 2021 at 12:58
  • 1
    Answer duly updated. Commented Jan 29, 2021 at 13:26
  • 1
    I'd like to add that if you have a Raspberry Pi 3, the serial inteface is /dev/ttyS0 (alias /dev/serial0) rather than /dev/ttyAMA0 which I found mentioned here after struggling to make a TTY connection.
    – james246
    Commented Apr 26, 2021 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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