This is a straight repost of what I wrote before, so it still refers to
the Huawei instead of the ZTE. One thing I should've mentioned in my
first post, but forgot, is that I had to disable IP6 addressing within
the LAN, because many dongles don't seem to support it:
I thought I'd try and summarise in one, albeit long, post how to hack
successfully a BT Home Hub 5a (BTHH5a), put an OpenWRT image on it, get
a Huawei E3372s working with it, and add a public WiFi network.
A) Physical Stage
Requires:
USB to Serial 3.3V TTL cable
Small soldering iron to work at a level of fine detail
Solder
4 different coloured lengths of very thin insulated flex, say
whiTe Transmit
Red Receive
Blue Boot short
Green Ground
Optional:
Veroboard (or equivalent) - 70 x 32mm, 2.54mm pitch
4 x pins for above
Female 4-way SIL connector, 2.54mm pitch to connect to above
4 x 1mm dia x 2-3mm length self-tapping screws
Hand drill with approx 1mm drill bit
Means of safely making a hole around 12mm in diameter
Hacksaw to trim Veroboard
Smooth file, for example a warding file, to clean up edges
Hand lens to check your soldering work.
1) Remove the label from its holder at the middle top of the back,
and put it aside out of harm's way for now.
2) Remove the back of the clam-type casing with a pen-knife blade,
flat-bladed screw-driver, or similar. Noting that at the middle of the
top the join between the two halves is between the two grills - in
other words slightly back from the front rim - starting there, and
pushing the tool far enough in to separate the two halves well before
levering it over to push them apart - don't over force it or you'll
break the plastic clips - work out to each top-corner, then down each
side, finally each bottom corner, then it should just come apart. There
is a video here:
https://www.youtube.com/watch?v=XhE_QpLFvpM
If you aren't planning to mount permanent connections to the PCB, you
can skip the following and go to step 13.
3) Unscrew the two self-tapping screws holding the PCB to the back of
the casing, and remove the PCB. Put it aside out of harm's way for now.
4) Examine the inside of the back at the top, just behind the label
slot on the outside. Note that there are four convenient little
protruding cylinders roughly behind each corner of the label slot. You
are going to cut out a piece of Veroboard the same size as the removable
label and mount it on the inside using these cylinders as mounting
points. Also, you will drill or otherwise make in the middle of the
label slot a hole about 12mm in diameter to allow four pins to be
accessible without having to open up the casing again. Hopefully the
result will look something like this:
https://www.macfh.co.uk/Temp/BTHH5a%20Rear.jpg
5) Begin by getting a hand-drill with around a 1mm bit, or whatever
size will just fit snugly inside each of those four protruding
cylinders, and drill through to the outside. Later, these will each
take a self-tapping screw.
6) Prepare the Veroboard. Preferably, you want the copper strips
going horizontally, that is parallel to the longest edge. With hacksaw
and file, cut out and smooth the edges of a piece to cover these four
mounting points - the removable label makes a convenient template for
the size.
7) Being careful not to allow the new holes you are about to make to
be be pushed off centre by existing holes in the Veroboard, drill four
holes to match the positions of the above cylinders/mounting points.
8) From the coppered side of the Veroboard, insert four standard
Veroboard/Breadboard pins in a vertical line, one in each of four
successive copper-strip rows, so that as a whole they're as near to the
centre point of the four mounting holes as possible.
9) Mark out on the inside of the back casing where the four pins will
be - they should be as near as possible to the middle of the label
slot. Drill - if drilling work stepwise outwards with increasing
drill bit sizes, to avoid breaking the plastic - or otherwise cut a
hole that will be large enough to allow access to the pins when the
Veroboard is mounted inside the casing, preferably with no pin being
closer than about 2mm from the edge of the hole, so about 12mm diameter
should be adequate - a plug such as the following should be able to be
connected to the pins:
https://www.ebay.co.uk/itm/4-Pin-Dupont-Housing-2-54mm-Pitch-Terminal-Connectors-UK/272536936185
10) Decide on the order for the pins - if you have existing kit
that your USB-Serial cable is sometimes used on, it obviously makes
sense to wire this header the same as that; apart from that, put Boot
next to GND. Feed the ends of the four corresponding coloured insulated
cables from the coppered side of the Veroboard, up to the uncoppered and
back down the next hole to the coppered side, so that the board will act
as a cable grip, and the end of each finally comes out one hole away
from its pin. Strip the ends, twist them, and solder them to the pins.
Gently feed any slack back through the 'cable-grip'.
11) With the self-tapping screws mount the Veroboard with the pins
sticking out through the large hole in the centre of the label holder,
and the cables hanging down inside. If the screws protrude beyond the
surface of the back into the label holder, level them off with a file.
12) Either now, or after the next step, replace and mount the PCB,
being careful to align the sockets with the holes in the casing, and
bringing out the cables around the edge of it for soldering to the back
of the PCB.
13) As per the instructions and annotated photos on this page ...
https://openwrt.org/toh/bt/homehub_v5a
... solder the ends of the cables to their corresponding attachment
points. As the scale of the work is very small, you are advised to
check the results with a hand lens or magnifier, if you have one.
14) Attach your USB-Serial cable (MUST be 3.3v TTL) to the pins or
the ends of the cables and plug it into your PC. Run Putty or other
such serial console program and open a connection window for the
connection via the USB-Serial lead to the HH5a. Connect a LAN port of
the HH5a to a PC, connect the router to the mains, and power it up. If
you see log output in the serial console program, then all should be
good. Power down the router.
15) Switch off the router, and leaving the other three serial
connections intact, with a bent paperclip or similar short Boot to GND
while switching on the router. If the boot log stops at UART, you're
good to go, otherwise you've erred and will have to revisit the steps
above to find your error.
B) Firmware Stage
You need to be running a TFTP server on the PC connected to the HH5a,
and have the chosen first boot image described on the above linked page
within the server's root directory.
16) Taking up the instructions on the OpenWRT BT Home Hub 5a page
linked above, at the 'UART' wait, load one of the specified *.asc files
into Notepad or equivalent, select all of it, copy this selection into
the clipboard, and then paste it into the Serial console window. You
should see a succession of stars as the data is read slowly into memory,
until eventually the code is run and finally a prompt appears.
17) Now follow the linked OpenWRT page to complete upgrading the
firware to OpenWRT. Once done, you should be able to do without the
serial cable and replace the front of the router.
C) Huawei E3372s USB 4G stick
!!!IMPORTANT!!! Note that the Huawei E3372s (serial) and Huawei E3372h
(hilink) models are *differently configured* versions of the *same*
hardware (in other words their firmware differs). The notes below refer
to the 's' (serial) models. Do not try to apply them to the 'h'
(hilink) models.
[2022: The hilink models are like the ZTE model in use now]
18) Using Putty or other equivalent serial console program, log in to
the router's serial console at ...
192.168.1.1
... and run the following command:
opkg update && opkg install chat comgt comgt-ncm kmod-usb-net
kmod-usb-net-cdc-ncm kmod-usb-net-huawei-cdc-ncm kmod-usb-serial
kmod-usb-serial-option kmod-usb-serial-wwan kmod-usb-wdm luci-proto-3g
luci-proto-ncm usb-modeswitch wwan && reboot; exit
The above is meant to be all on one line but will be broken up by most
newsgroup software, so you will likely have to reassemble it. For
clarity the commands given are:
opkg update
opkg install
chat
comgt
comgt-ncm
kmod-usb-net
kmod-usb-net-cdc-ncm
kmod-usb-net-huawei-cdc-ncm
kmod-usb-serial
kmod-usb-serial-option
kmod-usb-serial-wwan
kmod-usb-wdm luci-proto-3g
luci-proto-ncm
usb-modeswitch
wwan
reboot
exit
19) When the router comes back up, in a browser, enter as the address ...
192.168.1.1
... and via the ribbon menu at the top, navigate to Network, Interfaces.
20) Click 'Add new interface' and enter the following settings, any
others not mentioned can be left on their default setting ...
General Setup
Protocol: NCM
Modem device: /dev/cdc/wdm0 or /dev/ttyUSB0
APN: Mobile suppliers' recommendation
PIN: If there's one set on your SIM
Advanced Settings
Bring up on boot: Yes
Use built-in IPv6: Yes
Firewall Settings
Firewall Zone: Add this interface to 'wan'
... then click 'Save & Apply'. If the USB stick was not plugged in at
last boot, plug it in now and choose System, Reboot from the ribbon
menu. In fact you may have to reboot anyway.
Hopefully on reboot the new USB interface should come up working.
If not, here is the relevant section of my /etc/config/network file:
config interface 'WAN_USB'
option proto 'ncm'
option device '/dev/cdc-wdm0'
option pdptype 'IP'
option apn '
goto.virginmobile.uk'
option pincode 'xxxx'
option ipv6 'auto'
... and here is Andy Burns' from the recent long convoluted thread ...
config interface 'LTE'
option ifname 'wwan0'
option proto 'ncm'
option mode 'auto'
option apn '3internet'
option ipv6 'auto'
option delegate '0'
option skipinit '1'
option peerdns '0'
option device '/dev/ttyUSB0'
option pdptype 'IP'
option auto '0'
You may also find the following has some useful information:
https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm
There are also other methods of using USB dongles linked from the top of
that page - ppp, qmi & mbim, rndis.
D) An extra public WiFi SSID to allow guests to access the internet
without being able to access your LAN. This is described here ...
https://openwrt.org/docs/guide-user/network/wifi/guestwifi/guest-wlan-webinterface
... but note that you may have to go round some steps twice to fill-in
cross-references to other sections, once they have been created.
Remaining Problems:
I never got multi-wan failover to work. Seemingly however I
configured it, if both the ADSL and the USB interfaces were enabled
together, I always ended up on the slow speeds of the ADSL interface.
Exactly as was happening with DHCP clients beyond a client-bridge
(now fixed), PCs being booted via a W9x DOS environment for imaging
using Ghost hang at the DHCP stage. Only a problem on the old Dell
Latitude D600 XP laptop, because for some reason or other it can't see
the D: partition to save images to, but now it can't be imaged via the
network either, so now it must be imaged to a large enough USB stick,
which flogs the stick and takes ages.