'LEDE Install Image' and 'OpenWrt Installation Guide for BT Home Hub 5A'
'LEDE Install Image' and 'OpenWrt Installation Guide for BT Home Hub 5A'
.
LEDE Install Image by 'mkresin'
v1.0 (3 Nov 2017) - Adds Business Hub 5 support. See next post.
v0.1 (6 Nov 2016)
For 1st time installation of LEDE 17/OpenWRT 18 and snapshots after r2363 (Nov 2016).
https://github.com/mkresin/BTHH5a-installimage/releases
5 Apr 2018 - 'aszeszo' has found a way to enable SSH on BT stock firmware, see
viewtopic.php?f=14&t=1051&p=2953#p2951
IMPORTANT: To upgrade from LEDE prior to r2363 (30 Nov 2016) or OpenWRT (Jan 2018), please read this first:
http://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=180
A serial-TTL adapter must be wired to solder pads on the HH5a's circuit board to be able to install LEDE for the first time. Instructions to boot the LEDE Installation image using Windows is located here:
http://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=138
NEW Nov 2019 - Vitalii Tereshchuk has created 3 youtube videos which may be of interest.
https://www.youtube.com/playlist?list=P ... GU5WX51gcG
Part 1 - 12 minutes struggling to open the HH5A case when it can normally be opened in a minute with a metal spudger - see my 'How to Open HH5A case' guide.
Part 2 - shows his soldering work.
Part 3 - best of the three videos. Using wireless laptop instead of ethernet. There is a mistake where LAN IP of ISP router providing wifi, and HH5A are the same. This is likely to prevent TFTP file transfer from working.
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Summary of contents of the 200+ page PDF document.
1. Introduction
2. How to boot the LEDE install image
3. How to back up BT firmware
4. How to install LEDE for the first time
5. How to restore stock BT firmware
6. How to upgrade from an earlier version of OpenWRT/LEDE prior to r2363
7. Installation Troubleshooting (see 7.5 for UK ISP info)
8. Buttons
9. Popular Hub configurations
10. Other useful utilities
Download the "OpenWrt/LEDE Installation Guide for BT Home Hub 5A" PDF document, and other useful guides from this dropbox folder:
https://www.dropbox.com/sh/c8cqmpc6cacs ... Jq88a?dl=0
Mirror:
https://www.dropbox.com/sh/qf0vuiavwakr ... rTQNa?dl=0
LEDE Install Image by 'mkresin'
v1.0 (3 Nov 2017) - Adds Business Hub 5 support. See next post.
v0.1 (6 Nov 2016)
For 1st time installation of LEDE 17/OpenWRT 18 and snapshots after r2363 (Nov 2016).
https://github.com/mkresin/BTHH5a-installimage/releases
5 Apr 2018 - 'aszeszo' has found a way to enable SSH on BT stock firmware, see
viewtopic.php?f=14&t=1051&p=2953#p2951
IMPORTANT: To upgrade from LEDE prior to r2363 (30 Nov 2016) or OpenWRT (Jan 2018), please read this first:
http://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=180
A serial-TTL adapter must be wired to solder pads on the HH5a's circuit board to be able to install LEDE for the first time. Instructions to boot the LEDE Installation image using Windows is located here:
http://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=138
NEW Nov 2019 - Vitalii Tereshchuk has created 3 youtube videos which may be of interest.
https://www.youtube.com/playlist?list=P ... GU5WX51gcG
Part 1 - 12 minutes struggling to open the HH5A case when it can normally be opened in a minute with a metal spudger - see my 'How to Open HH5A case' guide.
Part 2 - shows his soldering work.
Part 3 - best of the three videos. Using wireless laptop instead of ethernet. There is a mistake where LAN IP of ISP router providing wifi, and HH5A are the same. This is likely to prevent TFTP file transfer from working.
OpenWrt/LEDE Installation Guide for BT Home Hub 5A
Summary of contents of the 200+ page PDF document.
1. Introduction
2. How to boot the LEDE install image
3. How to back up BT firmware
4. How to install LEDE for the first time
5. How to restore stock BT firmware
6. How to upgrade from an earlier version of OpenWRT/LEDE prior to r2363
7. Installation Troubleshooting (see 7.5 for UK ISP info)
8. Buttons
9. Popular Hub configurations
10. Other useful utilities
Download the "OpenWrt/LEDE Installation Guide for BT Home Hub 5A" PDF document, and other useful guides from this dropbox folder:
https://www.dropbox.com/sh/c8cqmpc6cacs ... Jq88a?dl=0
Mirror:
https://www.dropbox.com/sh/qf0vuiavwakr ... rTQNa?dl=0
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
mkresin has published LEDE install image v1.0.
Both the new and previous versions of the Install image, along with release notes, are hosted on this web page:
https://github.com/mkresin/BTHH5a-installimage/releases
The new install image is uncompressed and hence grown from 3.31MB to 10.9MB in size. This shaves up to 1 minute off the boot time when started from lede*u-boot.asc file.
Feel free to report your experience with the new Install Image v1.0 in this thread. If you do encounter a problem, please report your findings and any workarounds.
USB instability causes hub to reboot
(from section 7.11 of the Installation Guide)
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 you try to list the contents of the drive using 'ls' command, some times no file or directory is found. When this happens, wait one minute and try again. Do not unplug and reinsert the USB flash drive, because the started LEDE image may crash and reboot. The new Install image v1.0 may be more sensitive to this issue than original install image v0.1.
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 some drives are not compatible.
A thread on LEDE forum describing USB instability problems on HH5A:
https://forum.lede-project.org/t/solved ... hot/8346/7
Update (May 2018):
I’ve discovered a workaround. After using TFTP to transfer the LEDE Installation image v1.0 to the HH5a, simply wait for the main Power LEDE to turn solid blue colour before attempting to insert USB flash drive.
Both the new and previous versions of the Install image, along with release notes, are hosted on this web page:
https://github.com/mkresin/BTHH5a-installimage/releases
The new install image is uncompressed and hence grown from 3.31MB to 10.9MB in size. This shaves up to 1 minute off the boot time when started from lede*u-boot.asc file.
Feel free to report your experience with the new Install Image v1.0 in this thread. If you do encounter a problem, please report your findings and any workarounds.
USB instability causes hub to reboot
(from section 7.11 of the Installation Guide)
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 you try to list the contents of the drive using 'ls' command, some times no file or directory is found. When this happens, wait one minute and try again. Do not unplug and reinsert the USB flash drive, because the started LEDE image may crash and reboot. The new Install image v1.0 may be more sensitive to this issue than original install image v0.1.
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 some drives are not compatible.
A thread on LEDE forum describing USB instability problems on HH5A:
https://forum.lede-project.org/t/solved ... hot/8346/7
Update (May 2018):
I’ve discovered a workaround. After using TFTP to transfer the LEDE Installation image v1.0 to the HH5a, simply wait for the main Power LEDE to turn solid blue colour before attempting to insert USB flash drive.
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
Thanks to Bill and mkresin.
A few suggestions to hopefully make the process a little more flexible...
You don't have to use default IP addresses
Ref: Bill's LEDE Installation Guide for BT Home Hub 5a - section 2.5
Custom U-Boot (####-lantiq-brhomehubv5a_ram-u-boot.asc) assumes tftp server address is 192.168.1.2 and BT bootloader assumes 192.168.1.10 but you can reconfigure both the router's own IP address and tftp server's to one that suits your existing network:
Set router's IP address for a different subnet (use any address that is suitable for your current network):
Set router to fetch from tftp server (use your laptop/PC's IP address and put the install image in your tftpboot folder):
Now fetch and boot the LEDE install image as usual:
NOTE: I haven't tried setting router and tftp server addresses with BT bootloader (VR9 # prompt) but it's very likely to be able to do it in the same way since ipaddr and serverip variables have been a part of u-boot for a long time...
Use netcat to transfer images between HH5A / +NET Hub1 and your computer (instead of using a USB stick)
As an alternative to Bill's LEDE Installation Guide for BT Home Hub 5a - section 3.3
I use Linux and spend a lot of time at the command line, this should also be possible on a Windows machine although you may need to use Cygwin (https://www.cygwin.com/) to do so...
I find it handy to be able to see file transfer progress to know that something is actually going on. Linux's Pipe Viewer tool does the trick which you may have to install since it's not included as part of most distributions (install Pipe Viewer using your package manager, using Fedora this would be 'sudo dnf install pv').
Wait for the LEDE install image to start networking after tftp booting. NOTE the install image runs rather slowly and networking doesn't start until several minutes after the image boot starts (over 4 minutes when I did it). Wait for ethernet / br-lan messages indicating that networking has started (make sure you have an Ethernet cable plugged in or you won't see these):
Set the router's address to suit your network if necessary, e.g.:
Make sure that the port you use for netcat is allowed through your firewall and prepare your PC to receive the NAND Flash image:
The 'hh5a-mtd4-nanddump' file will be created in the current directory.
Send the NAND image from the router:
This takes 20+ minutes when UART booting the LEDE/OpenWRT u-boot, Pipe Viewer will display a progress bar in your PC's console.
NOTE: (not verified) it is probably much quicker to dump the NAND image by interrupting BT's U-Boot (VR9 prompt) but you have to update the U-Boot environment to be able to do that and won't be fetching your original untouched NAND image (although only U-Boots environment will be different)
As an alternative to Bill's LEDE Installation Guide for BT Home Hub 5a - section 4.2
Follow Bill's guide to the point where the 'prepare' script has completed (about a third of the way down page 18 of rev1.6 of Bill's guide.
NOTE: you will have to set the router's IP address again if you have rebooted the router for some reason since dumping the NAND image.
Use scp to transfer the LEDE squashfs image to the router (Assuming the LEDE squashfs file is in your /tftpboot folder):
NOTE: rename of LEDE upgrade image to shorter 'sysupgrade.bin' is purely for convenience
Finally perform the upgrade:
Tiny CORRIGENDA to section 3.3 of Bill's guide: Each bad block reduces the size by 131,072 bytes (16128kb).
[bill's comment: Thank you for spotting the error.]
A few suggestions to hopefully make the process a little more flexible...
You don't have to use default IP addresses
Ref: Bill's LEDE Installation Guide for BT Home Hub 5a - section 2.5
Custom U-Boot (####-lantiq-brhomehubv5a_ram-u-boot.asc) assumes tftp server address is 192.168.1.2 and BT bootloader assumes 192.168.1.10 but you can reconfigure both the router's own IP address and tftp server's to one that suits your existing network:
Set router's IP address for a different subnet (use any address that is suitable for your current network):
Code: Select all
BTHOMEHUBV5A # set ipaddr 192.168.100.200Code: Select all
BTHOMEHUBV5A # set serverip 192.168.100.33Code: Select all
BTHOMEHUBV5A # tftpboot 0x81000000 lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin; bootm 0x81000000Use netcat to transfer images between HH5A / +NET Hub1 and your computer (instead of using a USB stick)
As an alternative to Bill's LEDE Installation Guide for BT Home Hub 5a - section 3.3
I use Linux and spend a lot of time at the command line, this should also be possible on a Windows machine although you may need to use Cygwin (https://www.cygwin.com/) to do so...
I find it handy to be able to see file transfer progress to know that something is actually going on. Linux's Pipe Viewer tool does the trick which you may have to install since it's not included as part of most distributions (install Pipe Viewer using your package manager, using Fedora this would be 'sudo dnf install pv').
Wait for the LEDE install image to start networking after tftp booting. NOTE the install image runs rather slowly and networking doesn't start until several minutes after the image boot starts (over 4 minutes when I did it). Wait for ethernet / br-lan messages indicating that networking has started (make sure you have an Ethernet cable plugged in or you won't see these):
Code: Select all
[ 254.944693] device eth0 entered promiscuous mode
[ 255.253953] device eth0.1 entered promiscuous mode.
[ 255.572822] br-lan: port 1(eth0.1) entered forwarding state
[ 255.581010] br-lan: port 1(eth0.1) entered forwarding state
[ 257.583311] br-lan: port 1(eth0.1) entered forwarding stateCode: Select all
root@lede:/# ifconfig br-lan 192.168.100.200Code: Select all
[uglybug@fedora-laptop homehub5]# firewall-cmd --add-port=60000/tcp
[uglybug@fedora-laptop homehub5]# ncat -l 60000 | pv -s 128m > hh5a-mtd4-nanddumpSend the NAND image from the router:
Code: Select all
root@lede:/# nanddump /dev/mtd4 | nc 192.168.100.33 60000NOTE: (not verified) it is probably much quicker to dump the NAND image by interrupting BT's U-Boot (VR9 prompt) but you have to update the U-Boot environment to be able to do that and won't be fetching your original untouched NAND image (although only U-Boots environment will be different)
As an alternative to Bill's LEDE Installation Guide for BT Home Hub 5a - section 4.2
Follow Bill's guide to the point where the 'prepare' script has completed (about a third of the way down page 18 of rev1.6 of Bill's guide.
NOTE: you will have to set the router's IP address again if you have rebooted the router for some reason since dumping the NAND image.
Use scp to transfer the LEDE squashfs image to the router (Assuming the LEDE squashfs file is in your /tftpboot folder):
Code: Select all
root@lede:/# scp uglybug@192.168.100.33:/tftpboot/lede-17.01.4-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin /tmp/sysupgrade.binFinally perform the upgrade:
Code: Select all
sysupgrade /tmp/sysupgrade.binTiny CORRIGENDA to section 3.3 of Bill's guide: Each bad block reduces the size by 131,072 bytes (16128kb).
[bill's comment: Thank you for spotting the error.]
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
I spent a whole afternoon going mad trying to install LEDE on my second BT HH5a and I would like to let others know that the instructions for serial ASCII booting may not work on some newer linux kernels. Specifically the instruction from https://wiki.openwrt.org/toh/bt/homehub_v5a for "cat lede-lantiq-bthomehubv5a_ram-u-boot.asc > /dev/ttyUSB0" in a second terminal does not work anymore while picocom is up. I suspect concurrent access to the serial device is not allowed anymore but it may be something else. Nothing gets sent to the serial port by the cat command (I thought I have a damaged motherboard or serial adapter).
I realized that picocom allows file transfers as well using some external programs. Here are my instructions to ascii boot that do not require a second terminal:
--------------------------------
Serial Boot (needs picocom and ascii-xfr):
--------------------------------
1) start picocom on the host computer:
picocom -b 115200 /dev/ttyUSB0 --send-cmd "ascii-xfr -s -n"
2) boot with boot_sel2 low short time until CFG 04 shows up - force a boot of an ascii image
3) in picocom press Ctrl+a Ctrl+s to trigger send file and input the ascii image file name (make sure you have proper path)
lede-lantiq-bthomehubv5a_ram-u-boot.asc
4) after file transfer is complete the image is booted and a root prompt shows up. The default tftp server address is 192.168.1.2.
5) on the serial terminal download a bigger more fully featured install image to RAM using tftp (this isn't permanent)
tftpboot 0x81000000 lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin; bootm 0x81000000
6) on the serial terminal boot that image. image takes up to 4 minutes to boot. Again, nothing permanent
[bill's comment: Excellent advice. I can confirm it works for Mint 17.3. I will update the OpenWRT wiki later with your tip to use Ctrl+a Ctrl+s]
[sorin's comment: It seems the cat command is working fine. I was to tired to spot a typo in it.
I realized that picocom allows file transfers as well using some external programs. Here are my instructions to ascii boot that do not require a second terminal:
--------------------------------
Serial Boot (needs picocom and ascii-xfr):
--------------------------------
1) start picocom on the host computer:
picocom -b 115200 /dev/ttyUSB0 --send-cmd "ascii-xfr -s -n"
2) boot with boot_sel2 low short time until CFG 04 shows up - force a boot of an ascii image
3) in picocom press Ctrl+a Ctrl+s to trigger send file and input the ascii image file name (make sure you have proper path)
lede-lantiq-bthomehubv5a_ram-u-boot.asc
4) after file transfer is complete the image is booted and a root prompt shows up. The default tftp server address is 192.168.1.2.
5) on the serial terminal download a bigger more fully featured install image to RAM using tftp (this isn't permanent)
tftpboot 0x81000000 lede-lantiq-xrx200-BTHOMEHUBV5A-installimage.bin; bootm 0x81000000
6) on the serial terminal boot that image. image takes up to 4 minutes to boot. Again, nothing permanent
[bill's comment: Excellent advice. I can confirm it works for Mint 17.3. I will update the OpenWRT wiki later with your tip to use Ctrl+a Ctrl+s]
[sorin's comment: It seems the cat command is working fine. I was to tired to spot a typo in it.
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
The instructions mention a "prepare" script - where can I find this?
and is it the same script for HH3?
and is it the same script for HH3?
---\/\/\/\/\---||--- (RC)
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
you can find all scripts here: https://github.com/mkresin/BTHH5a-insta ... s/usr/sbin
these scripts are not compatible with the HH3 (HH5A's u-boot env is encrypted, HH5A uses a different partition layout and AFAIR a different filesystem)
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
Thanks
---\/\/\/\/\---||--- (RC)
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
A suggestion to add for page 34, ads in UK
I had to explicitly disable ipv6 in interfaces/wan/advanced to get it up an running on a BT connection.
Was looking at the ppp log file and noticed when ipv6 setup fails no fall back is done to ipv4 login. As soon as I switched off ipv6, all info for ip came in (dns, gateway etc etc)
Peter
Comment by bill: Thanks. I presume you are referring to the 'Use builtin IPv6-management
' check box. I will incorporate your suggestion into a future release of my Guide.
I had to explicitly disable ipv6 in interfaces/wan/advanced to get it up an running on a BT connection.
Was looking at the ppp log file and noticed when ipv6 setup fails no fall back is done to ipv4 login. As soon as I switched off ipv6, all info for ip came in (dns, gateway etc etc)
Peter
Comment by bill: Thanks. I presume you are referring to the 'Use builtin IPv6-management
' check box. I will incorporate your suggestion into a future release of my Guide.
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
Hello
An other suggestion for page 6.2 on page 27.
It is mentioned that the LEDE partition is usually on mtd4. Am I right it is always on partition named "ubi"? If that is the case it might be worth mentioning the following info in that section
When issuing 'cat /proc/mtd' look for the partition name "ubi" and use the related dev name in nanddump.
cat /proc/mtd
dev: size erasesize name
mtd0: 000a0000 00020000 "u-boot"
mtd1: 00020000 00020000 "uboot-env"
mtd2: 00040000 00020000 "unused"
mtd3: 07e80000 00020000 "ubi"
The above example shows the LEDE (ubi) partition being located on /dev/mtd3
If you want to make a backup from HH5 that is already booted into LEDE, you need to install the following modules to be able to mount a usb device from the shell prompt, you need to install the following kernel extension modules; kmod-usb-storage, kmod-scsi-core and kmod-nls-cp437.
To get access to the nanddump utility you need to install the nand-utils software package
Peter
An other suggestion for page 6.2 on page 27.
It is mentioned that the LEDE partition is usually on mtd4. Am I right it is always on partition named "ubi"? If that is the case it might be worth mentioning the following info in that section
When issuing 'cat /proc/mtd' look for the partition name "ubi" and use the related dev name in nanddump.
cat /proc/mtd
dev: size erasesize name
mtd0: 000a0000 00020000 "u-boot"
mtd1: 00020000 00020000 "uboot-env"
mtd2: 00040000 00020000 "unused"
mtd3: 07e80000 00020000 "ubi"
The above example shows the LEDE (ubi) partition being located on /dev/mtd3
If you want to make a backup from HH5 that is already booted into LEDE, you need to install the following modules to be able to mount a usb device from the shell prompt, you need to install the following kernel extension modules; kmod-usb-storage, kmod-scsi-core and kmod-nls-cp437.
To get access to the nanddump utility you need to install the nand-utils software package
Peter
Re: 'LEDE Install Image' and 'Installation Guide for BT Home Hub 5A'
8.3 WPS Button
It says
Search on the page for - WPS doesn't work out of the box on OpenWrt or LEDE, you need to: .....
The quick version:
shoulders
p.s. I hope this is the right place to post guide updates.
Comment by bill: Thank you. I have updated the Installation Guide
It says
I got it to work. My original instructions: https://quantumwarp.com/kb/articles/25- ... one-routerNot supported by LEDE. Not programmable.
Search on the page for - WPS doesn't work out of the box on OpenWrt or LEDE, you need to: .....
The quick version:
- remove wpad-mini
- install wpad
- install hostapd-utils
- You will now have the option to enable WPS in LuCI under: (Network-->Wireless-->Edit-->Interface Configuration-->Wireless Security-->Enable WPS pushbutton, requires WPA(2)-PSK)
shoulders
p.s. I hope this is the right place to post guide updates.
Comment by bill: Thank you. I have updated the Installation Guide
