Download as pdf or txt
Download as pdf or txt
You are on page 1of 185

OpenWrt/LEDE Installation Guide

for
BT Home Hub 5A

See section 7.5 for connecting to popular UK ISPs


See section 9 for popular OpenWrt configurations

Document revision history:

v1.80 (5 Oct 2020) - 19.07 DSL Reconnection bug (see 7.36)


v1.79 (12 Jun 2020) - LuCI not updated after installing a package (see 7.35)
v1.77 (31 Dec 2019) - OpenWrt Performance on HH5A - updated (see 7.12)
v1.76 (8 Nov 2019) - OpenWrt 19.07.0 stable information (see 7.33)
v1.74 (9 Oct 2018) - Fix for slow 18.06 WAN to LAN throughput (see 7.29)
v1.7 (23 June 2018) - Refreshed for OpenWrt 18.06.x/LEDE 17.01.x (see 7.22)
v1.6 (2 Nov 2017) - Refreshed for LEDE Install Image v1.0 (see also 7.11)
v1.5 (18 Oct 2017) - 17.01.4 KRACK wifi vulnerability patch. (see 7.16)
v1.4 (14 Mar 2017) - Random Ethernet WAN MAC address fix. (see 7.9)
v1.3 (5 Mar 2017) - ‘Random reboot’ bug fix. (see 7.13)
v1.2 (22 Feb 2017) - Updated for LEDE 17.01.x stable.
v1.0 (30 Nov 2016) - Guide published, for LEDE r2363+, New partition layout.
v0.1 (19 Jun 2016) - Unreleased draft, by ‘bill’. Proof read by ‘mkresin’.
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Contents
1. Introduction ................................................................................................................................................. 5
1.1 Hardware History ................................................................................................................................... 5
1.2 OpenWrt for HH5A and known issues ................................................................................................... 6
1.3 Purpose of this Guide ............................................................................................................................ 7
1.4 OpenWrt and LEDE stable release history............................................................................................. 7
1.5 USB Flash drive requirements ............................................................................................................... 8
1.6 How reliable is LEDE/OpenWrt ? ........................................................................................................... 8
2. How to boot the LEDE install image .......................................................................................................... 10
2.1 Overview ............................................................................................................................................. 10
2.2 Serial connection for Linux and MS Windows ...................................................................................... 10
2.3 Required files ...................................................................................................................................... 11
2.4 Ubuntu and Linux Mint ......................................................................................................................... 11
2.5 When to use custom U-boot ................................................................................................................ 12
2.6 When to use internal VR-9 u-boot (Unlocked BT bootloader)?............................................................. 12
3. How to back up BT firmware ..................................................................................................................... 14
3.1 How to mount the USB flash drive ....................................................................................................... 14
3.2 How to unmount the USB flash drive ................................................................................................... 15
3.3 How to back up the stock BT firmware ................................................................................................. 16
4. How to install OpenWrt/LEDE for the first time .......................................................................................... 18
4.1 Keep the nanddump backup file in a safe place ................................................................................... 18
4.2 How to replace stock BT firmware with OpenWrt/LEDE ....................................................................... 18
4.3 How to upgrade to newer OpenWrt/LEDE ........................................................................................... 24
4.4 How to downgrade from OpenWrt 18.x to LEDE 17.01 ........................................................................ 28
5. How to restore BT firmware ....................................................................................................................... 30
5.1 Requirements ...................................................................................................................................... 30
5.2 How to restore ..................................................................................................................................... 30
6. How to upgrade from an earlier version of OpenWrt or LEDE prior to r2363+ ........................................... 34
6.1 Advice ................................................................................................................................................. 34
6.2 How to back up OpenWrt/LEDE firmware and 'caldata' ....................................................................... 34
6.3 How to use ‘migrate’ command............................................................................................................ 35
7. Installation Troubleshooting ...................................................................................................................... 37
7.1 TFTPbooting LEDE install image causes Kernel Panic ........................................................................ 37
7.2 OpenWrt/LEDE fails to start and halts at VR9 prompt .......................................................................... 37
7.3 Hub won’t boot - Stuck at CFG 04 UART prompt ................................................................................. 39

2
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.4 Where are the installation scripts? ....................................................................................................... 39


7.5 How do I connect the HH5A to my UK ISP ? ....................................................................................... 40
7.6 Problem using lede-lantiq-bthomehubv5a_ram-u-boot.asc when LEDE is already installed................. 46
7.7 What is the difference between ubifs-sysupgrade.bin and squashfs-sysupgrade.bin files? .................. 47
7.8 'No response to 5 echo-requests' and recurring disconnections .......................................................... 47
7.9 Random WAN port MAC address fix.................................................................................................... 48
7.10 Updating OpenWrt/LEDE has bricked the hub ................................................................................... 50
7.11 USB instability causes hub to reboot ................................................................................................. 50
7.12 OpenWrt Performance (updated Dec’19) ........................................................................................... 51
7.13 Hub suffers from random reboots ...................................................................................................... 54
7.14 MTU setting ....................................................................................................................................... 54
7.15 I can’t log into HH5A after restoring BT firmware ............................................................................... 55
7.16 KRACK wifi vulnerability patch ........................................................................................................... 55
7.17 ‘ptm0/nas0’ ifname renamed to ‘dsl0’ ................................................................................................. 57
7.18 How to perform a factory reset ........................................................................................................... 58
7.19 Wi-fi radio refuses to start up after saving new settings ..................................................................... 59
7.20 Cannot connect with ADSL using PPPoA .......................................................................................... 59
7.21 IPv6 ppp login fails and does not fall back to IPv4 login ..................................................................... 60
7.22 OpenWrt 18.06 and LEDE 17.01.5/6 release ..................................................................................... 61
7.23 Intel Centrino wifi & 2.4 GHz wifi disconnections ............................................................................... 62
7.24 System Log spammed by odhcp messages ....................................................................................... 63
7.25 Software Flow Offloading ................................................................................................................... 64
7.26 Downstream SNR margin offset adjustment ...................................................................................... 65
7.27 Lantiq firmware files ........................................................................................................................... 67
7.28 Problem with ‘Save & Apply’ when using LuCI ................................................................................... 68
7.29 OpenWrt Slow WAN to LAN performance bug ................................................................................... 69
7.30 u-boot.asc doesn’t seem to work properly.......................................................................................... 72
7.31 Wi-fi speed is only 6 Mbit/s ................................................................................................................ 72
7.32 ‘Network device is not present’ .......................................................................................................... 73
7.33 OpenWrt 19.07 stable information ..................................................................................................... 73
7.34 FTP server issues with OpenWrt 18 .................................................................................................. 74
7.35 LuCI not updated after installing new package................................................................................... 74
7.36 DSL Reconnection bug ...................................................................................................................... 75
8. Buttons...................................................................................................................................................... 76
8.1 Reset button ........................................................................................................................................ 76
8.2 Restart button ...................................................................................................................................... 77

3
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

8.3 WPS button ......................................................................................................................................... 78


9. Popular Hub configurations ....................................................................................................................... 80
9.0 How to log into hub .............................................................................................................................. 80
9.1 Quick PPPoE setup using DSL port for VDSL Connection ................................................................... 81
9.2 Quick PPPoE setup for WAN port ........................................................................................................ 89
9.3 Quick DHCP client setup for WAN port ................................................................................................ 95
9.4 Quick PPPoA setup using DSL port for ADSL Connection ................................................................... 97
9.5 Quick PPPoE setup using DSL port for ADSL Connection ................................................................. 101
9.6 Wireless Access Point ....................................................................................................................... 107
9.7 Convert unused WAN port into 5th LAN port ..................................................................................... 111
9.8 VDSL/ADSL Bridge modem ............................................................................................................... 112
9.9 How to disable ‘dsl_control’ (DSL port) .............................................................................................. 127
9.10 Pseudo Bridge (Relayd wireless bridge) .......................................................................................... 129
9.11 Basic Wireless Settings ................................................................................................................... 141
9.12 Wireless client - How to share a wifi hotspot .................................................................................... 146
9.13 Smart Queue Management (QoS) ................................................................................................... 153
9.14 Wireless Repeater/Extender information.......................................................................................... 157
9.15 UPnP ............................................................................................................................................... 158
9.16 DDNS and ICMP ping ...................................................................................................................... 159
9.17 BT YouView..................................................................................................................................... 162
9.18 VPN ................................................................................................................................................. 162
9.19 LED Configuration ........................................................................................................................... 164
10. Other useful utilities............................................................................................................................... 166
10.1 SSH, PuTTY , and VI editor ............................................................................................................. 166
10.2 WinSCP ........................................................................................................................................... 170
10.3 Notepad++ Text Editor..................................................................................................................... 172
10.4 Remote Management using Windows ............................................................................................. 173
10.4.1 Less secure SSH and LuCI access using root password ........................................................... 173
10.4.2 Secure SSH and LuCI access using public key authentication .................................................. 178
10.4.3 Very insecure LuCI access using root password ....................................................................... 183

4
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

1. Introduction

1.1 Hardware History


British Telecom (BT) in the UK introduced the Home Hub 5 to their fibre broadband customers from
2013. This is an AC1200 wireless router with built-in modem for ADSL (annex A) and VDSL use, 4x gigabit
LAN ports, a WAN port, and one USB2 socket. The stock firmware is locked to BT broadband but will also
work on Plusnet.

The wireless supports up to 300mbps (2x2 streams) on 2.4 GHz band, and either upto 450mbps (3x3
streams) wireless N mode, and/or upto 866mbps (2x2 streams) wireless AC on 5 GHz band. (300mbps +
866mbps = 1166mbps -> AC1200 spec)

The 'Type A' model, will be referred to as HH5A in this guide, is manufactured by Sagemcom and uses a
Lantiq processor with Atheros wireless chipset. There is also a 'Type B' model, manufactured by Huawei,
and is based on a Broadcom chipset.

There are two other variants of the HH5A supplied by BT subsidiaries. These are the 'BT Business Hub 5'
and 'Plusnet Hub One'. The only difference between all three variants lie with the factory installed stock
firmware where there are subtle differences in their feature set – eg. the Business Hub 5 offers custom DNS
server settings and ‘bridge mode’ not found on the other variants. The internal hardware is the same for all
three variants.

BT stopped supplying the Home Hub 5 in late 2016, and the Business Hub 5 by mid 2017. The Plusnet Hub
One continues to be supplied to fibre broadband customers as of July 2020, with no plans by Plusnet to offer
the 2016 Smart Hub model.

Please note unless you have purchased a brand new sealed BT Home Hub or Business hub, many of the
units offered for sale are likely to start coming to the end of their operational life. eg. the power adapters may
start failing after 5+ years continuous use. The soldering on circuit boards within the oldest HH5a may start
degrading/weaken. If you specifically require a black/silver cased HH5a, you can always take the circuit
board from a later Plusnet Hub One and install it into a black/silver HH5a.

5
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

1.2 OpenWrt for HH5A and known issues


Development work to put OpenWrt onto HH5A started in 2015. A group of developers split away from
OpenWrt in May 2016 to create the new LEDE Project. The first ‘stable’ build of LEDE 17.01 appeared in
February 2017. It was announced in January 2018 that LEDE had remerged with OpenWrt. OpenWrt 18.06
appeared June 2018.

Development builds of OpenWrt, known as ‘snapshots’, are compiled by build bots and are released once a
day. These contain the very latest commits (patches) and are offered for testing. They may contain bugs,
may not function correctly, or could even brick the device.

The current installation procedure by mkresin supports the BT Home Hub 5 Type ‘A’, BT Business Hub 5
Type ‘A’, and Plusnet Hub One models

SMP first appeared in LEDE snapshots from February 2017, but was not sufficiently stable to make it into
LEDE 17.01 stable. SMP is enabled in OpenWrt 18/19 stable but the maximum routed performance (internet
to Gigabit LAN) is degraded due to a bug when compared to 17.01 – OpenWrt 19 maxes out at 72 Mbps out
of the box but there are some fixes are available.

There is no support for the hardware acceleration features provided by the Lantiq and Atheros chipsets.
Everything is done in software which contributes to the poor performance. Consequently, the maximum
performance (throughput) when using LEDE/OpenWrt is significantly inferior to stock BT firmware. Gigabit
LAN interface to Wireless throughput maxes out around 170 Mbps – far short of theoretical 433+ Mbps with
2x2 802.11ac radio.

Notebooks fitted with certain Intel dual band wifi cards may also experience loss of connection when the 2.4
GHz wireless card is stressed. It appears to be a compatibility issue between the Intel wireless card drivers
and the open source wireless driver used in OpenWrt for the HH5A – it is unlikely Intel will fix their wifi driver
as the issue does not appear with stock BT firmware.

LuCI is the web based user interface for configuring OpenWrt/LEDE. It is included in OpenWrt/LEDE stable
releases such as 18.06 and 17.01. To use LuCI with the very latest OpenWrt development ‘snapshots’, it
must be downloaded and installed via a working internet connection. ‘Snapshots’ for 17.01, 18.06 and 19.07
also exist, and these include LuCI.

6
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

1.3 Purpose of this Guide


This guide describes the various scripts included in the LEDE installation image file, which are used to help
install OpenWrt/LEDE onto a HH5A for the very first time. Snippets of useful information have been gathered
from direct experience and from a number of sources which may also help novices to OpenWrt/LEDE/Linux.

Starting with LEDE r2363 (30 Nov 2016), the original BT bootloader and OEM partition layout are both
retained. It also includes important patches to support the Bad Block Table (BBT) stored in the 128MB Nand
flash chip found in the HH5A. Earlier versions of OpenWrt (before Jan 2018) and LEDE (before Dec 2016)
for the HH5A used a custom u-boot loader and partition layout. Instructions to upgrade these early
installations are provided.

Section 9 of this document entitled ‘Popular Hub Configurations’ will be particularly useful to novices once
Open/WRTLEDE has been successfully installed. Where possible, instructions for using LuCI web UI to
configure the hub are provided. Many of the screen capture images are from LEDE 17. Section 7.5 contains
information specific to the major UK ISPs.

1.4 OpenWrt and LEDE stable release history


Version: Date released: Comments on new features:

17.01.0 21 Feb 2017 First LEDE 17 stable with support for HH5A, using kernel 4.4.
17.01.1 18 Apr 2017
17.01.2 17 Jun 2017 Red WAN port patch for HH5A.
17.01.3 4 Oct 2017 Partial fix for random reboot bug (see 7.13)
17.01.4 18 Oct 2017 KRACK wifi vulnerability patch (see 7.16)
17.01.5 16 Jul 2018 Downstream SNR margin offset introduced (see 7.26)
17.01.6 4 Sep 2018 Final official release.
17.01.7 23 June 2019 SACK Panic vulnerability patches. No official announcement.

18.06.0 31 Jul 2018 SMP enabled in HH5a (see 7.22), using kernel 4.9.
18.06.1 17 Aug 2018
18.06.2 1 Feb 2019
18.06.3 29 June 2019 1st iteration of SACK Panic vulnerability patches.
18.06.4 1 July 2019 Fix TCP problems resulting from SACK patches.
18.06.5 11 Nov 2019
18.06.6 9 Jan 2020
18.06.7 31 Jan 2020
18.06.8 2 Mar 2020

19.07.0 6 Jan 2020 Offers software flow offloading. (see 7.33)


19.07.1 30 Jan 2020 Fix for hostapd 2.9 wifi regulatory domain issues.
19.07.2 29 Feb 2020
19.07.3 20 May 2020
19.07.4 8 Sep 2020 Fix LuCI menu rendering bug.

Snapshots daily Packet Steering bug fixed.

7
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Refer to section 4.3 for general advice for upgrading from LEDE 17.01.2 to a newer stable or snapshot
release.

1.5 USB Flash drive requirements


Use a USB2 flash drive with at least 512 MB free space. It must be newly formatted to either FAT32 or
exFAT. No other format is supported.

During testing, it was observed one particular flash drive, Integral 8GB 'Splash' USB2 flash drive, could not
be mounted on the HH5A, even though it worked perfectly fine in Windows and Linux. Using a different flash
drive resolved the issue.

1.6 How reliable is LEDE/OpenWrt ?

My former Plusnet Hub One is running LEDE 17.01.6 and used as a modem-router only. Wireless is
disabled. Wifi used to be served by a second HH5a with LEDE configured as a wireless access point and
located in another room. The Access Point served the entire property for 3.5 years until beginning of 2020
when it was replaced by a Linksys AC1200 router running stock firmware and configured as an Access Point.
The Linksys offers better wifi speeds (Measured 420 mbps throughput on 5 GHz) and device compatibility
(Some Intel wifi cards have issues with HH5A’s 2.4 GHz wifi).

I do not use the DNS server with LEDE. I use DHCP option 6, to set the preferred external DNS servers on
client devices.

The only additional packages installed include: SQM, uPnP, DDNS.

The modem-router has been ‘up’ for 700 days as of November 2020.

8
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

My ISP provides a fixed 55/10 mbps VDSL2 service. In 2019, the line managed to maintain ‘Line Uptime’
with the FTTC cabinet for 280 days before Openreach chose to carry out overnight maintenance.

The PPPoE connection to my ISP can usually be maintained up to 60 days before ISP or Openreach choose
to perform maintenance – this does not interrupt the line sync to the FTTC cabinet.

I haven’t upgraded may main router to OpenWrt 18 or 19.

At another location, a HH5a with OpenWrt 18.06.4 was deployed in July 2020, replacing an ageing BT
2700HGV modem (ADSL2+ bridge modem) and DDwrt router I had previously installed in 2014. The DDwrt
router was reliable despite the ageing firmware version. We’re hoping the Data Rate will increase after fixing
a recent voice line fault caused by a faulty micro-filter.

9
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

2. How to boot the LEDE install image

2.1 Overview
Serial terminal console access to the HH5A requires hard wiring a computer to the HH5A’s circuit board.

From the terminal session, commands can be issued. Specifically, to load an ‘install image’ into the HH5A.
This is a minimal version of LEDE which contains scripts and utilities to help perform a number of tasks.
They include backing up the original stock BT firmware, installing full version of OpenWrt or LEDE to the
HH5A, and restoring stock BT firmware to the HH5A.

2.2 Serial connection for Linux and MS Windows


Use the information found in the OpenWrt wiki and ebilan forum on how to install a serial cable connection to
the HH5A.

https://OpenWrt.org/toh/bt/homehub_v5a

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=14&t=39

A youtube video describing how to open a HH5a can be viewed here:

https://www.youtube.com/watch?v=XhE_QpLFvpM

The OpenWrt wiki describes instructions for linux users and includes instructions for using the picocom
command.

https://OpenWrt.org/toh/bt/homehub_v5a

An alternative PDF document called ‘2-BT HH5A openwrt/LEDE Windows Instructions v3.xx’ is available
for Microsoft Windows users. This document includes useful screen capture images.

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=138

If you choose to use a ‘serial-TTL’-to-USB adapter, there are plenty of inexpensive adapters on the market.
Do NOT use a serial-RS232 adapter – it is incompatible and is very likely to damage your HH5A.

Many of the USB adapters use PL2303 chip. If you wish to use the adapter with Microsoft Windows, beware
that the Microsoft Windows/Prolific driver for PL2303 will not work with many Chinese counterfeit copies of
the PL2303HX USB adapters for Windows 7 and later. This can be overcome by installing an earlier Vista
driver. Alternatively, seek out adapters using the newer Prolific PL2303TA chip which is supported by
Microsoft Windows 10.

Linux should work fine with all PL2303HX and PL2303TA adapters.

10
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

2.3 Required files


The following files are required for installing LEDE 17.01.x and OpenWrt 18.06.x

OpenWrt custom-uboot:
OpenWrt-lantiq-bthomehubv5a_ram-u-boot.asc or

LEDE custom-uboot:
lede-lantiq-bthomehubv5a_ram-u-boot.asc

LEDE install image:


lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin

LEDE 17.01.x stable sysupgrade file:


lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin
lede-lantiq-xrx200-BTHOMEHUBV5A-ubifs-sysupgrade.bin (not recommended)

OpenWrt 18.06.x stable sysupgrade file:


OpenWrt-18.06.XXX-lantiq-xrx200-bt_homehub-v5a-squashfs-sysupgrade.bin (recommended)

Download links:

LEDE install image by mkresin:


https://github.com/mkresin/BTHH5a-installimage/releases

OpenWrt/LEDE stable sysupgrade file (includes LuCI – highly recommended):


https://downloads.OpenWrt.org/releases/

OpenWrt snapshot sysupgrade file (excludes LUCI):


https://downloads.OpenWrt.org/snapshots/targets/lantiq/xrx200/

2.4 Ubuntu and Linux Mint


If you decide to use Ubuntu or Linux Mint, ensure that picocom is installed and working. If you are using a
USB-to-TTL serial adapter cable, the picocom command line you are likely to use is:

picocom -b 115200 /dev/ttyUSB0

Tip: If you encounter error messages, make sure that your linux user name has been added to the ‘dialout’
group within the file /etc/group. (Remember to log out and log in again for any changes to the file to take
effect)

11
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

2.5 When to use custom U-boot


If you are installing LEDE or OpenWrt for the very first time on a HH5A with stock BT firmware, you will need
to use the ‘OpenWrt-lantiq-bthomehubv5a_ram-u-boot.asc’ or ‘lede-lantiq-
bthomehubv5a_ram-u-boot.asc’ custom U-boot loader.

nb. Do NOT use the u-boot.asc hosted on the OpenWrt.org downloads page – TFTP does NOT work.

Once successfully loaded, the BTHOMEHUBV5A custom u-boot prompt should appear as shown below.
You can now TFTP the LEDE install image file from your TFTP server.

BTHOMEHUBV5A #
BTHOMEHUBV5A #
BTHOMEHUBV5A #
BTHOMEHUBV5A # tftpboot 0x81000000 lede-lantiq-xrx200-BTHOMEHUBV5A-
installimage.bin; bootm 0x81000000

Note: the custom U-boot assumes the TFTP transfer will be from a computer with IP address 192.168.1.2.

Using TFTP to transfer and start the ‘lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin’


LEDE install image takes up to 5 minutes to complete.

2.6 When to use internal VR-9 u-boot (Unlocked BT bootloader)?

It is worth mentioning that once you have completed all the later instructions to successfully install LEDE (ie.
Execute the ‘prepare’ script described in section 4 to unlock the BT bootloader), you no longer have to use
the ‘OpenWrt-lantiq-bthomehubv5a_ram-u-boot.asc’ or lede-lantiq-bthomehubv5a_ram-u-
boot.asc custom u-boot files which requires momentarily shorting boot_sel2 pin to Ground.

You can simply interrupt the BT bootloader process as soon as you switch on the HH5A by pressing any key
on the serial console. You will then be presented with the following VR9 u-boot prompt instead of
BTHOMEHUBV5A prompt as shown below:

12
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

At the VR9 prompt, enter the following command to TFTP the LEDE install image file from your TFTP server.

tftpboot 0x81000000 lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin; bootm 0x81000000

Note: One important difference is the BT bootloader assumes the TFTP transfer will be from a computer
using IP address 192.168.1.10. (ie. Not from 192. 168.1.2 as used by OpenWrt/LEDE custom U-boot
ASCII file.)

The original OpenWrt wiki states the CPU only runs at 125MHz in UART mode – it is annoyingly slow!. The
biggest advantage of using the internal bootloader, is the improvement in performance.

eg. TFTP and uncompressing the ‘lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin’ LEDE


install image takes about 30 seconds compared to 5+ minutes to complete.

eg. Running sysupgrade to install LEDE is completed in 15 seconds instead of a few minutes.

eg. Restoring stock BT firmware is completed in 3 minutes instead of 1+ hour !

13
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

3. How to back up BT firmware

3.1 How to mount the USB flash drive


Open a terminal session using a serial connection to the HH5A, and bring up the U-boot prompt (See earlier
for instructions).

TFTP the LEDE install image file:

lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin

Once the LEDE install image has booted up, you will find a summary of the instructions in the LEDE welcome
message.

Simply insert the flash drive into the USB socket on the rear of the HH5A. Check no errors appear on the
serial console.

14
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The contents of the flash drive will appear under a sub-directory in '/tmp/mounts'

ie. /tmp/mounts/<directory>

Substitute <directory> with the name of the folder assigned to the USB flash drive. Often it will be called
‘USB-A1’.

eg. /tmp/mounts/USB-A1

Use the ‘ls’ command to identify the name of the USB drive.

eg. ls /tmp/mounts

To list the contents of the USB drive:

eg. ls /tmp/mounts/USB-A1

IMPORTANT: If no file or directory is found, do not unplug and re-insert the flash drive. Repeat the
command after one or two minutes. (See section 7.11)

3.2 How to unmount the USB flash drive


If you wish to remove the USB flash drive, please remember to unmount it before unplugging it from the
HH5A.

To unmount the USB drive, enter this command:

ie. umount /tmp/mounts/<directory>

eg. umount /tmp/mounts/USB-A1

Then wait a few seconds before removing the USB drive from the HH5A.

15
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Otherwise, if you fail to unmount the drive and subsequently reinsert it into the HH5A, you may see this
message:

Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

This is not an error, it is a warning.

If you are a Windows user, you can resolve the problem by using Windows File Explorer to fix the problem.

ie. Right click on the USB drive -> Properties -> Tools -> Error Checking.

Note, when you use ‘sysupgrade’ to install LEDE, or use the ‘restore’ script to restore stock BT firmware, the
utility will automatically unmount the USB drive at the end of the procedure for you.

3.3 How to back up the stock BT firmware


After loading the LEDE install image, insert a USB flash drive into the HH5a and wait for it to mount as
described earlier. Check you can view the contents of the flash drive by entering this command of the
format:

ls /tmp/mounts/<directory>

eg. ls /tmp/mounts/USB-A1

Enter this command to create a nanddump backup file called 'hh5a.nanddump' saved to the USB flash
drive.

nanddump -f /tmp/mounts/<directory>/hh5a.nanddump /dev/mtd4

eg. nanddump -f /tmp/mounts/USB-A1/hh5a.nanddump /dev/mtd4

It can take up to 30 minutes to save the nanddump file. On completion, the ‘root@lede:’ prompt will
appear as shown in the two images below. The second image is from a second HH5a which has a bad
block.

16
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The resulting created file can vary from one hub to another. A hub with no bad blocks is typically either
133,562,368 or 133,693,440 bytes (127MB) in size. Each bad block reduces the size by 131,072 bytes
(128kB). If the file is significantly less than 133,000,000 bytes, it is likely to be incomplete. (eg. USB flash
drive may have run out of space when trying to save the file)

IMPORTANT: Check the file size and then copy these files to another storage device and keep in a safe
place. It is astonishing how many readers fail to do this simple task, only to realise the nanddump file they
created was too small (ie. incomplete), or the USB flash drive was faulty and the nanddump file could not be
recovered.

The nanddump file contains calibration data unique to each HH5A. Do not try to restore these files to a
different HH5A, because you will encounter issues such incorrect default passwords and duplicated MAC
addresses. There may also be subtle differences in wireless performance.

17
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

4. How to install OpenWrt/LEDE for the first time

4.1 Keep the nanddump backup file in a safe place

This is a reminder to check the size of the created ‘nanddump’ and to copy/move it to another location such
as the hard drive of your computer. A hub with no bad blocks should be 127MB in size. Keep the 'nanddump'
backup file in a safe location. The file contains caldata partition which is unique to each HH5A. You may
require this file in future.

The 'hh5a-nanddump' file is required to restore the HH5A to original stock firmware. The procedure is
described later in this document.

4.2 How to replace stock BT firmware with OpenWrt/LEDE


Minor updates (Dec 2019)

Copy the OpenWrt or LEDE sysupgrade file to the root of the USB flash drive. (The LEDE sysupgrade
filename beginning lede-lantiq will be used throughout these instructions)

lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin

Open a terminal session using a serial connection to the HH5A, and bring up the U-boot prompt as described
in the OpenWrt wiki or in the alternative Windows guide.

TFTP mrkesin’s LEDE install image file to the HH5A.

lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin

Once the LEDE install image has booted up.

Insert the USB flash drive into the HH5A and check that it mounts without errors as described earlier in
section 3.

Reminder: Did you check the size of the nanddump file and copy it to
another drive for safe keeping? All too often, I read posts where the file
was corrupt or was accidentally deleted. As a consequence, they can’t
install LEDE/OpenWrt when the hub is ‘bricked’.

18
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Enter this command and follow the instructions:

prepare

Please note the ‘prepare’ script should only be run ONCE to prepare the partitions. Do not attempt to run it
again unless you have previously restored stock BT firmware.

The script will prompt you to enter 'YESIHAVEABACKUP'.

continued on next page….

19
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

For LEDE Install Image v1.0 (2 Nov 2017):

The script will attempt to decrypt the u-boot environment using all known key, to automatically identify the
ISP model of the HH5A.

If it fails, you will see this warning message:

Simply press any key to continue as instructed above.

For LEDE Install Image v0.1 (30 Nov 2016):

You will be asked whether to install for a ‘BT Home Hub 5 Type A’ or ‘PlusNet Hub One’. Enter the letter
‘a’ or ‘b’ and press the Return key to continue. If you enter anything else, the script will abort – just rerun
the ‘prepare’ command again.

If you have a ‘BT Business Hub 5’, choose either ‘a’ or ‘b’ option, and apply the ‘bootcmd’ fix described in
section 7.2 after installing LEDE and restarting the hub.

20
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

After the 'prepare' script has finished, the next step is to actually install the LEDE/OpenWrt sysupgrade.bin
file. The original method ‘1’ calls for installing the sysupgrade.bin file direct from USB flash drive as
described in the next paragraph. In practise, this some times may fail due to compatibility issues with the
flash drive. The preferred method ‘2’ to copy the sysupgrade.bin file to the /tmp folder has been observed to
be more reliable. Both methods are described below.

Method 1: Installing sysupgrade.bin from USB flash drive

Enter the following command to install LEDE from the USB flash drive. (Substitute <directory> with the
name of the folder representing the USB flash drive)

sysupgrade /tmp/mounts/<directory>/lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin

eg. sysupgrade /tmp/mounts/USB-A1/lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin

Method 2: Install sysupgrade.bin from /tmp folder

Copy the sysupgrade.bin file from the USB drive to the /tmp folder using this command:

cp /tmp/mounts/<directory>/lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin
/tmp

eg.
cp /tmp/mounts/USB-A1/lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin /tmp

Then run sysupgrade command:

sysupgrade /tmp/lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin

21
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Whichever method you choose to use, messages will start to appear on the console within a minute as the
sysupgrade installation progresses.

It may look similar to this output:


root@lede:/# sysupgrade /tmp/lede-17.01.4-r3560.bin
Cannot save config while running from ramdisk.
killall: watchdog: no process killed
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... ubusd logd netifd odhcpd mountd ntpd dnsmasq
Sending KILL to remaining processes ...
Volume ID 0, size 13 LEBs (1677312 bytes, 1.6 MiB), LEB size 129024 bytes (126.0 KiB),
dynamic, name "kernel", alignment 1
Volume ID 1, size 28 LEBs (3612672 bytes, 3.4 MiB), LEB size 129024 bytes (126.0 KiB),
dynamic, name "rootfs", alignment 1
Set volume size to 122056704
Volume ID 2, size 946 LEBs (122056704 bytes, 116.4 MiB), LEB size 129024 bytes (126.0 KiB),
dynamic, name "rootfs_data", alignment 1
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /

If you encounter ‘Command failed:…’ as shown in example below, there is a problem with the HH5A or with
the USB flash drive.
root@lede:/# sysupgrade /tmp/lede-17.01.4-r3560.bin
Cannot save config while running from ramdisk.
killall: watchdog: no process killed
Watchdog handover: fd=3
- watchdog -
Nand upgrade failed
Command failed: Request timed out

If there is no message activity after executing the sysupgrade command for more than 3 minutes, it may
indicate there is a problem reading from the USB flash drive. Press <CTRL-C> to terminate the
command. Try method ‘2’.

If prepare script completed successfully but sysupgrade repeatedly fails. Reboot the HH5A. Perhaps
consider booting from BT bootloader (see section 2.6) and after loading the LEDE installation image using
TFTP, try running sysupgrade process again as described above. There is no need to run the prepare
script.

22
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
If problems persist, you may have to consider restoring BT stock firmware from the previously created
nanddump file, and try again to install OpenWrt/LEDE as a last resort. See section 5 for restore
instructions.

When sysupgrade process has finished, it will automatically issue a reboot command to restart the HH5A. If
you see the UART prompt on the serial console:

ROM VER: 1.1.4


CFG 04
UART

Power cycle the HH5A and LEDE should now boot up.

If LEDE fails to start and the boot process halts at a VR9# prompt:

Verifying image(s):
No active image found!!!
Wrong Image Format for bootm command
ERROR: can't get kernel image!
VR9 #

Go to section 7.2 for solution.

LEDE typically takes just over 30 seconds to boot up. Wait for the last few lines of messages which contain
‘br-lan’ to appear.

[ 24.343461] br-lan: port 1(eth0.1) entered forwarding state


[ 24.347745] br-lan: port 1(eth0.1) entered forwarding state
[ 24.455980] IPv6: ADDRCONF(NETDEV_UP): ptm0: link is not ready
[ 26.348533] br-lan: port 1(eth0.1) entered forwarding state

Then press the Enter key and the LEDE welcome banner will appear.

23
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

4.3 How to upgrade to newer OpenWrt/LEDE

WARNING: Installing any firmware always carries a small risk that the HH5A may be bricked. Do so at your
own risk. If the HH5A is bricked and cannot be recovered using the RESET button on the rear of the HH5A,
the only other remaining option is to use a serial connection to the HH5A and use the LEDE Installation
image to reinstall OpenWrt/LEDE as described earlier in this document.

If you are upgrading from OpenWrt (before Jan 2018) or a version of LEDE prior to r2363 (before Dec 2016),
please go to section 6 !!!

Always backup your current LEDE configuration before making any significant changes. In LuCI, navigate to
the System -> Backup/Flash Firmware menu option. Choose the ‘Generate archive’ button.

Note that not all settings are saved, such as any previously downloaded packages.

24
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Navigate to System -> Software menu.

Scroll down to Status -> Installed packages. I suggest the low-tech method of simply copying and
pasting the names of all the installed packages into a text file. (Tip: paste into a spreadsheet such as Excel)
You may need to refer to this list later, if you have installed any extra packages such as for SQM or DDNS.

Alternatively, SSH into the HH5a, and issue this command to list installed packages:

opkg list-installed

To install/upgrade LEDE 17.01 or OpenWrt 18, there are a number of methods.

If LEDE is operating normally on the HH5a, you can use LUCI. Simply navigate to the System ->
Backup/Flash Firmware menu option and you will be able to flash the new sysupgrade.bin file.

Decide whether or not to untick the ‘Keep settings’ check box.

25
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
If you have a simple installation of LEDE 17.01.2 (or later) with very few additional packages installed, then
upgrading to LEDE 17.01.5, OpenWrt 18.06.x or to the latest OpenWrt snapshot, is likely to be successful in
most situations.

If upgrading from LEDE 17 to OpenWrt 18, the sysupgrade process will also automatically amend the WAN
section of the /etc/config/network if it discovers the presence of ifname containing ptm. ie. renaming
ptm0.101 to dsl0.101 for UK VDSL configurations (nb. ‘dsl’ is lower-case ‘DSL’). Otherwise, if the HH5a
fails to reconnect to the ISP using DSL connection, refer to section 7.17 to how to fix the connection problem.

Note you will also have to manually reinstall any additional packages after the new sysupgrade file has
been installed. The additional packages come with their own default configuration files, but these will not
overwrite any existing configuration files.

OpenWrt snapshots are built and released at least once a day. These contain the very latest commits
(patches) and are offered for testing. They may contain bugs, may not function correctly, or could even brick
the device. Therefore it is strongly recommended to always use LEDE or OpenWrt stable releases.

All LEDE and OpenWrt stable releases are located here:

https://downloads.OpenWrt.org/releases/

For example, LEDE 17.01.6 for HH5a:

https://downloads.OpenWrt.org/releases/17.01.6/targets/lantiq/xrx200/

It is recommended to use the ‘squashfs’ file because ‘factory reset’ and the Reset button do NOT work if
you use the ‘ubifs’ file.

When you use LuCI to load the new file, always compare the ‘sha256’ checksum displayed on screen
matches what is displayed on the LEDE download page. See the two images below for LEDE 17.01.6
squashfs file. (Tip: comparing the first and last four digits of the checksum is usually sufficient):

26
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

If the checksums do not match, do NOT proceed any further to flash the new firmware!

Alternatively, you could use WinSCP to copy the new OpenWrt sysupgrade.bin file to the /tmp folder of the
HH5a, and then use PuTTY to open a session via serial link or SSH to the HH5a, and execute the
sysupgrade command. Warning: No checksum verification is performed, therefore if the sysupgrade file
is corrupt, it is likely to completely brick the HH5a.

If you do not wish to keep old settings, then use the ‘-n’ switch, as shown in example below

sysupgrade –n /tmp/OpenWrt-lantiq-xrx200-bt-homehub-v5a-squashfs-sysupgrade.bin

A reminder that you will also have to reinstall any previously downloaded packages too.

You may be tempted after installing a ‘newer’ sysupgrade file, and then restore a previously saved archive.

If the archive was saved from a significantly earlier version of LEDE or OpenWrt, the old settings ‘may be’
incompatible.

eg. UK VDSL connections in LEDE 17.01 uses VLAN tag in the format ptm0.101. OpenWrt 18.06
expects the format to be dsl0.101 (nb. ‘dsl’ is lower-case ‘DSL’). This simply means after
restoring the old archive, the HH5A will not be able to connect to the ISP network until the VLAN tag
is edited.

27
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
WARNING: Please be aware there is always a small risk of possibly bricking any router when you upgrade
its firmware.

Unfortunately for the HH5A, if it is severely bricked by a failed update, and use of the Reset button cannot
recover the hub, then you will have to use a serial console connection, to TFTP boot the LEDE installation
image using the internal bootloader as described in section 2.6. Then simply execute the sysupgrade
command again as described above to install the new sysupgrade.bin image from USB flash drive.
Important: There is no need to run the ‘prepare’ script.

4.4 How to downgrade from OpenWrt 18.x to LEDE 17.01

WARNING: Installing any firmware always carries a small risk that the HH5A may be bricked. Do so at your
own risk. If the HH5A is bricked and cannot be recovered using the RESET button on the rear of the HH5A,
the only other remaining option is to use a serial connection to the HH5A and use the LEDE Installation
image to reinstall OpenWrt/LEDE as described earlier in this document.

If OpenWrt 18.06 or snapshot is currently installed, and you wish to revert to LEDE 17.01 stable, you may
discover LuCI blocks any attempt to install LEDE 17.01.

To downgrade to LEDE 17.01:

Copy the LEDE 17.01 sysupgrade bin file to the /tmp folder. (eg. use WinSCP, see section 10.2)

Then SSH into the hub (eg. use PuTTY) using ethernet connection, or by serial connection.

Then execute the sysupgrade command with the -n and -F flags as in example shown below:

28
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

sysupgrade –n –F /tmp/lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin

All previous settings will be deleted, and a Forced installation will be performed.

Warning: If you use the wrong sysupgrade file (intended for another device), you will brick the HH5A !

A PuTTY error message will pop up when the HH5A disconnects the SSH session.

Do NOT switch off the HH5A.

After about 2 minutes, the HH5A will boot up normally with LEDE 17.01.x.

Restore any previously saved archive of your HH5A’s settings based on LEDE 17.01. If you restore an
archive created by OpenWrt 18.06, some settings may be incompatible. eg. the VLAN tag naming
convention. ie. dsl0 vs ptm0. See section 7.17.

29
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

5. How to restore BT firmware

5.1 Requirements
IMPORTANT: You must use the hh5a.nanddump backup file which was previously created from the same
HH5A. The file is typically 127MB in size.

The nanddump file contains calibration data which is unique to each HH5A. It is not recommended to use a
nanddump file from a different HH5A, because you ‘may’ encounter issues such as bad wireless
performance, and duplicate MAC addresses, particularly if the nanddump is restored to more than one HH5A
with the intention of using the BT stock firmware! The default BT wifi SSID and admin password are also
stored in the nanddump and will not match the label attached to the HH5A.

In timed testing, the whole restoration procedure only takes about 3 minutes to complete if you loaded the
LEDE install image using TFTP from BT bootloader. Otherwise, it will take 1 hour if you use the
OpenWrt*.asc or LEDE custom U-boot file.

WARNING: Restoring the nanddump file is done at your own risk. If the original nanddump file is bad, it can
brick the HH5A. If you are intending to upgrade to LEDE r2363 or later, you may wish to consider making a
new nanddump of your existing OpenWrt/LEDE(pre-r2363) before proceeding any further – see section 6.2
How to back up OpenWrt/LEDE firmware and 'caldata'

5.2 How to restore


Copy the hh5a.nanddump file to the root of the USB flash drive. Check the file size. A hub with no bad
blocks should be 133,562,368 or 133,693,440 bytes (127MB) in size. Each bad block reduces the size by
131,072 bytes (16kB). Any size significantly less than 127MB would suggest the file may be corrupt.

Open a terminal session using a serial connection to the HH5A, and bring up the U-boot prompt accordingly.

Reminder: If you previously installed LEDE and/or unlocked the BT bootloader, just interrupt the boot
sequence to bring up the VR9 BT bootloader prompt. If you use the BT bootloader to TFTP the LEDE
install image, the actual time required to restore the stock BT firmware is about 3 minutes. Otherwise,
if you used the OpenWrt/LEDE custom u-boot file, allow an hour to complete the restoration.

30
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

TFTP the LEDE install image file:

lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin

by executing the following command at the VR9 prompt:

tftpboot 0x81000000 lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin; bootm 0x81000000

Note that the hub will try to retrieve the LEDE install image from TFTP server on LAN IP 192.168.1.10
(instead of 192.168.1.2) if you loaded the Installimage from the VR9 prompt.

Once the LEDE install image has booted up.

Insert the USB flash drive into the HH5A and check that it mounts without errors.

Enter this command and follow the instructions:

restore

The script will prompt you to enter the command again with the full path to the nanddump file:

restore /tmp/mounts/<directory>/hh5.nanddump

eg. restore /tmp/mounts/USB-A1/hh5.nanddump

31
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The script will prompt you to enter 'YESRESTORE' before it proceeds to erase the Nand flash memory, and
start restoring the contents of the nanddump file to the flash memory.

During the process, it will report it is writing data to blocks. The total number of blocks is typically 1011 or
1012.

You may observe these displayed messages too

Eventually, the following prompt will appear:

The stock BT firmware by default locks the u-boot. It is recommended you choose ‘y’ to unlock it.

When the restoration is complete, you will be offered two options.

32
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

You can choose to install a fresh copy of LEDE stable or snapsot r2363+ now. Simply refer to earlier
instructions within this document.

Or you can simply enter ‘reboot’ command as prompted. After a few seconds, the HH5A will
automatically restart.

If you see the UART prompt:

ROM VER: 1.1.4


CFG 04
UART

Power-cycle the HH5A, and the stock BT firmware will now start up.

Wait two or three minutes for the router to fully start up. When you see blinking red broadband light, point
your web browser to 192.168.1.254 to bring up the stock BT firmware’s management web page.

33
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

6. How to upgrade from an earlier version of OpenWrt or


LEDE prior to r2363+

6.1 Advice
If your HH5a has LEDE 17.01, or LEDE r2363 snapshot after Nov 2016, or
OpenWrt after Jan 2018, please go to section 4.3.
If your HH5a has OpenWrt before Jan 2018, or LEDE prior to r2363 (30 Nov 2016), please continue to read.

It is recommended that you restore the HH5A back to stock BT firmware and to perform a new installation of
LEDE stable or OpenWrt.

However, there may be a situation where you have no choice but to consider upgrading an older
OpenWrt/LEDE installation prior to versions r2363, and you do not possess the original nanddump backup
for the stock BT firmware created from the specific HH5A.

An experimental ‘migrate’ script was written for this purpose.

Some limited testing has been completed with the migrate script. It is offered with no guarantee of
success.

However, users posting on the ebilan forum report have reported considerable success when using the
‘migrate’ script, so you may wish to consider using the ‘migrate’ script as a first choice, before
resorting to restoring stock BT firmware as second choice. It is recommended to make a new nanddump of
the working OpenWrt/LEDE installation before proceeding any further, but please note there is currently no
properly documented procedure to restore the working OpenWrt.LEDE nanddump back to the HH5a.

6.2 How to back up OpenWrt/LEDE firmware and 'caldata'


If you have no original backup of the stock BT firmware for the HH5A, then consider making a backup of the
current OpenWrt/LEDE installation and keep the backup files in a safe place.

After loading the LEDE install image, you can enter this command to list the partitions:

cat /proc/mtd

The LEDE partition is usually ‘mtd4’. The ‘caldata’ partition may not may not exist depending on the installed
version of the OpenWrt/LEDE build.

34
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Enter this command to create a nanddump backup file called 'lede.nanddump' saved to the USB flash drive:

nanddump -f /tmp/mounts/<directory>/lede.nanddump /dev/mtd4

eg. nanddump -f /tmp/mounts/USB-A1/lede.nanddump /dev/mtd4

Enter this command to back up the 'caldata' to the USB flash drive if it exists on partition mtd2:

dd if=/dev/mtd2 of=/tmp/mounts/<directory>/lede.caldata.dd

eg. dd if=/dev/mtd2 of=/tmp/mounts/USB-A1/lede.caldata.dd

Check the size of the created lede.nanddump file. A hub with no bad blocks should be 133,562,368 or
133,693,440 bytes (127MB) in size. Each bad block reduces the size by 131,072 bytes (16kB).

At the time of writing, there are no instructions or testing, for restoring the lede.nanddump backup file to a
HH5A.

6.3 How to use ‘migrate’ command


Important: Please use mkresin’s LEDE install image v0.1 (Nov 2016 edition) for this procedure. The
‘migrate’ script found in the later v1.0 (Nov 2017) has NOT been tested.

After loading up the LEDE Install image as described starting from section 2 of this document, the LEDE
welcome page will display a number of available commands with brief instructions.

Ensure LEDE or OpenWrt sysupgrade file to be installed, is saved to the root of the USB flash drive.

eg. for LEDE 17.01:

35
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
lede-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin

Insert the USB flash drive into the HH5A and check that it mounts without errors.

Enter this command and follow the instructions:

migrate

No more information will be provided about this script, because we do not recommend this method of
upgrading OpenWrt/LEDE.

36
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7. Installation Troubleshooting

7.1 TFTPbooting LEDE install image causes Kernel Panic


When using LEDE Install Image v0.1 (Nov 2016) for BT Home Hub 5A, soon after TFTPbooting the ‘lede-
lantiq-xrx200-BTHOMEHUBV5A-installimage.bin’ LEDE install image, the HH5A experiences
Kernel Panic message, and then reboots.

This is known to occur under certain conditions. Specifically, when using the internal BT VR9 bootloader
and/or certain Ethernet connected hardware.

Try loading the install image again and you may be successful. If Kernel Panic repeatedly persists, use a
different model computer for running the TFTP server, or install an ethernet switch between the HH5A and
the computer may temporarily resolve the issue, to enable you to start the LEDE install image.

Otherwise, use the ‘OpenWrt-lantiq-bthomehubv5a_ram-u-boot.asc’ or LEDE custom U-boot ascii


file.

A new LEDE Install Image based on LEDE 17.01.4 was released in November 2017. Hopefully, this has
resolved most of these Kernel panic issues.

7.2 OpenWrt/LEDE fails to start and halts at VR9 prompt


When you installed LEDE and executed the prepare script as described in section 4.2, you may have
encountered this warning message when using the LEDE install image v1.0.

WARNING: U-boot environment could not be decrypted!

'bootcmd' will be reset to default values. When the HH5A starts up after
installing LEDE, the boot process will halt at the VR9# u-boot prompt.

To update 'bootcmd' variable refer to the guide on the web page hosting
the install image.

Erasing 128 Kibyte @ 0 -- 100 % complete

Press any key to continue...

Here are some of messages displayed on the serial console when the HH5A starts up. LEDE will fail to start
and the boot process will halt at the VR9# u-boot prompt as shown below:

*** Warning - bad CRC, using default environment

Erasing Nand...
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
Erasing at 0xe0000 -- 100% complete.
Encrypting enviroment...

37
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Writing to Nand... done

Verifying image(s):
No active image found!!!
Wrong Image Format for bootm command
ERROR: can't get kernel image!
VR9 #

The prepare script attempted to use all known AES keys to decrypt the u-boot environment and failed.

To resolve the problem. At the BT bootloader VR9# prompt, enter these two commands:

setenv bootcmd ubi part UBI\; ubi read \$(loadaddr) kernel\; bootm \$(loadaddr)

saveenv

Finally power cycle the HH5A and hopefully LEDE will now start up.

If you do encounter the above issue, it would be appreciated if you can spare some time to report it to help
improve future releases of the LEDE installation image. The following information/files are required:

Restore your hh5a.nanddump backup of the original stock firmware to the HH5A and confirm the stock
firmware is working.

Then load the LEDE install image and complete the following instructions:

Execute the command to list the partitions for your information: cat /proc/mtd

Execute these commands to dump the u-boot and u-boot-env partitions:

dd if=/dev/mtd0 of=/tmp/mounts/<directory>/u-boot.bin

dd if=/dev/mtd1 of=/tmp/mounts/<directory>/u-boot-env.bin

where <directory> is the folder name of the mounted USB flash drive.

38
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Finally, upload the u-boot.dd and u-boot-env.dd files from the USB flash drive to:

https://github.com/mkresin/BTHH5a-installimage/issues/new

The u-boot.dd and u-boot-env.dd files do not contain any personal identifying data.

7.3 Hub won’t boot - Stuck at CFG 04 UART prompt

You have successfully completed all the steps to install LEDE onto the HH5a for the first time, and discover
the hub will not boot up and launch OpenWrt/LEDE no matter how many times you power cycle the hub. You
have disconnected the boot_sel2 pin. Hub appears to be stuck when viewing through serial console:

ROM VER: 1.1.4


CFG 04
UART

Unfortunately, this is a known issue. It is caused by a hardware fault. It is unclear what actually causes it to
happen. Unfortunately, there is currently no remedy to this problem.

It may have been caused by the ‘boot_sel2’ being shorted to GND for far too long, or too much heat
applied when soldering, resulting in damage to the electronic circuits. The advice since the initial release of
the LEDE Install image v0.1 in November 2016, is always to disconnect the ‘boot_sel2’ from GND
immediately after powering up the HH5a when wanting to enter CFG 04 UART mode. This seems to have
significantly reduced the number of cases of ‘stuck at CFG 04 UART prompt’ being reported, or no one is
reporting it any more….

You may also observe if you use the LEDE custom uboot .ASC file (Nov 2016 version) to boot the hub, it
may successfully start LEDE, albeit will run at a much slower clock rate.

Restoring the original nanddump containing the stock BT firmware will not resolve this problem, because
there is a hardware fault, not a software fault.

7.4 Where are the installation scripts?


‘prepare’, ‘restore’ and ‘migrate’ scripts can be found here when the Installation image is loaded:

39
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

/usr/sbin

Alternatively, the scripts for Installation Image v1.0 can also be found on github:

https://github.com/mkresin/BTHH5a-installimage/tree/2017-11-03/files/usr/sbin

7.5 How do I connect the HH5A to my UK ISP ?

Sep 2020: Updated Sky/NOW MER instructions

Refer also to the wiki page:

https://openwrt.org/docs/guide-user/network/wan/isp-configurations

Superfast fibre/FTTC/VDSL2 broadband connection

All Openreach FTTC VDSL fibre connections in the UK, require the following VDSL parameters:

VLAN ID: 101 use ptm0.101 for LEDE17 only.


ie.
use dsl0.101 for OpenWrt 18 and later.
(nb. ‘dsl’ is lower-case ‘DSL’)
Annex: B (all) nb. Annex A may also work in some areas.
Tone: A (A43C + J43 + A43)

Refer to section 9.1 to complete the configuration if you are a customer of BT, Plusnet, EE, PostOffice, or
Vodafone. For TalkTalk, Sky and NOW broadband, scroll down this page to the next section.

All BT Superfast fibre Retail customer use the same username.

Username: bthomehub@btinternet.com or bthomehub@btbroadband.com


Password: Use any password (eg. BT. Do not leave empty)
Protocol: PPPoE

40
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

For BT Business customers, use the username (eg. B1234@hg7.btclick.com) and corresponding
password supplied to the account.

Unlike their residential service, TalkTalk Business use PPPoE protocol

Customers of Vodafone fibre broadband services, should contact customer services for their
PPPoE username and password. The username is in the format
dsl******@broadband.vodafone.co.uk

Customers of Post Office Broadband services, can find their unique username and password
in the Settings page of their PO wireless router. Alternatively, you can call customer services on 0345 600
3210 to obtain the same details. The username is not the same as the Account username, and is in the
format ******@pobroadband.co.uk

ISPs such as BT and Sky now support IPv6, and is currently beyond the scope of this document. If the HH5a
has difficulty connecting to these ISPs, you can try disabling IPv6 as described in section 7.21.

Superfast fibre/FTTC/VDSL2 broadband connection

All Openreach FTTC fibre connections in the UK, require the following VDSL parameters:

VLAN ID: 101 use ptm0.101 for LEDE17,


ie.
use dsl0.101 for OpenWrt 18 or later.
(nb. ‘dsl’ is lower-case ‘DSL’)
Annex: B (all) nb. Annex A may also work in some areas.
Tone: A (A43C + J43 + A43)

41
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Refer to section 9.1 to set up the DSL parameters such as VLAN tag, Annex etc. Do not enter any username
or password. Finish off by configuring the DSL port for a DHCP client instead of PPPoE for FTTC fibre as
shown below.

For TalkTalk residential fibre services, no username or password is required.

(Business users should use PPPoE protocol)

Sky(UK) and NOW fibre broadband require additional settings. Both use MAC
Encapsulated Routing (MER) protocol which is based on DHCP protocol. Refer to the following web page for
details of how to obtain a Sky username and password, and generate a Class ID key.

http://www.skyuser.co.uk/forum/sky-broadband-fibre-help/50483-generic-open-wrt-sky-fibre-mer-guide.html

You may also need to spoof the WAN MAC address extracted from the sky hub. See section 7.9.

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&p=1965#p1965

Update: It appears Sky may have relaxed the requirements in recent years, and this has permitted 3rd party
VDSL modem router manufacturers such as TPlink, to support Sky MER protocol. The following post
suggests only a randomly generated Client ID key is required when using OpenWrt 18.06.

https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=1092&p=3068&hilit=sky#p3068

Apparently, NOW Fibre uses same settings as Sky Fibre

https://forum.openwrt.org/t/bt-homehub-5a-with-nowtv-fibre/50137/2

The three boxes in ‘Advanced Settings’ tab are normally required to be populated for successful
connection to Sky fibre.

Only the Client ID requires to be populated and optional Overide MAC address.

42
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Apparently, Vendor Class is no longer required.

Another NOW broadband user reported an issue connecting and discovered the Client ID may have to
be in hexadecimal, and/or of a minimum length.

https://forum.openwrt.org/t/nowtv-openwrt/74624/5

The Client ID before converting to hexadecimal was in the format:

macaddress@skydsl|password

eg. 123456789012@skydsl|1234567890123456

according to the original Skyuser.co.uk instructions.

You can use this online converter, to create a long hexadecimal string for your chosen Client ID

http://string-functions.com/string-hex.aspx

ISPs such as BT and Sky now support IPv6, and is currently beyond the scope of this document. If the HH5a
has difficulty connecting to these ISPs, you can try disabling IPv6 as described in section 7.21.

Superfast/Ultrafast broadband through a fibre modem

43
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

If you have a superfast/ultrafast broadband service where a dedicated fibre optic modem is provided, then
configure the HH5A as described in section 9.2 if you are a customer of BT, Plusnet, EE, TalkTalk Business,
or Vodafone, for Openreach FTTC (VDSL2), GFast and FTTP services.

If you are a customer of TalkTalk residential broadband services, refer to section 9.3.

If you are a customer of Sky or NOW, refer to section 9.3 and earlier text in this section to add the Client
ID and Vendor Class details. You may need to include the Overide MAC address too.

Customers of Vodafone fibre broadband services, should contact customer services for their PPPoE
username and password. The username is in the format dsl******@broadband.vodafone.co.uk

nb. Vodafone 100, 500 and 900 Mbps Gigafast services are provided by CityFibre and use a Calix fibre
modem with a single ethernet port. The external router must be configured to use PPPoE with VLAN tag
911. It is unlikely anyone would use HH5A with such ultrafast broadband services.

ISPs such as BT and Sky now support IPv6, and is currently beyond the scope of this document. If the HH5a
has difficulty connecting to these ISPs, you can try disabling IPv6 as described in section 7.21.

‘Up to 17mb’ ADSL Broadband

Most ADSL connections in the UK use PPPoA protocol with the following settings:

Protocol: PPPoA
PPPoA Encapsulation: VC-Mux
VPI/VCI: 0/38
Annex: A (A + L + M(all))
Tone: A (A43C + J43 + A43)

All ‘up to 17mb’ ADSL BT Retail customer uses the same username.

44
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Username: bthomehub@btinternet.com or bthomehub@btbroadband.com
Password: Use any password (eg. BT. Do not leave empty)

If you are a BT Business customer, you must use the username (eg. B1234@hg7.btclick.com) and password
supplied to you.

If you are a Post Office customer, please refer to this thread for how to extract username &
password from the Post Office supplied Zyxel ADSL router:

https://forums.thinkbroadband.com/postoffice/4446336-user-name-for-modem.html?fpart=all&vc=1

Please refer to the section 9.4 to complete the configuration.

If you have Sky or NOW broadband, you can use the username
'install@o2broadband.co.uk' with no password (Try also with a random password).

If you have TalkTalk ADSL broadband services, refer to this TalkTalk web page to
obtain your username and password:

https://help2.talktalk.co.uk/setup-non-talktalk-router

Some UK ISPs also support PPPoE protocol over an ADSL connection. This includes BT and Plusnet. Sky
and TalkTalk do not support PPPoE. See section 9.5 to complete the configuration for PPPoE.

ISPs such as BT and Sky now support IPv6, and is currently beyond the scope of this document. If the HH5a
has difficulty connecting to these ISPs, you can try deleting the WAN6 interface and/or disabling IPv6 as
described in section 7.21.

Virgin Media superfast/ultrafast broadband

45
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
For Virgin Media, configure the Virgin cable router to operate as a ‘bridge’ modem. Virgin refers to this as
‘modem’ mode.

https://help.virginmedia.com/system/templates/selfservice/vm/help/customer/locale/en-
GB/portal/200300000001000/article/HELP-2407/Modem-mode-on-your-Virgin-Media-
Hub?query=modem%20mode

Then configure the HH5A as a DHCP client as described in section 9.3.

The HH5A should work adequately with Virgin’s 50/3mb superfast cable services, but the deficiencies of the
HH5A will become evident with the 100/6mb and 350mb ultrafast cable services. ie. the HH5A is simply
TOO SLOW !

7.6 Problem using lede-lantiq-bthomehubv5a_ram-u-boot.asc when


LEDE is already installed.
Update 2 Nov 2017: This issue has been fixed. Use the new version of lede-lantiq-
bthomehubv5a_ram-u-boot.asc distributed with LEDE Install image v1.0.

Unlike the original OpenWrt OpenWrt-lantiq-bthomehubv5a_ram-u-boot.asc custom u-boot file,


the LEDE lede-lantiq-bthomehubv5a_ram-u-boot.asc u-boot file contains a ‘feature’ to
automatically start LEDE r2363 or later if it detects it is already present on the HH5a nand/flash chip.

However, you can interrupt the auto boot process to stop it auto starting LEDE. Watch for the following
prompt when the hub is powered up when you are using the lede-lantiq-bthomehubv5a_ram-u-
boot.asc u-boot file.

If LEDE r2363+ is already installed, you should consider using the internal BT bootloader as described in
section 2.6 for improved performance.

Otherwise, you can use the older OpenWrt-lantiq-bthomehubv5a_ram-u-boot.asc custom u-boot


file.

46
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.7 What is the difference between ubifs-sysupgrade.bin and


squashfs-sysupgrade.bin files?
Put simply, if you want Factory Reset function and Reset button to function correctly, you will have to use the
squashfs image. The ubifs image offers slightly better performance as the file system is not compressed.

From 11 Dec’17, ubifs daily snapshots will no longer be compiled.

7.8 'No response to 5 echo-requests' and recurring disconnections


If you witness repeated disconnections on your DSL line, and find ‘No response to 5 echo-requests’
in the system log, you may need to increase the timeout.

In LuCI, go to Interfaces -> WAN -> Advanced Settings

You will find two settings ‘LCP echo failure threshold’ and ‘LCP echo interval’.

As far as I have observed when using OpenWrt and LEDE, the above displayed values shown in LuCI are
misleading. It suggests there is an infinite timeout, and so you should not be witnessing any ‘No response
to 5 echo-requests’ messages.

In reality, I think the timeout is actually about 5 seconds. Perhaps, 5 individual echo-requests sent at 1
second intervals, equating to a timeout of 5 seconds.

To resolve the problem, simply increase the ‘LCP echo failure threshold’ value to say a value of ‘5’
for example. This will provide a timeout of 25 seconds. (5 individual echo-requests sent at 5 second
intervals)

In /etc/config/network, adding this parameter to the ‘wan’ section will achieve the same result:

config interface 'wan'


option keepalive '5 5'

If you have an ADSL connection, you may also wish to read the discussion in this thread:

47
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=1062

There is a poorly documented setting called keepalive_adaptive. To enable this option will require
manual editing of the /etc/config/network file.

config interface 'wan'


option keepalive '5 5'
option keepalive_adaptive '1'

Refer also to section 9.13 for how to install and use Smart Queue Management (SQM).

7.9 Random WAN port MAC address fix


If the HH5a is configured to use the red Ethernet WAN port, you may observe when using DHCP-client, the
WAN port acquires a different IP address every time the hub is power-cycled. This is because the WAN
port’s MAC address has not been defined properly during boot up. A side effect is if the hub is attached to
your LAN, it could use up the pool of DHCP IP addresses if the hub is rebooted very frequently. Fortunately,
the WAN port’s MAC address does not change during DHCP IP address renewal.

To resolve the issue, start LuCI and navigate to Network -> Interfaces menu.

Notice the MAC addresses for the LAN and WAN interfaces are very different in above example.

Click on ‘Edit’ and go the ‘Advanced Settings’ tab.

48
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Scroll down the page until you find the ‘Override MAC Address’ field.

In the above example, the MAC address beginning ’96:6F’ changes every time the hub is power cycled.

Enter a new MAC address. Ensure any address you choose is NOT used elsewhere. You can choose to use
the MAC address already shown in the above box such as the address beginning ’96:6F’ if you wish.
Ensure the 2nd digit is always an even number, such as ‘6’ in example below.

Press the ‘Save & Apply’ button when finished.

You may need to restart the hub for the changes to take effect. Confirm that the new MAC address (and
DHCP IP address) is displayed in the ‘Interfaces Overview’ page and does not change every time the
hub is power cycled.

Here is an example of the changes made to the /etc/config/network file:

49
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
config interface 'wan'
option _orig_ifname ‘ptm0’
option _orig_bridge ‘false’
option ifname 'eth0.2' # or ‘eth1.2’
option proto 'dhcp'
option macaddr '96:11:22:33:44:55'

Alternatively, you can also fix the problem by also editing the ‘wan_dev’ section of the
/etc/config/network configuration file, but we don’t recommend this method.

The default ‘option name’ is ‘ptm0’ as shown below.

For dhcp-client mode (eth1.2 is used for earlier versions of LEDE)

config interface 'wan'


option ifname 'eth1.2' # eth0.2 used on later versions of LEDE
option proto 'dhcp'
option ipv6 'auto'

config device 'wan_dev'


option name 'ptm0' # requires to be changed to ‘eth1.2’
option macaddr 'xx:xx:xx:xx:xx:yy'

Note that if you choose to edit the ‘option name’ to match what is shown in the ‘wan’ section, the
‘Override MAC address’ option in LuCI will no longer work. This is why we don’t recommend this
method.

7.10 Updating OpenWrt/LEDE has bricked the hub

Unfortunately, if using the pinhole ‘Reset’ button as described in section 8.1 is unable to restore the HH5A to
original OpenWrt settings, then the only method to recover the hub, is to use serial connection and TFTP
server to reinstall squashfs-sysupgrade.bin file as described from section 2 onwards.

7.11 USB instability causes hub to reboot

While testing the new LEDE Install Image (Nov 2017), I have observed when inserting USB flash drive into
HH5A. LEDE detects and reports the make/model of the flash drive and everything looks normal, but when

50
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
you try to list the contents of the drive using ls command, no file or directory is found. When this happens,
wait one minute and try the ls command again. Do not unplug and reinsert the USB flash drive, because
LEDE is likely to crash and reboot. The new Install image v1.0 is more sensitive to this issue than original
install image v0.1.

Tip: Wait for the main Power/status LED on the front of the HH5A to turn solid blue colour
before inserting USB flash drive.

If you can successfully list the contents of the drive, then the subsequent commands such as nanddump
backup or restore script can be executed and successfully completed without issues.

Otherwise, try a different make/model of USB flash drive because not all drives are compatible.

7.12 OpenWrt Performance (updated Dec’19)

Revisited: 31 Dec 2019

Here is an updated summary of iperf3 throughput tests between two Windows 10 laptops with gigabit LAN
ports. The server is connected to either the red WAN port or LAN port. The client is wired to LAN port or
connected to 5 GHz wireless.

The performance of gigabit ethernet and AC wireless when using LEDE/OpenWrt is generally poor when
compared to original stock BT firmware. This is due to a combination of factors, such as no support for any
of the hardware acceleration features such as PPA engine found within the Lantiq xrx200 chipset, and
limitations of Lantiq and Atheros open-sourced drivers provided free by the chipset manufacturers for
distribution within LEDE/OpenWrt.

Here is are examples of the iperf3 commands used during the testing on the client laptop:

Single thread: iperf3 -c 192.168.111.2 -t 10 -R


Multi thread: iperf3 -c 192.168.111.2 -t 10 -P 5 -R

For the smp-tune fix applied to 18.06.4 and 19.07-rc2 tests below, refer to section 7.29. Both options
tested. Ie. Twenty ‘echo’ commands vs ‘Reiver’s more elegant solution.

Reminder that software flow offloading (see section 7.25) offered in 19.07 is not compatible with Smart
Queue Management. SQM is a form of QoS. (see section 9.13)

51
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Note that real world speeds may differ (lower) for various reasons. eg. overhead of using PPPoE, enabling
SQM etc.

LAN to LAN
- Confirms gigabit switch operating at full speed.

Single thread Multi thread


(Mbits/sec) (Mbits/sec)
17.01.6 D:870, U:787 D:940, U:935
18.06.4 D:869, U:791 D:941, U:931
18.06.4 Maurer Edition D:872, U:805 D:941, U:931
18.06.4 smptune (echo) D:873, U:806 D:945, U:940
18.06.4 smptune (Reiver) D:884, U:801 D:940, U:932
19.07.0-rc2 D:833, U:802 D:941, U:931
19.07.0-rc2 smptune (echo) D:860, U:797 D:941, U:930
19.07.0-rc2 smptune (Reiver) D:832, U:790 D:945, U:936
19.07.0-rc2 flow offloading D:873, U:794 D:945, U:940
19.07.0-rc2 smp(echo)&flow off D:870, U:789 D:949, U:940
19.07.0-rc2 smp(Reiver)& flow. D:867, U:786 D:940, U:931

LAN to 5 GHz 2x2 80MHz wifi (866.7 Mbps link speed)


(50cm between HH5A and Laptop with Intel 7260 AC wifi card)
- As a WAP, 17.01.6 provides the best transfer speeds.
- LAN to Wifi speeds less than half 2x2 802.11ac 400+ Mbps.

Single thread Multi thread


(Mbits/sec) (Mbits/sec)
17.01.6 D:145, U:141 D:188, U:158
18.06.4 D:123, U:128 D:134, U:143
18.06.4 Maurer Edition D:133, U:137 D:192, U:163
18.06.4 smptune (echo) D:124, U:118 D:157, U:143
18.06.4 smptune (Reiver) D:136, U:134 D:184, U:167
19.07.0-rc2 D:112, U:130 D:111, U:150
19.07.0-rc2 smptune (echo) D:109, U:109 D:152, U:153
19.07.0-rc2 smptune (Reiver) D:114, U:129 D:145, U:173
19.07.0-rc2 flow offloading D:113, U:130 D:111, U:152
19.07.0-rc2 smp(echo)&flow off D:113, U:112 D:157, U:140
19.07.0-rc2 smp(Reiver)& flow. D:112, U:120 D:149, U:167

Routed WAN to LAN


- default 18.06 & 19.07 results are borderline.
- 18.06.4 Maurer offering best speeds without using flow offloading.

Single thread Multi thread


(Mbits/sec) (Mbits/sec)
17.01.6 D:94.3, U:94.4 D:101, U:102
18.06.4 D:80.7, U:80.7 D:76.3, U:76.6
18.06.4 Maurer Edition D:146, U:115 D:142, U:140

52
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
18.06.4 smptune (echo) D:121, U:147 D:143, U:143
18.06.4 smptune (Reiver) D:142, U:117 D:141, U:140
19.07.0-rc2 D:70.1, U:70.3 D:69.1, U:68.9
19.07.0-rc2 smptune (echo) D:118, U:143 D:128, U:118
19.07.0-rc2 smptune (Reiver) D:128, U:106 D:135, U:132
19.07.0-rc2 flow offloading D:134, U:145 D:140, U:139
19.07.0-rc2 smp(echo)& flow. D:130, U:148 D:146, U:148
19.07.0-rc2 smp(Reiver)& flow. D:132, U:153 D:143, U:142

Routed WAN to 5 GHz 2x2 80MHz wifi (866.7 Mbps link speed)
(50cm between HH5A and Laptop with Intel 7260 AC wifi card)

- 19.07 speeds WAN to wifi look very poor.

Single thread Multi thread


(Mbits/sec) (Mbits/sec)
17.01.6 D:82.9, U:103 D:83.9, U:104
18.06.4 D:71.7, U:86.8 D:71.9, U:89.0
18.06.4 Maurer Edition D:73.7, U:85.6 D:103, U:130
18.06.4 smptune (echo) D:75.8, U:112 D:105, U:126
18.06.4 smptune (Reiver) D:74.7, U:111 D:115, U:130
19.07.0-rc2 D:56.2, U:81.5 D:54.2, U:76
19.07.0-rc2 smptune (echo) D:58.5, U:83.4 D:83.3, U:110
19.07.0-rc2 smptune (Reiver) D:57.4, U:84.4 D:78.6, U:114
19.07.0-rc2 flow offloading D:89.5, U:111 D:88.1, U:122
19.07.0-rc2 smp(echo)& flow. D:90.4, U:110 D:128, U:134
19.07.0-rc2 smp(Reiver)& flow. D:92.1, U:108 D:126, U:127

I’ve also observed wireless coverage/range of the HH5A hardware is only adequate when compared to other
wifi routers when using stock BT firmware. The 5 GHz wifi is particularly poor. LEDE is unlikely to be any
better. The HH5A does not have external aerials, so this is likely to be a factor.

There are also stability problems with laptops fitted with certain Intel Centrino wifi cards. See section 7.23.

The current Lantiq DSL firmware/drivers supplied with LEDE/OpenWrt do not support Vectoring at this time
for licensing reasons. However, it is possible to install vectoring enabled firmware files extracted from other
Lantiq based routers. See section 7.27.

53
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.13 Hub suffers from random reboots

This is a known bug if you are NOT actively using the DSL port. When the HH5A is idle, this causes high
load utilization which eventually results in the hub crashing and rebooting usually within an hour. It was
investigated in March 2017:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=200

A patch was released in September 2017 and is included in 17.01.3 or later.

However, a watchdog bug was also discovered which causes the hub to reboot between 24-48 hours if the
hub is not connected to an active xDSL line. No patch is currently available.

Therefore it is recommended to disable the DSL port when it is not required. See section 9.9 for instructions.

7.14 MTU setting

Your ISP may recommend a value less than default 1500.

In the past, some ADSL providers often specify a low MTU setting. TalkTalk suggests using a value of 1432,
but recommends a value of 1500 for fibre customers.

https://community.talktalk.co.uk/t5/Broadband-Security/MTU-Settings/ta-p/1326011

Often, one symptom of an abnormally high MTU setting, is if you cannot access particular websites.

Here is a useful discussion about MTU setting for WAN port and DSL connections:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=230

54
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

It refers to a useful website for testing MTU sizes:

http://www.letmecheck.it/mtu-test.php

There is no support for jumbo frames.

7.15 I can’t log into HH5A after restoring BT firmware

You have restored a nanddump backup file of original stock BT firmware to your HH5A, and discover the
wireless SSID does not match what is printed on the underside of the HH5A. Also, the admin password
printed on the hub does not work.

The most likely explanation is you have restored a nanddump file from a different HH5A.

SSID, passwords and other parameters are stored in the caldata partition on the hub. This partition is unique
to each HH5A unit. The nanddump backup file includes the contents of the caldata partition.

7.16 KRACK wifi vulnerability patch

The KRACK wifi vulnerability was publicised on 16 October 2017.

https://www.krackattacks.com/

LEDE 17.01.4 stable was released in response on 18 October 2017.

Up to date info on Ebilan forum can be found here:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=261

The KRACK vulnerability specifically affects wireless clients. It is the wifi devices (eg. smart phone) which
should be patched ASAP to resolve the issue. Similarly, if the HH5A is to be used as a wireless client (eg.
pseudo bridge), then it must be patched too. An unpatched wifi client would still be vulnerable when
connected to a HH5A running LEDE 17.01.4+ or any patched router/access point.

A new 'wpa_disable_eapol_key_retries' setting has also been added, but it is turned Off by default,
because it may not be compatible with some wireless clients and/or environments.

For LEDE 17.01.4, LuCI also has to be upgraded to be able to manage this new setting which appears when
the wireless is configured as an access point.

55
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Start LuCI and go to System -> Software.

Click on ‘Update lists’ if offered.

Enter ‘luci-mod-admin-full’, into ‘Download and install packages’, and click ‘OK’.

When you edit the Wireless Security settings, you will see the new option for KRACK countermeasures.

Here is sample /etc/config/wireless configuration file

config wifi-iface
option device 'radio0'

56
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
option network 'lan'
option mode 'ap'
option encryption 'psk2+ccmp'
option key 'wifipassword'
option ssid 'LEDE-5GHz'
option wpa_disable_eapol_key_retries ‘1’ # KRACK countermeasure

config wifi-iface
option device 'radio1'
option network 'lan'
option mode 'ap'
option encryption 'psk2+ccmp'
option key 'wifipassword'
option ssid 'LEDE-2.4GHz'
option wpa_disable_eapol_key_retries ‘1’ # KRACK countermeasure

7.17 ‘ptm0/nas0’ ifname renamed to ‘dsl0’

A new patch was released on 15th Oct 2017. As the title implies, the use of ifnames ‘ptm0’ and ‘nas0’ in
previous /etc/config/network configuration files when configuring a VDSL or ADSL connection, has
been simplified and replaced by a single ifname: ‘dsl0’ (nb. ‘dsl’ is lower-case ‘DSL’). This applies to all
snapshots and OpenWrt 18/19 released since 15th Oct 2017. It does NOT apply to any LEDE 17.01.x stable
releases which continue to use the old ifnames: ‘ptm0’ and ‘nas0’.

https://git.lede-project.org/?p=source.git;a=commit;h=b02b7004f8d1a946cfd71d2458d5bc3c5946dae7

This change makes it possible to configure the wan/dsl ppp interface


settings independently from the used TC-Layer (ATM/PTM).

If you upgrade a hub with LEDE 17.01.x stable (or a snapshot prior to 15th Oct 2017) and choose to preserve
the existing settings, the sysupgrade process should automatically rename any ifname entries contained
within the WAN interface section of the /etc/config/network configuration file to use the new ‘dsl0’
name.

Any new installation of OpenWrt 18 (or later) will use the ifname ‘dsl0’.

If you restore LEDE 17 configuration archive to a HH5a running OpenWrt 18 (or later), you will need to edit
the ifname to use ‘dsl0’(nb. ‘dsl’ is lower-case ‘DSL’), otherwise the HH5a will not be able to connect to
your ISP.

57
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Navigate to LuCI -> Network -> Interfaces -> WAN, click on Edit button.

Go to Physical Settings tab and edit the Custom Interface as shown below:

For UK Openreach FTTC connections, enter dsl0.101 followed by pressing the Enter key. (nb. ‘dsl’
is lower-case ‘DSL’)

Check that dsl0.101 is displayed as shown below.

Now press Save & Apply button as shown above.

7.18 How to perform a factory reset

See section 8.1. I generally recommend using a pin inserted into the Reset hole on the back of the HH5a to
be most effective.

The ‘Perform Reset’ button available within LuCI on some occasions does not work properly. See 7.19
for one example.

58
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.19 Wi-fi radio refuses to start up after saving new settings

I’ve witnessed this issue where either 2.4 or 5 GHz wifi radio refuses to start up after correctly editing and
saving the settings. When you review the settings, there may be no channel numbers offered in the list box
when using LuCI.

The ‘Perform Reset’ button in LuCI -> System -> Backup/Flash firmware may not fix this
problem.

Performing a factory reset using the ‘Reset’ button on the rear of the HH5A will resolve the issue. See
section 8.1 for instructions.

7.20 Cannot connect with ADSL using PPPoA

The HH5a is configured to use PPPoA to connect to an ADSL as described in section 9.4.

The HH5a refuses to connect to ISP and the system log may report this error:

daemon.err pppd[ ]: connect( ): Address in use

This error may be due to the presence of ATM Bridge settings which should not be present when using
PPPoA.

Use LuCI and go to Network -> Interfaces.

Scroll down the page to ATM Bridges.

59
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Press the Delete button.

Press the Save & Apply button at the bottom of the page.

Reboot the HH5a for the changes to take effect.

The above instructions were omitted from earlier editions of this guide. See the following link for background
information:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=1031

7.21 IPv6 ppp login fails and does not fall back to IPv4 login

IPv6 is beyond the scope of this document at the time of writing. BT is one of a growing number of ISPs in
the UK which supprts IPv6. One user reported their HH5a fails to fall back to using IPv4 login when there is
a problem with IPv6 login.

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=266&p=2877#p2877

To resolve the issue, they simply disabled IPv6 built-in management as follows:

Use LuCI and go to Network -> Interfaces -> WAN

Click on Edit button

Press Save & Apply button.

You may need to reboot the HH5a for changes to take effect.

60
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.22 OpenWrt 18.06 and LEDE 17.01.5/6 release

Link for OpenWrt 18.06

https://OpenWrt.org/releases/18.06/start

Link for LEDE 17.01

https://OpenWrt.org/releases/17.01/start

As far as most HH5A owners are concerned, the key differences between LEDE 17.01.4 and OpenWrt 18.06
stable, are SMP is enabled and the kernel has been updated from 4.4 to 4.9 in 18.06. Unfortunately,
enabling SMP doesn’t appear to improve the performance.

OpenWrt/LEDE does not have any hardware acceleration support for Lantiq devices such as the HH5A and
so performance is generally inferior to original BT firmware.

There is also a drop in routed performance from 101+Mbps in LEDE 17 to 72+Mbps in OpenWrt 18. See
iperf3 speed test results in section 7.12.

Openreach UK FTTC line speeds are capped at 80 Mbps which returns 76-78 Mbps in speed tests, but in
Europe where Vectoring may be available, the drop to 72 Mbps would be unacceptable on faster 100 Mbps
lines.

Update Oct 2018: The cause for the drop in WAN to LAN routed throughput has been found. See section
7.29.

OpenWrt 18.06 stable uses Kernel 4.9 on HH5A, but OpenWrt 19 for HH5a will use Kernel 4.14.

Kernel 4.14 includes ‘Flow Offloading’ package. When this new feature is enabled, the routed WAN to
LAN throughput of OpenWRT 19 should be as good if not better than LEDE 17.01.4. Unfortunately, ‘Flow
offloading’ is not compatible with QoS (ie. SQM). See section 7.25

LEDE 17.01.6 stable contains security patches since 17.01.4 (Oct 2017) and other minor updates. This is
considered to be the ‘lowest risk’ upgrade option for hubs already running 17.01.2-17.01.4. It would also be
easy to revert back to an earlier 17.01 release using just a web browser if problems are discovered with
17.01.5/6. A web browser cannot be used to downgrade from 18.06 to 17.01 – see section 4.4.

61
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Both LEDE 17.01.5/6 and OpenWrt 18.06 also include a new feature ‘Downstream SNR margin offset’
adjustment. See section 7.26.

A kernel bug was discovered with ip4-in-ip6 tunnelling – I believe this function is only used in ‘IPv6-only’
networks. It has been fixed in 17.01.6 and 18.06.1 service releases.

PPTP VPN client never worked particularly well in 17.01 imho, and now won’t function for more than a few
seconds/minutes in OpenWrt 18.06.1 on HH5A! (No issues with OpenVPN client in early testing)

If you choose to upgrade from LEDE 17.01 to OpenWrt 18.06, see also section 7.17 should the HH5a fail to
reconnect to the ISP when using VDSL or ADSL. Instructions for using a web browser to perform the
upgrade can be found in section 4.3. See also section 4.4 if you wish to downgrade from OpenWrt 18.06 to
LEDE 17.01.

At this moment in time, LEDE 17.01 is considered to be the best release for stability and performance.
Future support for 17.01 will end when OpenWrt 19 is released some time in 2019.

OpenWrt 18.06.2 released on 1st Feb 2019. It appears LuCI may incorrectly report the status of the DSL
interface. See section 7.32.

OpenWrt 18.06.4 released in July 2019 to address Linux SACK vulnerability. Although LEDE 17.01.7 has
appeared in June 2019, there is still no formal announcement. 17.01.6 is considered to be the last formerly
announced update for LEDE 17.01.

Imho, for most users, if you are still running LEDE 17.01.6, there is no urgency to upgrade to 18.06.4 if your
router does not run any ‘internet facing’ services on the actual HH5a which uses TCP protocol. (Enabling
ICMP Ping on the HH5a is not a problem btw) eg. If you enable SSH on the WAN interface for remote
access purposes, then as SSH uses TCP, then the HH5a would indeed be vulnerable to SACK attacks.

7.23 Intel Centrino wifi & 2.4 GHz wifi disconnections

Windows 10 notebooks fitted with certain dual band Intel Centrino wireless cards ‘might’ not be able to
maintain a stable connection to HH5A when operating on 2.4 GHz wifi. Running ‘speedtest.net’ broadband
speed tester causes the test to fail, often during the upload test. The device eventually disconnects from the
2.4 GHz access point after a few minutes.

The issue has been witnessed with Intel Centrino 6205 (2x2) and 6300 (3x3) cards in Windows 10 32 & 64
bit editions, versions 1703, 1709 and 1803 on multiple Dell laptops during testing. Intel no longer supports
these cards and there are no official Windows 10 drivers for these cards, but the last Windows 8 drivers
(v15.18.0.1) are recommended with these cards for use with Windows 10. Older inbox windows drivers
shipped with Windows 10 do not resolve the issue when tested.

It has also been witnessed with newer 7260HMW-AN/7260HMW-AC (2x2) 802.11n/ac wifi cards in Windows
10 (1903) using the very latest wifi driver (v18.33.171, Apr 2019) from Intel, and also on Mint Linux 17.3 on a
dual boot laptop. The issue does not appear to be confined to just Microsoft Windows.

62
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
This behaviour has been witnessed on LEDE r796 snapshot (June 2016), 17.01.2, 17.01.4 and OpenWrt
18.06.5, 19.07.0-rc2 tested on more than one HH5A. The issue cannot be reproduced when HH5A is
running stock BT firmware or when using a completely different wifi router.

The current workaround is simply to ensure the Windows 10 notebook connects to 5 GHz wifi on HH5A.
Changing the Mode from Wireless N to ‘Legacy’ in the 2.4 GHz wireless settings for the HH5A, thereby
forcing the HH5A to operate in 1x1 stream mode, also appears to fix the issue, but maximum transfer speeds
is cut drastically to as little as 18 mbps when tested.

The older Intel Centrino 6200 (2x2) and 5300 (2x2) cards fitted to same laptops don’t suffer from the above
symptoms under Windows 10. Similarly, the Qualcomm Atheros AR5B22 (AR9462) dual band (2x2)
wifi/Bluetooth cards using Windows 10 inbox and latest Atheros driver (v10.0.3.456) work fine on 2.4 GHz
connecting to HH5A too.

Update Oct 2018: Rerunning speed tests using the red WAN port reveal the Atheros wifi cards offer
improved speeds too on 5 GHz wifi.

7.24 System Log spammed by odhcp messages

If you discover the System Log is being repeatedly spammed with odhcpd messages when using LEDE 17
as in example below:

To change the loglevel, open a SSH session to the HH5a and execute the following three commands.
Changing the loglevel from default of 6 to 5 will suppress info messages from odhcpd. (The loglevel
of 4 can suppress info and notice messages).

uci set dhcp.odhcpd.loglevel=5


uci commit dhcp.odhcpd.loglevel
/etc/init.d/odhcpd restart

63
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The above UCI commands will add a loglevel line to the /etc/config/dhcp file.

config odhcpd 'odhcpd'


option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '5'

7.25 Software Flow Offloading

OpenWrt 19 includes a package called kmod-ipt-offload included in Kernel version 4.14. This package
does Not use any hardware acceleration features of the Lantiq SoC, but can help improving the routing
performance.

OpenWrt snapshot r7313 (25 June 2018) for the HH5A, includes the kmod-ipt-offload package, when
tested.

In LuCI, navigate to the Network -> Firewall menu.

For the HH5A, enable Software flow offloading as shown below

64
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Click Save & Apply button when done.

An additional line is added to the defaults section of the /etc/config/firewall configuration file to
enable the feature

Refer to updated section 7.12 for latest speed tests using iperf3 for LEDE 17 to OpenWrt 19.

Unfortunately, Flow Offloading is not compatible with QoS, such as Smart Queue Management (SQM). This
could be a big problem where QoS is required, such as to prevent the upstream connection from being
saturated. See section 9.13.

A reminder that if you choose to install the latest development snapshots, they do not include LuCI. The
LuCI package must be downloaded and installed to HH5A through a working internet connection.

7.26 Downstream SNR margin offset adjustment

OpenWrt 18.06 and LEDE 17.01.5 includes the following experimental patches to permit the downstream
noise margin to be adjusted by allowing an offset of -5.0 to +5.0 dB in 0.1dB increments to applied.

65
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
https://git.OpenWrt.org/?p=OpenWrt/OpenWrt.git;a=commitdiff;h=541a1a7ff5ce9ef7a5660e483635ecd089213
7dc

https://git.OpenWrt.org/?p=OpenWrt/OpenWrt.git;a=commitdiff;h=dea8979a81d72eac79321f1f3bf72fb524427
5b6

For example, most ADSL and VDSL lines usually have minimum downstream target noise margin of 6 dB.
To increase downstream speeds on very stable lines, an offset of -2 dB could be applied to reduce the target
noise margin to 4 dB.

Please note that reducing the target noise margin may also increase risk of disconnections.

For UK’s Openreach VDSL line which connect at full 40, 55 or 80 mbps line sync speeds, there will be no
increase to downstream speeds by attempting to reduce the downstream noise margin.

On the other hand, If the DSL line suffers from intermittent disconnections, applying a positive offset, eg. +3
dB, may improve stability. Note this will also reduce your maximum downstream sync speed.

For OpenWrt 18.06, navigate to the Network menu and scroll down to the DSL section where the
Downstram SNR Offset setting can be found:

Contents of /etc/config/network configuration file as follows:

config dsl 'dsl'


option annex 'a'
option tone 'av'
option ds_snr_offset '-20' # -2dB offset

For LEDE 17.01.5 (Not required for 17.01.6), the ‘luci-mod-admin-full’ package must be updated. In
LuCI, navigate to System -> Software menu. Click on Update Lists button, then search for ‘luci-
mod-admin-full’ package, and install it.

66
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

I tested this new function on my VDSL2 connection where I think BT Openreach have applied some sort of
fixed speed profile or downstream noise margin of 7.5 dB. Unfortunately, using an offset of -1.5dB or
+1.5dB, to try and change the noise margin had no effect on my line when using LEDE 17.01.5 and OpenWrt
18.01.6. I also tried a newer Lantiq firmware bin file too. I am connected to a Huawei FTTC cabinet (ATU-C
System Vendor ID: Broadcom 164.140). Readers may have better luck with their DSL line and DSLAM.

Update (Jul 2020): I’ve seen one post on the Openwrt forum where one user discovered the change in noise
margin only took effect after they had left the modem disconnected/switched off from the DSL line for 30
minutes.

7.27 Lantiq firmware files

The default Lantiq firmware file for VDSL and ADSL connections in included in LEDE/OpenWrt, is the only
official licensed version provided free by Lantiq. It does not support Vectoring.

If you require a firmware with Vectoring enabled, please refer to the following thread on ebilan forum for more
info:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=1088

Use WinSCP or other methods and place the new Lantiq firmware into the /lib/firmware folder (or other
location) on the HH5A. You may wish to rename the new file before copying to the HH5A.

In LuCI, add the path to the new Lantiq firmware as shown in example below.

67
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The HH5A must be power cycled for any changes to take effect.

Tip: If you store the Lantiq firmware file in the /etc/config folder instead of /lib/firmware, the
file can be backed up and subsequently restored.

7.28 Problem with ‘Save & Apply’ when using LuCI

LuCI got a makeover with OpenWrt 18.06. When you try to change and save certain values, an auto roll
back message is supposed to appear after 30 seconds as shown below. When you click on the ‘Apply
unchecked’, the change is saved.

However, this message some times does not appear, and you can no longer ping or connect to the HH5A
too. Power cycling the HH5A is only way to regain access to try again.

I have observed the above will happen when both the WAN and LAN IP addresses are configured with the
same subnet (this is bad practise btw).

eg.
WAN IP address: 192.168.1.209 (eg. static IP)
Default LAN IP address: 192.168.1.1

To resolve the above example, temporarily change the WAN IP address to a different subnet (eg.
192.168.0.209). You will then be able to change the LAN IP address using LuCI.

68
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.29 OpenWrt Slow WAN to LAN performance bug

If you have 70 Mbps or faster broadband connection, you may have noticed the maximum routed speeds
through HH5A from the red WAN port to the LAN sockets using latest snapshots (as of 9th Oct 2018) and
OpenWrt 18.06.1 may be poor. OpenWrt 18.06.1 barely manages 79 Mbps. OpenWrt 19.07 may max out
at 70 Mbps.

With help from ‘maurer’, the cause for this sudden drop in WAN to LAN speed has been traced back to this
commit (patch):

https://git.OpenWrt.org/?p=OpenWrt/OpenWrt.git;a=commit;h=916e33fa1e14b97daf8c9bf07a1b36f9767db679

OpenWrt 19.07 supports software flow offloading – see section 7.25. When enabled, this can improve
performance to <110 Mbps. However, software flow offloading is NOT compatible with SQM – see section
9.13.

Update (Oct 2019): Packet Steering is not configured correctly when using xrx200 SoC as found in HH5A.
This has been reported as a bug here:

https://bugs.openwrt.org/index.php?do=details&task_id=2573

Although not fully tested, there are some possible solutions to this issue.

Option 1:

‘maurer’ on the ebilan forum has compiled a version of OpenWrt 18.06.x for the HH5A without the above
patch. This can be found here:

https://forum.openwrt.org/t/18-06-4-speed-fix-for-bt-homehub-5a/23643

The maximum WAN to LAN speeds should hopefully increase to 140+ Mbps which is comparable to test
results completed in 2017 with SMP enabled in snapshots at the time.

Option 2:

69
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Following a ‘quick fix’ by mkresin to create a new script, adding the following 2 lines to the BOTTOM of the
existing /etc/hotplug.d/net/20-smp-tune script 'seems' to restore performance, and it survives
hub restarts for ‘unmodified’ 18.06.4 stable, and 19.07-snapshot sysupgrade images on brief testing:

echo 3 > /sys/class/net/eth0/queues/rx-0/rps_cpus

echo 3 > /sys/class/net/eth0/queues/tx-0/xps_cpus

The above solution does not address any possible wireless performance issues. The following is untested
at time of writing:

# Untested fix to restore original values to pre Feb 2018 values for OpenWrt 18.

# Receive Packet Steering


echo 3 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
echo 3 > /sys/class/net/eth0.1/queues/rx-0/rps_cpus
echo 3 > /sys/class/net/eth0.2/queues/rx-0/rps_cpus
echo 3 > /sys/class/net/eth0/queues/rx-0/rps_cpus
echo 3 > /sys/class/net/lo/queues/rx-0/rps_cpus
echo 0 > /sys/class/net/wlan0/queues/rx-0/rps_cpus
echo 0 > /sys/class/net/wlan1/queues/rx-0/rps_cpus

# Transmit Packet Steering


echo 3 > /sys/class/net/br-lan/queues/tx-0/xps_cpus
echo 3 > /sys/class/net/eth0.1/queues/tx-0/xps_cpus
echo 3 > /sys/class/net/eth0.2/queues/tx-0/xps_cpus
echo 3 > /sys/class/net/eth0/queues/tx-0/xps_cpus
echo 3 > /sys/class/net/lo/queues/tx-0/xps_cpus
echo 0 > /sys/class/net/wlan0/queues/tx-0/xps_cpus
echo 0 > /sys/class/net/wlan0/queues/tx-1/xps_cpus
echo 0 > /sys/class/net/wlan0/queues/tx-2/xps_cpus
echo 0 > /sys/class/net/wlan0/queues/tx-3/xps_cpus
echo 0 > /sys/class/net/wlan1/queues/tx-0/xps_cpus
echo 0 > /sys/class/net/wlan1/queues/tx-1/xps_cpus
echo 0 > /sys/class/net/wlan1/queues/tx-2/xps_cpus
echo 0 > /sys/class/net/wlan1/queues/tx-3/xps_cpus

Option 3

‘Reiver’ has come up with a more elegant solution, described here:

https://forum.openwrt.org/t/18-06-4-speed-fix-for-bt-homehub-5a/23643/16

Rather than adding the echo at the end, change the set_hex_val parameters so all (non-virtual)
interfaces are changed on hotplug.

70
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
In the original /etc/hotplug.d/net/20-smp-tune script, two lines beginning set_hex_val require
amendment as shown below:

for q in ${dev}/queues/rx-*; do
# add the following new line
set_hex_val "$q/rps_cpus" "$PROC_MASK"
# remove or comment out the following line
# #set_hex_val "$q/rps_cpus" "$(($PROC_MASK & ~$irq_cpu_mask))"
done

ntxq="$(ls -d ${dev}/queues/tx-* | wc -l)"

idx=$(($irq_cpu + 1))
for q in ${dev}/queues/tx-*; do
# add the following new line
set_hex_val "$q/xps_cpus" "$PROC_MASK"
# remove or comment out the following line
# #set_hex_val "$q/xps_cpus" "$((1 << $idx))"
let "idx = idx + 1"
[ "$idx" -ge "$NPROCS" ] && idx=0
done

More information on the original problem can be read here:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=1105

See section 7.12 for updated iperf3 test results (Dec 2019) based on above Option 2.

Update 8 March 2020: A patch has been released to fix this packet steering bug. It is included in latest
development snapshots and will appear in future OpenWrt 20.

https://forum.openwrt.org/t/18-06-4-speed-fix-for-bt-homehub-5a/23643/32

To enable packet steering, SSH into the HH5A and execute these two commands:

uci set network.globals.packet_steering=1


uci commit network

This will also add a line to the /etc/config/network file:

config globals 'globals'

71
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

option packet_steering '1'

WAN to LAN throughput now seems to return 130 Mbps in both directions in brief testing.

The ability to enable/disable packet steering through LuCI will be added shortly.

7.30 u-boot.asc doesn’t seem to work properly

The u-boot.asc found on OpenWrt.org 18.06.x download pages does not function properly. Specifically,
TFTP does not work.

Use only the files specified in section 2.3.

eg. lede-lantiq-bthomehubv5a_ram-u-boot.asc

7.31 Wi-fi speed is only 6 Mbit/s

LuCI reports the wireless rate as ‘6.0 Mbit/s, 20 MHz’ for any 5 GHz wifi connected devices.

This is normal and is a ‘feature’ (cosmetic bug?) of the open source ath10k driver provided freely by
Qualcomm.

If your wifi device is able to display wifi speeds, it should report the correct wireless link speeds.

72
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.32 ‘Network device is not present’

New to OpenWrt 18.06.2 (and later) is this error status message which may cause some confusion.

This message is visible when a hub is flashed from stock BT firmware to OpenWrt 18.06.2 for the first time,
or when the settings have been factory reset to defaults, causing the WAN interface to default to using the
grey DSL port.

It appears this message may appear when the LuCI -> Network -> WAN -> ‘Physical interface’ tab is not
configured to use an Ethernet interface (eth0.x).

7.33 OpenWrt 19.07 stable information

OpenWrt 19.07-snapshots which include LuCI web UI started to appear in July 2019. OpenWrt 19.07.0
stable release finally made an appearance in on 6 January 2020.

LuCI has been updated since the original 19.07 snapshots first appeared. One obvious change is promoting
the use of the ‘Save’ button when editing settings. Specifically, after pressing the ‘Save’ button, the ‘Save &
Apply’ button must subsequently be used for any changes to take effect. This installation guide at this
time does not reflect the changes to LuCI introduced in 19.07.0 stable release.

OpenWrt 19.07 for HH5a uses kernel 4.14. Software flow offloading is a key feature in 4.14 to improving
routing performance. One significant disadvantage of Software flow offloading is that it is incompatible with
SQM (QoS) – this could be a big issue for HH5a users who require SQM.

Without software flow offloading, the maximum routed throughput with 19.07 is about 10-15% slower than
vanilla 18.06. ie. maxes out around 72 mbps from red WAN port to the ethernet LAN ports. Speeds to wifi
are typically 10% lower.

This is caused by a bug also present in 18.06 and latest development snapshots. Packet steering is not
correctly configured for devices using Lantiq xrx200 such as the HH5a. Specifically, only one instead of both
SMP cores is used to steer packets to the LAN interface. Fortunately, there are some workarounds. See
section 7.29.

73
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
The ath10k-firmware-qca988x wifi drivers for 5 GHz wifi, have been replaced by ath10k-firmware-
qca988x-ct drivers. It is possible to remove and reinstate the non-ct drivers if you are experiencing
issues, particularly with mesh wifi.

Reports starting appearing of poor wireless performance on other routers. Low speeds and terrible ping
latency. The issue was eventually diagnosed and fixed from OpenWrt 19.07.1 onwards.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c07f6e8659ea1348c75c04dac2924616f0042293

Some reports the Ath10k-CT wireless drivers included in 19.07 may restrict total number of connected
wireless devices to 32 per radio by default. The forum thread refers to Qualcomm IPQ based routers.
Unclear at this time whether it affects other devices.

https://forum.openwrt.org/t/ath10k-ct-driver-supports-only-32-devices/40444

Some reports that uPnP does not work. Unclear whether this also affected the HH5A if you choose to install
uPnP package. (see section 9.15)

7.34 FTP server issues with OpenWrt 18

If you operate a FTP server on your LAN and cannot connect to it from outside of your OpenWrt router based
network after upgrading to OpenWrt 18, the following thread may be relevant to your problem:

https://forum.openwrt.org/t/ftp-problem-with-openwrt-18-06-4/42417

7.35 LuCI not updated after installing new package

Lately, When I download and install packages such as Luci-apps-openvpn or Luci-proto-relay for example, I
discover LuCI menus are not been rendered accordingly. ie. VPN pull down menu is missing and relayd
protocol is not visible in protocols list respectively.

In both cases, logging out and in to the router resolves the issue.

It is a known menu rendering bug introduced in 19.07.3. It has been fixed in 19.07.4.

74
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

7.36 DSL Reconnection bug

‘Xorbug’ on the OpenWrt forum has uncovered a bug, whereby the PPPoE session may not immediately
reconnect. It exists in 19.07.4. It does not exist in 18.06.8.

You can follow the discussion here:

https://forum.openwrt.org/t/bt-homehub-5a-not-reconnecting-when-re-plugging-dsl-cable/75502

75
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

8. Buttons

8.1 Reset button

The default behaviour for the recessed Reset button on the rear of the HH5A is as follows. The button will
function as described below if you are using the squashfs-sysupgrade.bin image file.

Failsafe mode:
When the HH5A boots up, the main power LED on the front panel goes through sequence of differing
flashing lights before it finishes with solid blue colour usually around 30 seconds later.

A few seconds after applying power, the LED will change to a rapidly flashing green coloured light.

Pressing the ‘Reset’ button, this will cause LEDE to go into ‘failsafe’ mode.

More information about failsafe mode can be found here:

https://lede-project.org/docs/user-guide/failsafe_and_factory_reset

While in ‘Failsafe Mode’, you can SSH into the HH5A at 192.168.1.1.

76
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Reboot mode:
When the HH5A is operating normally, momentarily depressing the ‘Reset’ button, will send a ‘REBOOT’
command to the HH5A. The HH5A will literally reboot.

Factory Reset:
Switch on the HH5A for at least 1 minute, then press and hold down the ‘Reset’ button for about 10 seconds
until the front panel power LED changes to a rapidly flashing red light. Wait a further 1 second before
releasing the button; a ‘FACTORY RESET’ command will be sent to the HH5A. All settings within LEDE will
be returned to factory defaults.

If you release the Reset button too soon, the front panel power LED will continue to rapidly flash but the
FACTORY RESET command will not be executed. If this should happen, simply hold the Reset button
down for 10 seconds and upon release, the hub should FACTORY RESET.

Factory resetting the hub using the Reset button may be more reliable than using LuCI and clicking
on the ‘Perform reset’ button found in System -> Backup/Flash firmware menu. I
encountered one situation where my laptop refused to connect to one of my test hubs no matter how
many times I entered the security passphrase and used LuCI to factory reset the hub. Downgrading
the firmware from LEDE 17.01.4 to 17.01.2 made no difference. Eventually, I factory reset the hub
using the Reset button, and I was subsequently able to connect my laptop to the hub using the
passphrase I had manually configured.

Once the hub has been factory reset, the default LAN IP address of the hub will be 192.168.1.1, with no
password set for username root. The wireless will be disabled too.

8.2 Restart button

Prior to OpenWrt 19, depressing the ‘Restart’ button momentarily on the top edge of the HH5A will
‘instantly’ reboot the HH5A !

This behaviour is different to the stock BT firmware which requires the ‘Restart’ button to be held down
for almost 10 seconds before the Hub will reboot.

77
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Tip: To prevent accidental reboots, one way to disable the ‘Restart’ button, is simply to SSH into the
HH5A and edit/rename/delete the following script:

/etc/rc.button/power

eg. Add a ‘#’ to the beginning of the line as shown below.

From OpenWrt 19, the ‘Restart’ button must be held down for 5 seconds to cause the HH5A to restart.

8.3 WPS button

Ebilan forum user ‘shoulders’ has published instructions on how to enable WPS on on HH5A.

Search for ‘ WPS doesn't work ’ on the following web page which describes how to install LEDE on HH5A:

https://quantumwarp.com/kb/articles/25-dsl-broadband/898-install-lede-on-a-bt-home-hub-5-plusnet-one-router

Here are some instructions reproduced from above web page with the author’s permission:

Go to LuCI -> System -> Software

Remove wpad-mini

Install wpad

Install hostapd-utils

You will now have the option to enable WPS in LuCI under:

78
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Network -> Wireless -> Edit -> Interface Configuration -> Wireless Security -> Enable WPS pushbutton

Note you must use WPA(2)-PSK wireless encryption.

79
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

9. Popular Hub configurations

9.0 How to log into hub

This is stating the obvious, but has been included for those readers who may have acquired a HH5a with
OpenWrt/LEDE pre-installed.

Wireless is turned off on the HH5a by default, and so you will need to wire a computer directly to one of the
yellow LAN sockets on the rear of the HH5a.

Switch on the hub and wait for the main power/status light to change to a solid blue colour.

Next, launch a web browser and point it to 192.168.1.1

The login page for the web admin, known as LuCI, should appear. There is no password set at this stage,
so simply press the Login button.

It is recommended to set up a password to prevent unauthorised access.

From LuCI, navigate to System -> Administration page.

80
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press the Save & Apply button at the bottom of the page.

To verify the new password is functioning, close and restart the web browser and log into the hub as
described earlier.

LEDE/OpenWrt on the HH5A assumes the grey RJ11 DSL port on the rear of the HH5A will be used by
default. The instructions in the following sections, describe how to use LuCI to configure LEDE to connect to
the broadband service. Only IPv4 is described. IPv6 is beyond the scope of this guide at the time of writing.

If you wish to configure and enable the wireless, proceed to section 9.11.

9.1 Quick PPPoE setup using DSL port for VDSL Connection

If you are in the UK, see also section 7.5 for advice.

Start LuCI and go to Network -> Interfaces.

For the ‘WAN’ interface, click ‘Edit’.

81
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Edit the PAP/CHAP username and password to match the details provided by the ISP.

nb. The username is normally in the format username@domain

Press Save & Apply button.

Return to the Network -> Interfaces menu, then scroll down the page to reveal the section called
‘DSL’.

82
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The HH5A supports both Annex A and Annex B on VDSL, but only Annex A on ADSL.

Amend the Annex and Tone settings accordingly.

Most of Europe uses ‘Annex B’ for VDSL, so choose ‘Annex B (all)’ as a good starting point.

For the Tone setting, the BT Openreach FTTC VDSL2 connections in the UK uses ‘A43 + J43 + A43’.
Most European VDSL providers including Deutsche Telekom uses ‘B43 + B43C’.

The following image shows the settings required for Openreach VDSL2 broadband connection in the UK:

For the UK: For most of Europe:

nb. Annex A may also work in some areas of the UK.

You can optionally specify the Encapsulation and DSL line mode to force the HH5A to connect only to
VDSL type services.

83
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press Save & Apply button.

Delete the ATM Bridge settings (This is only for ADSL connections) as shown below.

Press ‘Save & Apply’ when complete.

To edit VLAN tag, start LuCI and go to Network -> Interfaces.

For the ‘WAN’ interface, click ‘Edit’.

Under ‘Physical Settings’, choose ‘Custom Interface’.

84
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Next, the VLAN tag must be entered.

eg. All VDSL connections in the UK are provided by BT Openreach and use VLAN tag 101.

For OpenWrt 18.06: enter ‘dsl0.101’ in the box, followed by pressing the Enter
key. (nb. ‘dsl’ is lower-case ‘DSL’)

Check that dsl0.101 is displayed as shown below.

Press Save & Apply button as shown above.

For LEDE 17.01: enter ptm0.101’ in the box:

85
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press Save & Apply button.

IMPORTANT: For the above changes to take effect, the HH5A must now be power cycled.

‘Status’ and ‘Data Rate’ should appear, in the DSL status section on the main Status -> Overview
page if there is a valid DSL connection.

86
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
If the the status is down as shown below, then recheck the DSL settings, specifically the Annex and Tone
settings. Some lines may require up to 3 minutes for the status to change from down to up after powering
up the HH5A.

If there is a valid connection to your ISP’s network, the Network -> Interfaces menu should show the
‘Uptime’ and IPv4 address.

If there is no Uptime and IPv4 address, check the protocol (PPPoE), username, password and VLAN tag
(eg. dsl0.101 or ptm0.101 for Openreach) settings. Go to Status -> System Log and check for
errors.

The procedure is now complete.

A bug in LuCI fails to display the actual MAC-address when using PPPoE. Use the ‘ifconfig’ command to
display the HWaddr of the physical interface, defined in the wan_dev section of /etc/config/network
file

An alternative method is using LuCI, is to modify the existing entry labelled ‘Ethernet Adapter: ptm0’.
This requires direct editing of the /etc/config/network configuration file. Details of the modifications
are shown below.

(Instructions using VI editor are contained in a section 10 of this document)

87
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Examples of typical /etc/config/network file configurations for VDSL connection are as follows:

United Kingdom (eg. BT, PlusNet, excluding Sky and TalkTalk who do not use PPPoE protocol):

config dsl 'dsl'


option annex 'b' # Annex A may also work in some areas of the UK.
option tone 'a'

config interface 'wan'


# BT uses VLAN tag 101
option ifname 'dsl0.101' # (nb. ‘dsl’ is lower-case ‘DSL’)
# option ifname 'ptm0.101' # for LEDE 17.01
option proto 'pppoe'
option username 'bthomehub@btinternet.com'
option password 'BT' # Any password. Do not leave empty.
option ipv6 'auto'

The above username and password are for BT Retail broadband use only.

Germany (Deutsche Telekom):

config dsl 'dsl'


option annex 'b'
option tone 'b'
option xfer_mode 'ptm'

config interface 'wan'


# T-COM uses VLAN tag 7
option ifname 'dsl0.7' # (nb. ‘dsl’ is lower-case ‘DSL’)
# option ifname 'ptm0.7' # for LEDE 17.01
option proto 'pppoe'
option username '<Anschlusskennung><T-Onlinenummer>#0001@t-online.de'
option password '<yourpassword>'
option ipv6 'auto'

‘Anschlusskennung’ and ‘T-Onlinenummer’ are placeholder which have to be replaced with the
credentials received from deutsche telekom.

France (Orange):

config dsl 'dsl'


option annex 'a'
option tone 'a'
option xfer_mode 'ptm'

config interface 'wan'


option ifname 'dsl0.835' # (nb. ‘dsl’ is lower-case ‘DSL’)
# option ifname 'ptm0.835' # for LEDE 17.01
option proto 'pppoe'
option username 'xxxxxxxxx'
option password 'xxxxxxx'
option ipv6 'auto'

88
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

9.2 Quick PPPoE setup for WAN port

If you are in the UK, see also section 7.5 for advice.

The red WAN port on the HH5A is properly supported in OpenWrt 18.06 and LEDE from 17.01.2.

Start LuCI and go to Network -> Switch.

For current versions of LEDE 17.01 and OpenWrt 18.06, VLAN 2 should already be defined as shown below.
No further action is required. Skip the following few steps to create VLAN 2, and proceed to edit the WAN
interface settings.

89
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Otherwise, press the ‘Add’ button in bottom left corner of the windows to create a second VLAN entry.

Configure ‘WAN’ as ‘untagged’.


Configure ‘CPU’ as ‘tagged.

For LEDE 17.01.0 and 17.01.1, use:

Configure ‘Port 5’ as ‘untagged’.


Configure ‘CPU’ as ‘tagged.

Press ‘Save & Apply’ when complete.

Now navigate to Network -> Interfaces.

For the ‘WAN’ interface, click ‘Edit’.

90
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Edit the username and password to match the details provided by the ISP.

nb. The username is usually in the format username@domain

Press Save & Apply button.

To use the red WAN port, under ‘Physical Settings’, choose ‘Switch VLAN: eth0.2 (wan)’ as
shown below.

For OpenWrt 18.06:

91
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press Save & Apply button as shown below.

For LEDE 17.01.2 (or later):

For LEDE 17.01.0 and 17.01.1 where eth0.2 does not exist.
Choose ‘Custom Interface’.

92
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Enter eth1.2 into the box as shown below.

Press ‘Save & Apply’ button on the bottom of the page.

Ensure a modem is connected to the red WAN port.

For the above changes to take effect, you may need to power cycle the HH5A.

If the connection is successful, ‘Uptime’ and IPv4 address should appear.

If there is no Uptime and IPv4 address, check the protocol (eg. PPPoE), username and password. Go
to Status -> System Log and check for errors.

Disable the DSL port as described in section 9.9 to fix a known random reboot issue.

See also section 7.9 – Random WAN port MAC address fix.

The procedure is now complete.

Examples of the partial contents of the /etc/config/network file is shown below.

93
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Using the default /etc/config/network configuration file as a template, the following modifications are
required to enable the red WAN port for PPPoE when using latest versions of OpenWrt and LEDE (from
17.01.2) which make use of eth0.2:

config interface 'wan'


option proto 'pppoe'
option ipv6 'auto'
option ifname 'eth0.2'
option username 'username'
option password 'password'

config device 'wan_dev'


option name 'eth0.2'
option macaddr 'xx:xx:xx:xx:xx:yy'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
option ports '0 1 2 4 6t'

config switch_vlan
option device 'switch0'
option vlan '2'
option vid '2'
option ports '5 6t'

For LEDE 17.01.0 and 17.01.1 which uses eth1.2:

config interface 'wan'


option proto 'pppoe'
option ipv6 'auto'
option ifname 'eth1.2'
option username 'username'
option password 'password'

config device 'wan_dev'


option name 'eth1.2'
option macaddr 'xx:xx:xx:xx:xx:yy'

Disable the DSL port as described in section 9.9 to fix a known random reboot issue.

See also section 7.9 – Random WAN port MAC address fix.

94
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

9.3 Quick DHCP client setup for WAN port

If you are in the UK, see also section 7.5 for advice.

Follow the instructions given in section 9.2 for ‘Quick PPPoE client setup for WAN port’ but instead of using
the protocol PPPoE, change the Protocol to ‘DHCP Client’ as shown below.

Remember to select ‘Switch VLAN: eth0.2 (wan)’ as described in section 9.2, otherwise the red WAN
port will not function.

OpenWrt 18.06: LEDE 17.01.2 (or later):

95
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Disable the DSL port as described in section 9.9 to fix a known random reboot issue.

The MAC address of the WAN interface will change every time the hub is power cycled. To resolve this
problem, please refer to section 7.9 for more instructions.

The procedure is now complete.

Using the default /etc/config/network configuration file as a template, these are the modifications
required to enable the red WAN port as a DHCP client for latest versions of OpenWrt and LEDE (from
17.01.2) which make use of eth0.2:

config interface 'wan'


option ifname 'eth0.2'
option proto 'dhcp'
option ipv6 'auto'

config device 'wan_dev'


option name 'eth0.2'
option macaddr 'xx:xx:xx:xx:xx:xy'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
option ports '0 1 2 4 6t'

config switch_vlan
option device 'switch0'
option vlan '2'
option vid '2'
option ports '5 6t'

For versions of LEDE 17.01.0 and 17.01.1, which use eth1.2, here are the key differences to the above
file:

96
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

config interface 'wan'


option ifname 'eth1.2'
option proto 'dhcp'
option ipv6 'auto'

config device 'wan_dev'


option name 'eth1.2'
option macaddr 'xx:xx:xx:xx:xx:xy'

Disable the DSL port as described in section 9.9 to fix a known random reboot issue.

See also section 7.9 – Random WAN port MAC address fix.

9.4 Quick PPPoA setup using DSL port for ADSL Connection

If you are in the UK, see also section 7.5 for advice.

Start LuCI and go to Network -> Interfaces.

For the ‘WAN’ interface, click ‘Edit’.

97
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Now change the Protocol to ‘PPPoATM’

Edit the parameters as shown below. For the UK, use VPI/VCI: 0/38 and VC-Mux encapsulation.

Press ‘Save & Apply’ when complete.

Return to the Network -> Interfaces menu, then scroll down the page to reveal the section called
‘DSL’.

98
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The HH5A only supports Annex A on ADSL.

Amend the Annex and Tone settings accordingly.

For the Tone setting, the BT Openreach ADSL connections in the UK should use ‘A43C + J43 + A43’.

The following image shows the DSL settings required for BT/Openreach ADSL broadband connection in the
UK:

Next, it is important to delete the ATM Bridge settings as shown below.

Press ‘Save & Apply’ when complete.

99
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

IMPORTANT: For the changes to take effect, power cycle the HH5A. The DSL status is visible in Status
-> Overview menu in LUCI.

‘Status’ and ‘Data Rate’ should appear, in the DSL status section on the main Status -> Overview
page if there is a valid DSL connection.

(Note: above image is for a VDSL2 connection)

If the status is down as shown below, then recheck the DSL settings, specifically the Annex and Tone
settings. Some lines may require up to 3 minutes for the status to change from down to up after powering
up the HH5A.

If there is a valid connection to your ISP’s network, the Network -> Interfaces menu should show the
‘Uptime’ and IPv4 address.

If there is no Uptime and IPv4 address , check the username, and password settings. Go to Status ->
System Log and check for errors.

The procedure is now complete.

100
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The following shows the changes made by LuCI to the /etc/config/network file.

Using the default /etc/config/network configuration file as a template, these are the modifications
required for using PPPoA with VC-Mux encapsulation for BT WBC and Sky ADSL services.

config interface 'wan'


option proto 'pppoa'
option username 'your username'
option password 'your password'
# option username 'bthomehub@btinternet.com' # BT ADSL
# option password 'BT' # Any password. Do not leave empty
# option username 'install@o2broadband.co.uk' # Sky ADSL
# option password '' # May require random password. TBC
option vpi '0'
option vci '38'
option encaps 'vc'
option ipv6 'auto'

config dsl 'dsl'


option annex 'a'
option tone 'a'
option xfer_mode 'atm'
option line_mode 'adsl'

For PPPoA to function, remove the ‘atm-bridge’ section if it exists:

config atm-bridge 'atm'

9.5 Quick PPPoE setup using DSL port for ADSL Connection

If you are in the UK, see also section 7.5 for advice.

101
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Start LuCI and go to Network -> Interfaces.

For the ‘WAN’ interface, click ‘Edit’.

Enter the PPPoE username and password.

nb. The username is usually in the format username@domain

Press ‘Save & Apply’.

Now go to ‘Advanced Settings’. The default MTU of 1500 is too large for PPPoE connections for ADSL.
The ISP may recommend a value of 1492 or lower.

Next, go to the ‘Physical Settings’ tab.

Ensure that ‘dsl0’ interface is selected as shown below.

OpenWrt 18.06: LEDE 17.01:

102
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Otherwise, add a ‘Custom Interface’ as shown below.

If you are using the very latest OpenWrt/LEDE snapshot, then use ‘dsl0’ instead of ‘nas0’. See section
7.17.

For OpenWrt 18.06: input ‘dsl0’ followed by the Enter key. (nb. ‘dsl’ is lower-
case ‘DSL’)

Remember to press the Enter key after typing in dsl0

Press ‘Save & Apply’ button as shown below.

For LEDE 17.01: use ‘nas0’.

103
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press ‘Save & Apply’ button.

Return to the Network -> Interfaces menu, then scroll down the page to reveal the sections labelled
‘DSL’ and ‘ATM Bridges’.

Edit the parameters as shown below.

For the UK:

104
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

For the UK, VPI/VCI: 0/38 and LLC encapsulation is required for PPPoE.

Press ‘Save & Apply’ when complete.

IMPORTANT: For the changes to take effect, power cycle the HH5A. The DSL status is visible in Status -
> Overview menu in LUCI.

‘Status’ and ‘Data Rate’ should appear, in the DSL status section on the main Status -> Overview
page if there is a valid DSL connection.

105
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

(Note: above image is for a VDSL2 connection)

If the the status is down as shown below, then recheck the DSL settings, specifically the Annex and Tone
settings. Some lines may require up to 3 minutes for the status to change from down to up after powering
up the HH5A.

If there is a valid connection to your ISP’s network, the Network -> Interfaces menu should show the
‘Uptime’ and IPv4 address.

If there is no Uptime and IPv4 address, check the protocol (eg. PPPoE), username, password and
nas0/dsl0 settings. Go to Status -> System Log and check for errors.

The procedure is now complete.

The following shows the changes made by LuCI to the /etc/config/network file.

106
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Using the default /etc/config/network configuration file as a template, these are the modifications
required for using PPPoE with LLC encapsulation for ADSL services in the UK.

config dsl 'dsl'


option annex 'a'
option tone 'a'
option xfer_mode 'atm'
option line_mode 'adsl'

config atm-bridge 'atm'


option encaps 'llc'
option payload 'bridged'
option vci '38'
option vpi '0'

config interface 'wan'


option ifname 'dsl0' # (nb. ‘dsl’ is lower-case ‘DSL’)
# option ifname 'nas0' # for LEDE 17.01
option proto 'pppoe'
option username 'username'
option password 'password'
option ipv6 'auto'

9.6 Wireless Access Point

Start LuCI and go to Network -> Interfaces.

For the ‘WAN’ and ‘WAN6’ interfaces, click ‘Delete’,

followed by ‘Save & Apply’ button.

107
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

For the ‘LAN’ interface, click ‘Edit’

Assign a new IP address to the HH5A. Use an IP address which is outside of the range of your main router’s
pool of DHCP IP addresses. You may also wish to edit the other parameters shown in example below.

108
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Scroll further down the page and tick the check box for ‘Disable DHCP for this interface’.

Now press ‘Save & Apply’ button.

Under the ‘IPv6 settings’ tab, you may wish to disable these settings too:

Now press ‘Save & Apply’ button.

109
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

You may need to connect the HH5A to your existing network using Ethernet cable before you can continue
any further. Use one of the yellow LAN ports on the rear of the HH5A. (Do NOT use the red WAN port)

Point the web browser to the new IP address which was assigned to the HH5A. eg. 192.168.1.2 in above
example.

Go to System -> Startup

Disable the firewall as shown below.

You can also optionally delete the WAN interface. Go to Network -> Interfaces. Click the ‘Delete’
button for the WAN.

Important: You must also disable the DSL port, please refer to section 9.9 for more instructions.

Power cycle the HH5A when all the changes have been completed.

110
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Transfer speeds between gigabit LAN interface and Wifi interface will max out around 130+ mbps in single
thread speed tests, or 180 mbps in multithread speed tests, regardless of whether you use 3x3 802.11n
40MHz mode or 2x2 802.11ac 80MHz mode. (See section 7.12) If you require much faster throughput, you
should consider using a router or dedicated Access Point running OEM firmware. eg. AC1200 routers such
as Asus RT-AC57U, Linksys EA6350 or TPlink EAP-225 are capable of 433 mbps with 2x2 wifi devices will
perform far better than HH5A with OpenWrt in WAP mode.

9.7 Convert unused WAN port into 5th LAN port

If you do not plan to use the red WAN Ethernet port, you can change the switch configuration in LuCI to
enable it as a regular LAN port. ie. 5 LAN ports.

Start LuCI and go to ‘Network -> Switch’ menu.

If the port labelled ‘WAN’ is visible in the menu, change its status to ‘untagged’ for VLAN as shown below,
and save the new settings.

nb. Earlier versions of OpenWrt/LEDE showed switch ‘Port0 to Port5’ in the switch menu. Later
revisions of LEDE display labelled sockets ‘LAN1 to LAN4’ and ‘WAN’.

This is the changes made to the /etc/config/network file:

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 4 5 6t' # switch port 5 is the WAN port

111
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

9.8 VDSL/ADSL Bridge modem

Update (Sep’18): A new simple configuration using only wan and lan interfaces is described here.

Update (Aug’18): ADSL modem settings, not for PPPoA use, has been added, but untested.

Update (Jul’18): See also section 7.17 when ‘upgrading’ from LEDE 17.01 to OpenWrt 18.06.

This section described how to configure the HH5a as a ‘bridge’ modem. The bridge modem will be a direct
substitute for the VDSL2 bridge modems, such as the Huawei HG612 and ECI Bi-Focus modems, which BT
Openreach used to install.

New information for configuring an ADSL bridge modem is also included. Please note an ADSL bridge
modem will NOT work with ISPs which only offer PPPoA protocol. In the UK, a bridge modem is commonly
used with ISPs such as BT and Plusnet who also support PPPoE in addition to PPPoA on ADSL
connections.

For both VDSL and ADSL bridge modems, login authentication into the ISP broadband network is performed
by the externally attached router. eg. using PPPoE

Please refer to this thread on the ebilan forum any updates:

http://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=163&p=1321#p1321

Ensure your computer is connected to either the LAN 2, LAN 3 or LAN 4 socket on the rear of the HH5a.
Do NOT use the LAN 1 socket – this socket can be reconfigured for use with your external router.
Alternatively, may wish to use the red WAN port for this purpose for stable releases of LEDE from 17.01.2.

Start LuCI and go to Network -> Interfaces.

Then scroll down the page to reveal the section called ‘DSL’.

112
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The HH5A supports both Annex A and Annex B on VDSL, but only Annex A on ADSL.

Amend the Annex and Tone settings accordingly. Refer to earlier section 9.1 (VDSL) and 9.5 (ADSL) for
more advice.

VDSL connection

The following image shows the settings required for BT/Openreach FTTC (VDSL)
broadband connection in the UK. nb. Annex A may also work in some areas of the
UK.

Delete the ATM Bridge settings as shown below.

113
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press ‘Save & Apply’ button.

ADSL Connection (not for PPPoA)

The following image shows the settings required for use for non-PPPoA broadband
connections in the UK:

Enter the VCI, VPI and Encapsulation settings.

Now to delete the WAN6 interface

114
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

A popup dialogue box may appear. Press OK to continue to delete the WAN6 interface. You may need to
repeat the step again if it fails to delete on first attempt.

Press ‘Save & Apply’ button for the deletion to take effect.

Go to Network -> Switch.

If you have LEDE 17.01.2 or later, you may wish to use the default switch definition as shown below, and use
the red WAN port to connect to the external router. (This is untested)

No changes are required.

Alternatively, if you wish to use the LAN 1 port to connect to the WAN port of an external router, amend the
switch configuration as shown below:

115
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

nb. Above image shows ‘LAN1 to LAN4’ which correspond to the labelled sockets on the rear of the HH5a.

Press ‘Save & Apply’ when done.

Go to Network -> Interfaces.

For the ‘WAN’ interface (ie. LAN1 or red WAN socket), click ‘Edit’.

Choose Protocol ‘Unmanaged’

Click on the ‘Switch Protocol’ button if prompted.

116
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press ‘Save & Apply’ button.

Go to Network -> Interfaces -> WAN. Click on Edit.

Review and edit the settings so they match these shown below:

Under Advanced Settings, untick all check boxes as shown below:

Under Firewall Settings, choose Unspecified as shown below:

117
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

In Physical Settings tab, edit the settings as shown below:

For Openreach VDSL2 connection in the UK, use VLAN tag 101.

OpenWrt 18.06: enter dsl0.101 in the Custom Interface box, followed by pressing
the Enter key. (nb. ‘dsl’ is lower-case ‘DSL’)

LEDE 17.01: enter ptm0.101’ in the Custom Interface box.

For ADSL connection (not for PPPoA use):

OpenWrt 18.06: enter dsl0 in the Custom Interface box, followed by Enter key.
(nb. ‘dsl’ is lower-case ‘DSL’)

LEDE 17.01: enter nas0 in the Custom Interface box.

OpenWrt 18.06: LEDE 17.01:

Press Save & Apply button.

118
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

It should look like this for Openreach VDSL2


Add dsl0.101 to the Custom Interface box, connection showing two interfaces.
followed by pressing the Enter key.
(nb. ‘dsl’ is lower-case ‘DSL’)

Press Save & Apply button.

It should look like this for Openreach VDSL2


connection showing two interfaces.

Navigate to Network -> Firewall menu, and observe there is a default Zone Forwarding set up for LAN
to WAN interfaces. We need to remove the Forwarding.

Click on Edit button and scroll down to Inter-Zone Forwarding.

Untick the Allow forward to destination zones check box to the WAN interface as shown below.

OpenWrt 18.06: LEDE 17.01:

119
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press the Save & Apply button.

Press the Edit button for the wan zone.

Now press the Save & Apply button to clean up any redundant entries such as for the deleted wan6
interface.

OpenWrt 18.06.0 may have create a zone called ‘1’ which is redundant. Delete it so you
are left with just lan and wan zones.

IMPORTANT: For all the above changes to take effect, power cycle the HH5A after connecting the DSL
cable.

From LuCI, scroll to the bottom of the ‘Status -> Overview’ page and review the DSL status to confirm
there is a DSL connection.

120
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The status of the connection can be slightly misleading when viewing the Network -> Interfaces menu.
Specifically, the WAN interface continues to display ‘Uptime’ when the DSL cable is unplugged !

The broadband ‘b’ lamp can be used to provide an indication of DSL activity.

121
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Unticking Transmit and Receive will stop the lamp flashing when there is activity on the DSL line.

Go to LuCI -> Network -> Firewall menu.


Click on Traffic Rules tab.

It is recommended to untick the check boxes for any Traffic Rules.

Press Save & Apply button when done.

The bridge modem is ready for use. Connect the WAN/internet port from the external router to the LAN 1
port (or red WAN port) of the HH5a. Configure the external router to connect to the ISP. eg. for BT/Plusnet
VDSL or ADSL, use protocol PPPoE; for TalkTalk VDSL, use protocol dhcp etc.

In normal operation, the System Log will be repeatedly spammed with odhcpd ‘info’ messages as in
example below.

122
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

To resolve this issue, go to section 7.24 for a solution.

The remaining LAN ports labelled 2, 3 and 4 on the rear of the HH5a, can be used to access the HH5A for
modem management purposes. Ensure that DHCP server is disabled on the HH5a ‘modem’, and change the
HH5a's default IP address of 192.168.1.1 where necessary to avoid any conflict. Then simply connect a
second ethernet cable from one of these ports to a spare LAN port on your main router – see image below.
(If the external router supports VLANs, an alternative is to create a VLAN trunk, such that both wan traffic and
LuCI/ssh can both share the ‘single’ cable which connects the HH5a Bridge modem to the external router –
this is not described in this document at this time)

Beware of packet loss with certain 3rd party routers/firmwares with above wired configuration.

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=163

To disable DHCP server, navigate to Network -> Interfaces -> LAN. Click Edit.

In the General Setup tab, scroll to the bottom of the page.

123
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Go to Advanced Settings tab.

Untick ‘Use builtin IPv6-management’.

Press Save & Apply button.

When the Status -> System Log is examined, the date and time stamps will be incorrect as shown in
the first few lines in example below.

To resolve this problem, navigate to Network -> Interfaces menu.

Edit the LAN interface.

124
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Add the netmask, gateway and DNS servers, to enable the modem to find a path to the internet via the
LAN2 socket. In example below, the gateway should be set to the main router’s IP address of
192.168.1.254.

Check the system Log displays the correct date and time stamps for each entry.

If the HH5A is running LEDE 17.01.x and it is later upgraded to OpenWrt 18.06.x, the sysupgrade process
should automatically change the VLAN tag from ptm0.xxx to dsl0.xxx defined in the WAN interface. (See
section 7.17).

Contents of Bridge modem /etc/config/network file:

config dsl 'dsl'


option xfer_mode 'ptm'
option annex 'b'
option tone 'a'
option line_mode 'vdsl'
option ds_snr_offset '0'

config interface 'lan' # for LAN2 to LAN4. eg. LuCI/SSH


option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '192.168.1.254' # Point this to your main router
option dns '8.8.8.8'

config device 'lan_dev'


option name 'eth0.1'
option macaddr '02:xx:xx:xx:xx:xx'

config interface 'wan'


option proto 'none'
option delegate '0'

125
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
option type 'bridge'
option ifname 'eth0.2 ptm0.101' # LEDE 17, VLAN tag 101
# option ifname 'eth0.2 dsl0.101' # OpenWrt 18, VLAN tag 101

config device 'wan_dev'


option name 'ptm0'
# option name 'dsl0' # OpenWrt 18
option macaddr '02:yy:yy:yy:yy:yy'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 6t' # LAN2-4. eg. LuCI/SSH
option vid '1'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t' # LAN1 to external router’s WAN port
# option ports '5 6t' # red WAN
option vid '2'

Contents of /etc/config/firewall file:

config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option network 'lan'

config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network ' '

# config forwarding # Removed


# option src 'lan'
# option dest 'wan'

126
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
The actual MAC address of the physical DSL connection is not visible in LuCI, but it can be obtained by using
‘ifconfig’ command.

9.9 How to disable ‘dsl_control’ (DSL port)

If you will not be using the DSL port on the HH5a, it is strongly recommended to disable the DSL port in
LEDE.

This section was specifically created following the discovery of a bug introduced in LEDE snapshot r1635
(September 2016) and onwards. It appears when the DSL port is not being used, a bug in the VDSL app
causes unexpected high load, and can eventually cause the HH5a to crash and reboot without warning. This
usually occurs within an hour of starting the HH5A.

A patch was released in September 2017, and is included in LEDE 17.01.3 to address the above issue.

Unfortunately, another bug has been uncovered where a watchdog based reboot can occur between 24-48
hours when the DSL port is not connected to an active xdsl line. A working patch was not available for the
17.01.3 stable release.

In the meantime, it is therefore recommended to disable ‘dsl_control’ if the DSL port is not going to be
used.

Start LuCI and navigate to System -> Startup menu

Scroll down until you find ‘dsl_control’. Then click on ‘Stop’ button.

127
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Next, click on the ‘Enabled’ button

Ensure that Disabled is displayed as shown below.

Now it is recommended to shut down and restart the HH5a.

The DSL port is disabled.

Alternatively, using PuTTY connecting via serial link or Ethernet cable, you can complete the above actions
as follows at the console.

You can display the status of the DSL port with the following command

/etc/init.d/dsl_control status

The ‘Firmware Version’ and ‘Line State’ can be seen as shown below.

Now execute these two commands to disable ‘dsl_control’ and reboot the hub:

128
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

/etc/init.d/dsl_control disable

reboot

If you execute ‘/etc/init.d/dsl_control status’ command again, it should report no ‘Firmware


Version’ as shown below.

The DSL port is disabled.

9.10 Pseudo Bridge (Relayd wireless bridge)

If you require a ‘wireless bridge’, please refer to section 9.14 for links to how you may be able to configure a
wireless bridge using WDS. Alternatively, take a look at a section 9.12 for a routed option, if a bridge is not
required.

129
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Credit to ‘Mel’ on the ebilan forum for recommending an alternative ‘Pseudo bridge’. Otherwise, known as a
‘Routed client with relayd’. See comments posted in this thread:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=242

https://OpenWrt.org/docs/guide-user/network/wifi/relay_configuration

A pseudo bridge is not a complete substitute for a proper wireless bridge but it works well enough in most
applications. Up to 70+ Mbps speeds is possible over a 5 GHz wireless link to an ethernet wired device.

At the time of writing, there were some glaring mistakes in the ‘old wiki’ OpenWrt GUI instructions.

Below, you will find ‘revised’ GUI instructions which work for the HH5a.

The pseudo bridge typically takes about 43+ seconds to boot up and for its 5 GHz radio to connect to the
main wireless router.

The image above has been reproduced from the OpenWrt wiki.

Example configuration:

Main router/AP LAN IP address 192.168.1.1


Pseudo bridge LAN IP address 192.168.2.1 (unused)
Pseduo bridge wwan (w-lan) IP address 192.168.1.30
wwan (w-lan) to use ‘static’ IP address instead of DHCP-client
Using LEDE 17.x stable.

It is recommended to factory reset the HH5a.

130
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Power on the HH5a and wait a few minutes. Press and hold the Reset button on the back of the HH5A for at
least 10 seconds. Release the button when the main power light starts blinking rapidly in red colour. When
the colour changes to a constant green colour, the factory reset is complete.

After the HH5a has restarted, use a web browser and go to 192.168.1.1 and log in via LUCI.

Refer to section 9.3 and enable the red WAN port as a ‘DCHP client’. This is to enable a package to be
downloaded later.

After configuring DHCP-client, navigate to Network -> Interfaces -> LAN.

Click on ‘Edit’ button.

Change the IP address of the HH5a to occupy a subnet which you are not likely to use. This example shows
192.168.2.1 to be consistent with the example OpenWrt image shown at the beginning of this section.

Configure the gateway IP to point to the main router. Google DNS is used in example below. Update:
gateway IP is invalid. Both settings can be omitted.

Press ‘Save & Apply’ button when done.

131
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
If you are using OpenWrt 18.06, the following prompt will appear after 30 seconds. If you don’t see this
message, see section 7.28.

Simply click on the Apply unchecked button to continue.

Connect a temporary Ethernet cable from the red WAN port of the HH5a to your main router’s LAN.

After the HH5a starts up, you may need to unplug the Ethernet cable a couple of times to encourage the PC
to drop its former 192.168.1.x DHCP address, and acquire a new 192.168.2.x DHCP address.

Check your PC has internet access.

Now point a web browser to 192.168.2.1 and log into LUCI.

Navigate to System -> Software

Click on ‘Update lists’.

The page should update as shown below.

Now enter ‘Luci-proto-relay’ into the Download and install package box, then click on OK.

132
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

The Luci-proto-relay and relayd packages will now be downloaded and installed.

Unplug the temporary Ethernet cable from the HH5a’s red WAN port.

I suggest removing the WAN and WAN6 interfaces as follows.

Navigate to Network -> Firewall.

Delete the WAN zone as shown below. Remember to press the ‘Save & Apply’ button at the bottom of the
page.

Navigate to Network -> Interfaces menu.

133
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Delete both the WAN and WAN6 interfaces so you are left with just the LAN interface. You may find you have
to click the Delete button a couple of times to eventually force them to disappear. Press ‘Save & Apply’
button when complete.

When done, navigate to System -> Reboot menu, and restart the HH5a.

Check the WAN and WAN6 interfaces have not reappeared.

Next, we need to get the HH5a to join your main wireless network.

Navigate to Network -> Wireless menu.

Decide which radio you wish to use to connect to your main wireless network. In example below, I have
chosen to use the 5 GHz, radio0.

Click on ‘Scan’ button

134
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Click on the ‘Join Network’ button.

Enter the WPA passphrase for your main wireless network. The new interface will be called ‘wwan’ (default).
You can edit the name if you wish.

Press the ‘Submit’ button when complete.

In the Network -> Wireless menu, don’t worry if the ‘Wireless Overview’ seems to show the wireless
is disabled or not associated.

Navigate to Network -> Interfaces -> WWAN

Click on Edit button

Decide if you wish to keep the protocol setting as ‘DCHP client’, or change it to ‘Static address’. I
recommend a static address to avoid having to set up a DHCP IP address reservation on your main router.

135
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Click on ‘Switch protocol’ button.

Then assign a new static IP address to the wwan interface. eg. 192.168.1.30. You will be able to
manage the bridge using this IP address on both sides of the bridge.

Press ‘Save & Apply’ button to save the new settings.

Next, to create the bridge interface.

Navigate to Network -> Interfaces. Click on the ‘Add new interface’ button

136
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press ‘Submit’ button.

Enter the same static IP address as was used to configure the ‘wwan’ interface. eg. 192.168.1.30.

Tick the two boxes shown below.

Press the ‘Save & Apply’ button to save the settings.

Now to disable the DHCP server. Navigate to Network -> Interfaces -> LAN

Click ‘Edit’ button.

Scroll down the page and put a tick into the check box for ‘Disable DHCP for this interface’.

Press ‘Save & Apply’ button.

Turning our attention to the Firewall, navigate to Network -> Firewall.

137
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Scroll down to Zones section.

Choose ‘Edit’ as shown below for the ‘lan’ zone.

Confirm the settings are as shown below.

When all done, navigate to System -> Reboot menu, and restart the HH5a.

When the HH5a starts up, you may need to unplug the ethernet cable from the PC a couple of times to
encourage the PC to acquire a new DHCP IP address from your main router (eg. 192.168.1.x)

If everything is working correctly, the PC should be able to access your main LAN and the internet. You can
log into the pseudo bridge using the static IP address assigned ‘wwan’ interface. eg. 192.168.1.30

138
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
(Otherwise, you will need to configure a temporary static IP address on your PC and log into the HH5a using
its LAN interface address. eg. 192.168.2.1)

If you chose to configure the ‘wwan’ interface as a ‘DHCP-client’, it is recommended to set up a DHCP IP
address reservation on your main router. (nb. ‘wwan’ and ‘stabridge’ interfaces must both use the same IP
address, which is why I would recommend using a ‘static IP address’ instead of ‘DHCP-client’)

You may also wish to disable the DSL port, please refer to section 9.9 for more instructions.

If you change your wifi access point/router, and the the pseudo bridge refuses to connect to your new access
point even when you have configured the same SSID, passphrase and wifi channel number. To resolve the
issue, you will need the hardware mac address (BSSID) of your new wireless access point and update the
BSSID field on your pseudo bridge.

Connect a computer to the HH5A using Ethernet cable. Assign a static IP address to the computer (eg.
192.168.2.2 in above example). Then use a web browser and connect to the HH5A (eg. 192.168.2.1).

In LUCI, go to Network -> Wireless.

For the radio experiencing connectivity problems, click on Disable button

Now click on the Scan button.

Identify your access point from the list of available wifi networks. Write down BSSID and channel number.

From the main menu, go back to Network -> Wireless.

Click Edit

139
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Update the BSSID and any other wireless parameters

Press Save & Apply

Finally, click the Enable button, and the HH5A should connect successfully to your access point.

Remove the static IP address (eg. 192.168.2.2) from your computer.

The above procedure will create/amend the line ‘option bssid’ as shown below, contained within the
/etc/config/wireless config file:

config wifi-iface
option network 'wwan'
option ssid 'WifiRouterSSID'
option encryption 'psk2'
option device 'radio0'
option mode 'sta'
option key 'wifipassword'
option bssid '60:38:E0:11:11:D0' #mac address of new AP

Alternatively, try deleting the existing ‘option bssid’ line to see if it resolves the connectivity issue.

I’ve found pseudo bridge works well on 5 GHz in wireless N with 20 MHz mode and AC with 80 MHz with
LEDE 17.01.4. I’m not entirely certain, but I have observed when I upgraded to LEDE 17.01.6, I found the
wireless link between this bridge and another HH5A operating as a WAP with LEDE 17.01.6 would
occasionally drop. The Ath10k drivers are the same in both releases but there are differences to the kmod
packages. Reverting the pseudo bridge back to 17.01.4 seems to have resolved the issue.

140
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

9.11 Basic Wireless Settings

The wireless radios are switched off by default.

To enable the wireless, connect a computer to one of the yellow LAN ports and use a web browser to log into
the HH5a at the default IP address 192.168.1.1.

Navigate to Network -> Wireless

‘radio0’ is the 5 GHz wireless radio. ‘radio1’ is the 2.4 GHz wireless radio.

Press the ‘Edit’ button for the chosen radoi.

For the 2.4 GHz wireless radio, ‘radio1’:

The general advice is to use only channels 1, 6 or 11. Keep the channel bandwidth set to 20 MHz width
if you live in a congested wifi area and don’t wish to upset your neighbours by using the 40 MHz width
setting.

141
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

It is not recommended to leave the Channel set to Auto. There have been a few reports of wifi not working
after a few days of use. Stopping and starting the radio restores normal operation until the symptoms occur
again.

I recommend using different Wireless ESSID names for the 2.4 GHz and 5 GHz wireless networks, and
configure your wifi devices to connect only to one or the other. eg. you may wish your smart phone to use
2.4 GHz network for better range, and streaming devices to use 5 GHz.

In example below, I have named the 2.4 GHz wireless: ‘LEDE24’, and I would perhaps name ‘LEDE5’ for the
5 GHz wireless network. I don’t recommend introducing spaces into the ESSID name.

Click on the ‘Wireless Security’ tab.

Virtually all wireless devices manufactured after 2006 support WPA2-PSK with CCMP(AES) encryption, so I
recommend using the following settings. (If you still use Windows XP or Vista, you may need to update the
wireless drivers)

When choosing a key (wifi security passphrase), it must have a minimum of 8 characters.

I recommend a minimum of 20 characters to avoid brute force hacking attempts. If you have difficulty
remembering passwords, use a shorter password and repeat it as shown in example below. Do NOT use
dictionary searchable words if possible. eg. ‘pennygetyourownwifi’ would be a bad example.

142
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press the ‘Save & Apply’ button when you have completed all the changes.

Return to the Network -> Wireless menu.

Press the ‘Enable’ button.

If the radio is successfully enabled, the page should change as shown in example below:

For the 5 GHz wireless radio, ‘radio0’, setting up is very much the same as described above but there are
some additional considerations.

5 GHz wireless radio signals generally have a shorter range/penetration than 2.4 GHz wireless signals (The
5GHz wifi on the HH5a is particularly poor compared to other dual band routers I’ve tested), so there should

143
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
be less interference caused to or received from neighbours. However, if you live in an apartment block,
interference on the 5 GHz band is more likely to be a problem than in a street of detached properties.

Channels 36, 40, 44 and 48 are generally available to all regions across the globe.

To determine what other channels are available to use legally in your region, refer to this Wikipedia page:

https://en.wikipedia.org/wiki/List_of_WLAN_channels

If you plan to use channel numbers greater than 48, note a large number of these are allocated as DFS
channels and there is usually a delay of about 1 minute for the HH5a to verify the DFS channel isn’t being
used by a nearby radar system, before it will decide whether to start the wireless ‘radio0’.

It is not recommended to leave the Channel set to Auto. There have been a few reports of wifi not working
after a few days of use. Stopping and starting the radio restores normal operation until the symptoms occur
again. Using channel numbers greater than 48 has also been known to cause issues.

Each channel has a 20 MHz width and so if you choose to use the default values, channel 36 and width
80 MHz, then wireless radio0 can potentially use all channels from 36 to 48 in normal operation.

If you only plan to use the HH5a to access the internet, and there little or no need to transfer large volumes of
data between wifi and/or LAN devices within your LAN, you may wish to reduce the bandwidth setting.

Due to known WAN to LAN throughput problems described in section 7.12, a Width setting as or 20 MHz or
40 MHz is more than adequate for most users.

144
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

If you possess an Android phone, ‘Wifi Analyzer’ from ‘faproc’, may be helpful to assess which wireless
channels are in use.

If certain older wifi devices are having difficulties connecting, then you may need to weaken the wireless
security settings.

Try using ‘Force TKIP and CCMP (AES)’ setting:

Also try ‘WPA-PSK/WPA2-PSK Mixed Mode’:

Comparing Wifi signal strength reported by INSSIDer running on Dell laptop fitted with an Intel 6300 wireless
card, connecting to a number of high-wall-mounted AC1200 routers at a distance of 4 metres through a
plasterboarded stud wall.

2.4 GHz 5 GHz


BT HH5A (LEDE 17.01.6) -41 dBm -54 dBm
Linksys EA6350 v3 (stock FW) -40 dBm -50 dBm
tba tba tba

ie. the EA6350 v3 signal is 4dBm stronger on 5 GHz band than HH5A

145
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

9.12 Wireless client - How to share a wifi hotspot

Based on information found here:

http://lechacal.com/wiki/index.php/Repeat_a_Wifi_Hotspot

These instructions can also be used to connect to any existing wireless network, as an alternative to using a
wireless bridge or pseudo bridge.

Images below show how to connect to BT FON wifi hotspot.

If you plan to connect to your wireless access point or router, remember to change the LAN IP address of the
HH5A to use a different subnet before continuing any further. eg. if your main network uses 192.168.1.x,
subnet, then you may want to configure the HH5A to use LAN IP address 192.168.2.1 for example.

In LUCI, go to Network -> Wireless

Click on ‘Scan’

146
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Identify the wifi hotspot and click ‘Join Network’.

Accept default settings and press ‘Submit’

Now press ‘Save & Apply’.

147
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Now go to Network -> DHCP and DNS, and scroll down the page.

Untick ‘Rebind protection’ as shown below.

148
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Now to Network -> Interfaces -> WAN, and click on ‘Edit’.

Change the Protocol to ‘DHCP client’.

Press the ‘Switch Protocol’ button to confirm, and press ‘Save & Apply’.

Go to the ‘Physical Settings’ tab.

Choose the ‘Wireless Network: Client’

Press ‘Save & Apply’.

149
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Now to optionally configure your access points on the HH5a, go to Network -> Wireless.

Edit the existing entries for the unused 2.4 and 5 GHz wireless.

Finally, refer to section 9.9 to disable dsl_control.

When all done, you may need to restart the hub. Otherwise, connect to the HH5a using Ethernet or to the
wifi access point, and after some delay, your web browser should be connected to the BT wifi landing page.

150
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Here’s what I see in Network -> Interfaces

And in System -> Overview

Note that most public wifi hotspots have a timeout, so to keep the connection alive and to avoid repeatedly
having to sign back in, you will need a method to periodically access the internet. BT Wifi appears to have a
15 minute timeout. Also, BT have a ‘fair usage’ policy of 10,000 minutes per month (6 hours per day approx.)

151
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
If your HH5A has been configured to connect to one specific public wifi hotspot. It will not automatically find
and connect to another one with the same SSID. To resolve the issue, you will need to find the hardware
mac address (BSSID) of the new wireless hotspot and update the BSSID field on your HH5A accordingly.

Connect a computer to the HH5A using Ethernet cable. Then use a web browser and connect to the HH5A
(eg. 192.168.1.1).

In LUCI, go to Network -> Wireless.

For the radio experiencing connectivity problems, click on Disable button

Now click on the Scan button.

Identify the public wifi hotspot from the list of available wifi networks. Write down wifi SSID, BSSID and
channel number.

From the main menu, go back to Network -> Wireless.

Click Edit

Update the BSSID and any other wireless parameters

152
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press Save & Apply

Finally, click the Enable button, and the HH5A should connect successfully to the new hotspot.

Here is a thread reporting where only the 2.4 GHz wifi can rebroadcast SSID:

https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=1132

9.13 Smart Queue Management (QoS)

Update (Sep’18): ‘Per Packet’ overhead valued updated as recommended in OpenWrt wiki.

Smart Queue Management (SQM) is a simple to implement form of QoS (Quality of Service). Refer to the
LEDE wiki for more information. Its purpose is to minimise the effects of buffer bloat.

https://OpenWrt.org/docs/guide-user/network/traffic-shaping/sqm

Warning: Use of SQM may not be compatible with software flow offloading described in section 7.25.

In LuCI, go to System -> Software.

Click on ‘Update Lists’ if necessary.

153
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Enter ‘Luci-app-sqm’ into the Download and install package box, then click on OK.

Navigate to System -> Startup menu.

Click ‘Start’.

A new menu option called ‘SQM QoS’ should appear under the Network menu.

Under ‘Basic Settings’, choose the interface from the drop down box, for your incoming internet
connection which may also match what is visible for Network -> Interfaces -> WAN.

If you are using VDSL through the RJ11 DSL port, you could use ‘ptm0.***’ where *** corresponds to the
VLAN tag for your VDSL connection.

154
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

If you are using PPPoE, it may be advisable to choose ‘pppoe-wan’ from the drop down box. This is to
reduce to risk of SQM possibly dropping multiple PPPoE LCP packets in succession which would
automatically result in the PPPoE link (ie. internet) going down. (See also section 7.8 to increase the timeout.
I have tested SQM using interface name ptm0.101 for 6 weeks without issues when using the increased
timeout)

Determining the best ‘ingress’ and ‘egress’ values is open to experimentation. Use the following speedtester
to determine the optimum value.

http://www.dslreports.com/speedtest

In general, the ingress/egress values should be between 5 – 10% less than the maximum DSL line
speed. If you are an online gamer, you probably want to look for BufferBloat grade of A+.

155
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

For my own 55/10 mbps VDSL2 connection, BT wholesale apply an IP profile of 53.1/10 mbps. A variety of
speed test usually return 51.5/9.5 mbps with a direct Ethernet connection to the HH5A.

I originally used SQM with 52,000/9,300 ingress/egress settings which provide a BufferBloat grade of
‘A’ for many years, but lately, decided to disable SQM on ingress and maintain just 9,300 egress setting.

Without SQM, the BufferBloat grade is ‘B’, and I suffered from an issue where if my upstream connection was
saturated by FTP uploading activity, it rendered my internet connection unusable for other activities when
using DSL port on my HH5A. (I don’t suffer from this issue if I use my HH5A wired to an Openreach VDSL
modem – I read the modems may have built-in QoS to set aside upstream bandwidth for BT-wifi services.)

If I choose to use lower 48,000/8,500 ingress/egress settings, the BufferBloat grade increases to
‘A+’. Speedtesters return results in the region of 45/7.3 mbps.

For queue discipline, the LEDE wiki advises to use the following settings:

For a VDSL connection to the HH5A, here are recommended settings:

List of settings reproduced from the OpenWrt wiki:

156
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Connection type: Link Layer: Per Packet Overhead:


VDSL Ethernet 22
DSL (eg. ADSL) ATM 44
Cable Ethernet 18
True Ethernet Ethernet 38

9.14 Wireless Repeater/Extender information

Wifi repeater/Wifi extender:

There is no support in OpenWrt/LEDE due to the limitations of the Atheros wifi chipset drivers. ie. it cannot
receive and then repeat (rebroadcast) the wireless signal from another wifi router, to extend the signal. If
however you only require a wireless access point, which is hard wired to the main router, please refer to
section 9.6.

Wireless Bridge:

157
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

It is not possible to configure a single HH5a to behave as a bridge to connect wirelessly to ‘any’ existing wifi
router. It seems to be a limitation of the Atheros wifi drivers, perhaps for the same reason you cannot create
a repeater. There are some workarounds though.

It is possible to create a wireless bridge using WDS (Wireless Distribution System)

https://wiki.OpenWrt.org/doc/howto/clientmode

I briefly experimented with a pair of HH5a running OpenWrt in 2016. Although it worked, I did encounter
some issues with OpenWrt. They included:

HH5a is slow to boot up unlike other wireless bridges running Tomato firmware.

If the WDS client is rebooted, it often failed to connect to WDS access point. Rebooting the WDS
access point resolved the problem. I don’t know if this issue has been resolved with LEDE 17.

Another alternative is to consider using a pseudo bridge - see section 9.10. For a routed option, section
9.12.

9.15 UPnP

Most routers offer UPnP and is often enabled by default on ISP supplied routers and budget routers.

UPnP enables compatible apps on devices (eg. laptop, smartphone) to open up ports on the router. For this
reason, it is generally advised not to use UPnP if security is important.

If you wish to install UPnP, installing the follow package:

luci-app-upnp

158
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Ports opened using UPnP will appear in Status -> Overview -> Active UPnP Redirects page

9.16 DDNS and ICMP ping

To install DDNS, the following packages are required:

ddns-scripts
luci-app-ddns

If you plan to use DDNS services from No-IP, this additional package is required:

ddns-scripts_no-ip_com

If you only require 3 hostnames, No-IP (www.noip.com) works well in my experience and is free. Main
disadvantage is the requirement to ‘renew’ the free hostnames at least once a month by logging into the No-
IP account, otherwise, the DNS entries will expire. This becomes tedious after a while.

An alternative to No-IP is ChangeiP (www.changeip.com). There is no need to renew the DNS entries
every month with their free accounts. It offers up to 7 free dynamic DNS host entries.

159
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Important: When creating a new entry, do NOT use the hyphen (dash), ‘-‘ character for the name!
Use the underscore ‘_’ as an alternative. eg. my_ddns_entry

The following is an example for ChangeiP DDNS configuration:

I briefly looked a freedns (freedns.afraid.org), but I found it to be Very slow at propagating DNS changes.

For novices, you may wish to try duck DNS (www.duckdns.org).

160
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Note: ‘username’ is the short hostname. eg. testdns in above example.


‘password’ is the duckdns ‘token’ assigned to your duckdns account.

If you wish to be able to ping the HH5a, remember to enable ICMP ping.

Go to LuCI -> Network -> Firewall -> Traffic Rules

Tick the Enable check box for Allow-Ping and press Save & Apply button.

161
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

9.17 BT YouView

Please refer to this thread posted on ebilan forum:

https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=132&start=30#p3014

9.18 VPN

OpenVPN client, connecting to VPN service provider

Refer to this thread for download link to a supplemental document for further instructions.
https://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=279

Speed test results using www.speedtest.net or speedof.me for a number of routers I have tested:

Device OpenWrt SoC Openvpn


speed
BT Home Hub 5A 17.01.4 500 MHz MIPS VRX268 9-10 Mbps
TP-Link Archer C50 v4 r10242 580 MHz MIPS MT7628A 12-13 Mbps
Western Digital MyNet N750 17.01.4 560 MHz MIPS AR9344 13-14 Mbps
Linksys EA6350 v3 19.07-r10269 710 MHz ARM IPQ4018 26+ Mbps
(Speeds via wireless will be lower than above quoted openvpn speeds)

162
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
For faster OpenVPN speeds, you would need to consider more expensive routers and where there is support
for hardware accelerated AES encryption (crypto engine) from OpenWrt/DDWRT etc.

Asus also offer routers with OpenVPN client/server functionality out of the box. eg. The RT-AC86u (1.8 GHz
ARM) running stock AsusWrt can achieve openvpn speeds of 75 Mbps. There is also ‘custom’ AsusWrt
firmware from ‘Merlin’ which can achieve 170 Mbps according to this PIA blog when hardware accelerated
AES encryption is enabled.

https://www.privateinternetaccess.com/blog/2018/08/hardware-acceleration-is-here-for-routers-using-openvpn/

OpenVPN server:

http://OpenWrt.ebilan.co.uk/viewtopic.php?f=7&t=199

PPTP VPN client

PPTP client appears to work with LEDE 17. It does not presently work with OpenWrt up to 18.06.1 when
tested.

Start by configuring the HH5a as described in section 9.3. Then continue with the simplified LuCI setup
instructions contained in the OpenWrt wiki:

https://openwrt.org/docs/guide-user/services/vpn/pptp/client

To prevent DNS leaks, refer to the OpenVPN client guide for HH5A mentioned earlier in this section.

Maximum PPTP vpn speeds I’ve seen through HH5a is about 16 mbps which I think is poor compared to
other budget routers running Tomato and DDWRT.

An increasing number of VPN providers are also dropping support for PPTP and L2TP protocols.

If you must use PPTP or L2TP protocols, I would recommend use any router (without built-in modem)
running stock firmware to use for connecting to VPN provider. outers from Asus, Dlink, Linksys and TPlink
should work in theory. Here is a link to ExpressVPN instructions for a TPlink Archer C7

https://www.expressvpn.com/support/vpn-setup/manual-config-for-tp-link-router-with-l2tp/

Wireguard client

An increasing number of VPN providers are now experimenting with the wireguard vpn protocol. They include
Nordvpn and Mullvad.

https://openwrt.org/docs/guide-user/services/vpn/wireguard/client

163
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
I’ve tested wireguard on a HH5A, and I’ve seen speed tests return 36-40 mbps. That’s more than 4 times
faster than OpenVPN protocol.

A number of VPN providers offer LuCI based setup guides for their customers.

One important issue to remember about Wireguard, it is time sensitive. If the clock on the router is wrong,
which is often the case when router is booting up, you may not be able to pass any data through the vpn
tunnel. There are some workarounds listed in the above openwrt wiki page.

Diagnosing wireguard problems is also more difficult than Openvpn due to lack of any useful logs.

9.19 LED Configuration

The behaviour of the main power/status, broadband. and wireless LEDs can be configured within LuCI ->
System -> LED Configuration menu.

To completely turn off the power/status LED, add these settings:

To turn off the broadband ‘b’ and wireless LEDs, simply delete the settings which contain LED Name:
bthomehubv5a:XXX:broadband and bthomehubv5a:XXX:wireless

To dim all the LEDs, use these settings:

164
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

165
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

10. Other useful utilities

10.1 SSH, PuTTY , and VI editor


For novices, this is a quick summary on how to use VI editor to make ‘small’ changes to a configuration file.
Essentially, you only need to know a few things about the VI text editor:

How to start VI
How to toggle between ‘command’ and ‘insert’ mode.
How to save changes and exit VI

Editing certain VDSL settings within the /etc/config/network configuration file will be described in this
section as an example.

WARNING: The HH5A may fail to start up if you make any serious mistakes to the contents of the ‘network’
configuration file. If this happens, a serial connection, or booting up the HH5A into ‘failsafe’ mode, is required
to gain access to the console to correct the mistakes.

First of all, console access is required to the HH5A. Either a serial connection, or an Ethernet connection
can be used. PuTTY for Windows is shown below to establish a SSH connection to the HH5A over Ethernet
connection in this example. You can download PuTTY from here:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Start PuTTY, select ‘SSH’, enter the LAN IP address of the HH5A and press the ‘Open’ button.

166
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

A security alert may pop up in PuTTY. Press ‘Yes’ to close the dialogue box.

Press the ‘Return’ key to bring up the login prompt. Enter ‘root’ for the username, and corresponding
password.

At the lede prompt, use the commands below to navigate to the folder where the ‘network’ configuration file
is located. Always make a backup copy of the original file before editing it. Then use VI editor to open the
‘network’ file for editing:

cd /etc/config

cp network network.backup

vi network

The contents of the ‘network’ configuration file should be visible. Use the Up, Down, Left and Right
cursor keys to move around the file.

Examine the bottom left corner of the window. There will be a hyphen ‘-‘ symbol. This indicates VI is in
‘command’ mode.

167
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

To edit the contents of the file, press the ‘i’ key on the keyboard to toggle into ‘insert’ mode. A letter ‘I’
will appear in the bottom left corner of the VI window.

Navigate to the section called ‘config dsl’ and amend the ‘annex’ and ‘tone’ values where
necessary.

To edit the VLAN tag specified by your Internet Service Provider, navigate to the config interface ‘wan’
section.

Edit the option ifname ‘ptm0’ line accordingly.

eg. for UK VDSL use option ifname 'ptm0.101' for LEDE 17, 'dsl0.101' for OpenWrt 18
eg. for Deutsche Telekom use option ifname 'ptm0.7' for LEDE 17, 'dsl0.7' for OpenWrt 18

168
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
After editing, toggle back to ‘command’ mode by pressing the <Esc> Escape key on the keyboard. The ‘-‘
hyphen should reappear in bottom left corner of the screen.

While in command mode, here is a summary of some basic commands:

To save the changes you have made to the file, type in:

:w followed by the Return key.

To exit VI editor, type in:

:q followed by the Return key.

Note that VI will not permit you to exit, if you have not saved any changes made to the file.

To forcibly quit VI editor without saving any changes, type in:

:q! followed by Return key.

Wait a few seconds after quitting VI editor for the changes made to the ‘network’ file to be properly saved,
then enter the ‘reboot’ command, to restart the HH5A.

169
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

10.2 WinSCP

WinSCP is a free SFTP, SCP and FTP client for Microsoft Windows. The SCP file protocol can be used to
transfer files to and from an OpenWrt router.

This may be useful if you want to retrieve a copy of say the /etc/config/network file for editing later in
Microsoft Windows.

WinSCP can be downloaded from this location:

https://winscp.net/eng/download.php

Choose the ‘Installation Package’ option.

If you choose the ‘Commander’ option, this refers to the old Norton Commander interface where a single
window shows two panes. The left pane shows your PC hard drive, and the right pane shows the linux file
system.

To connect to OpenWrt, use ‘SCP’ file protocol as shown below:

170
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
WinSCP has a useful internal text editor, but I don’t recommend using it to make ‘major’ changes, because I
have found in the past it can create text files which appear as corrupt to LuCI. Also, some times when saving
any edited file, I have found they may not always be written immediately to the file system.

It is better to download the file to a computer and then use Notepad++ to edit ‘major’ changes to any
/etc/config files. Then upload it back to the hub and reboot where necessary.

WinSCP can be used to amend file permissions.

171
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

10.3 Notepad++ Text Editor

If you have to edit any linux based text files, you will discover that they are incompatible with Microsoft
Windows text editors such as Notepad and Wordpad.

Here is an alternative text editor called Notepad++ which can be downloaded from this location:

https://notepad-plus-plus.org/

Choose the ‘Notepad++ Installer’.

Ensure the ‘EOL Conversion’ menu option is set to UNIX/OSX Format as shown below when editing files for
use in Linux.

172
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

10.4 Remote Management using Windows

By default, you can use SSH (see section 10.1) or LuCI web interface to manage the HH5a when wired to
the LAN using Ethernet or wifi. This section describes how to enable remote management of the HH5a,
using information contained in these web pages:

https://OpenWrt.org/docs/guide-user/luci/luci.secure

http://system.cs.kuleuven.be/cs/system/security/ssh/setupkeys/putty-with-key.html

10.4.1 Less secure SSH and LuCI access using root password

This method is generally NOT recommended where the HH5a’s DSL or WAN interface will be connected
direct to the internet, because the HH5a could be subjected to brute force password attack. If you must use
this method then ensure the password is ‘complex’ and VERY long.

Use a web browser and log into the router.


Navigate to System -> Administration menu.

Scroll down to the SSH Access section.


Dropbear is a secure shell (SSH) server.

Click on the Add button to create a second Dropbear instance.

173
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Edit the second Dropbear instance by simply changing its Port number.

Port 22 is the default for SSH, and so this should be changed to a random high port number as a priority.
Port number 31092 is used in this example, but any number between 1024 and 65535 can be used. A list
of port numbers and their application can be found here https://svn.nmap.org/nmap/nmap-services

Leave the Interface set to unspecified for the moment. It can be changed to wan later.

Press the Save & Apply button at the bottom of the page.

Verify the new port number is working by starting PuTTY and connecting to the HH5a. Confirm the login
prompt appears for the HH5a.

Close the PuTTY session when finished.

The next step is to set up a firewall rule to permit SSH to be used through the WAN interface.

Navigate to Network -> Firewall

Click on the Traffic Rules tab

174
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Scroll carefully down the page to the end of the Traffic Rules section, about half way down the page,
until you find the Open Ports on Router section.

Specify the following parameters:

Name: Allow SSH on WAN


Protocol: TCP
External port: 31092 (in this example)

Press the Add button.


The new rule will be added to the bottom of the existing list.
Press the Save & Apply button to enable the new rule.

If your HH5a is connected to the internet, start PuTTY and connect to its public IP address. If you do not use
DDNS or possess a static IP, then you can visit whatismyipaddress.com to discover your public IP address.

175
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
The login prompt should appear. You have SSH access via the WAN interface.

Close PuTTY.

The next step is to set up a SSH tunnel so you can use LuCI.

Start PuTTY and navigate to Connection -> SSH -> Auth -> Tunnels and specify the following
parameters:

Source port: 8000 (used in this example)


Destination: 127.0.0.1:80

Press the Add button.

The Forwarded Ports box will be populated as shown below:

Navigate to Sessions and specify the following parameters:

176
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Host name: Public IP address (or DDNS)


Port: 31092 (in this example)
Saved Sessions: SSH tunnel (in this example)

Press the Save button when complete. You can use the Load button in future to reload these settings.

Press the Open button to connect to the HH5a using SSH. Enter root username and password when
prompted.

Keep PuTTY open. Do not close it.

Start and point a web browser to http://127.0.0.1:8000

The LuCI login page should appear.

177
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

If you close PuTTY, LuCI will stop working

Optional: Return to the System -> Administration menu, and change the Interface setting to wan
as shown below:

Press the Save & Apply button at the bottom of the page.

10.4.2 Secure SSH and LuCI access using public key authentication

To eliminate risk of brute force password attack on the HH5a, you can use public key authentication instead
of root password to establish a SSH connection to the HH5a.

Complete the earlier steps in section 10.4.1.

Download puttygen.exe from this website:

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Launch puttygen.exe.

Click on the Generate button and wave the mouse pointer over the blank area shown below as prompted.

178
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Enter a passphrase. This will be used to protect the private key and will be used to log into the HH5a too.

Press the Save private key button and specify a filename (eg. mykey.ppk) This will be used to set up
PuTTY.

This private key file also contains the public key, so keep this file safe.

The next step is to configure SSH on the HH5a to use public key authentication instead of root password
access.

Use a web browser and log into the router.


Navigate to System -> Administration menu.

179
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Scroll down to the SSH Access section.

Uncheck Password authentication and Allow root logins with password as shown below.

Next, the SSH-keys box requires to be populated.

Return to PuTTYgen and use the Load button to open the private key file to be used.

High light, copy and paste the contents of the Public key shown above, into the SSH-keys box shown below

180
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press the Save & Apply button.

Start PuTTY and load the SSH Tunnel settings previously created in section 10.4.1.

Navigate to Connection -> SSH -> Auth

Click on the Browse button and specify the previously saved private key file. eg. mykey.ppk

Navigate to Sessions.

Optional: You may wish to prefix the Host Name with root@ for convenience as shown below.

Press the Save button.

181
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Press the Open button to start the SSH session

Enter the passphrase associated with the private key.

Keep PuTTY open. Do not close it.

Start and point a web browser to http://127.0.0.1:8000

The LuCI login page should appear.

182
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
If you close PuTTY, LuCI will stop working.

10.4.3 Very insecure LuCI access using root password

This method is definitely NOT recommended where the HH5a’s DSL or WAN interface will be connected
direct to the internet if you are at all concerned about security. The LuCI http web interface would be
exposed to the internet and could be subjected to brute force password or other attacks. To be fair, most
consumer routers also offer remote http or https management access to their routers.

This method can be used if the HH5a is protected behind another primary router. For example, the HH5a
may be configured as a VPN client router, and its red WAN port is wired to the LAN port of another router so
it can be conveniently managed from the LAN side of the primary router.

Navigate to Network -> Firewall

Click on the Port Forwards tab

Scroll down to the New port forward section, and add the following parameters:

Name: LuCI via WAN


Protocol: TCP
External Port: see below
Internal IP address: eg. 192.168.1.1 (LAN IP address of the HH5a)
Internal Port: 80

If the HH5a’s WAN interface will NOT be directly wired to the internet, you can keep default port 80.

183
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

Otherwise, if the HH5a’s will be wired directly to the internet, use a random port number between 1024 and
65535. A list of port numbers and their application can be found here
https://svn.nmap.org/nmap/nmap-services

Port number 31091 is used in this example

Press the Add button to add the new settings to the bottom of the Port Forwards list.

Press the Save & Apply button at the bottom of the page to enable the new settings.

Start a web browser and confirm LuCI login page appears when you specify the WAN side IP address.
Append the port number where necessary.

Eg. myHH5awanIPaddress:31091

184
OpenWrt/LEDE Installation Guide for BT Home Hub 5A

185

You might also like