Notes on the Huawei E8372h and the A5-V11

Some miscellaneous notes on the Huawei E8372h (Telstra 4GX dongle) and the A5-V11 router:

Unlocking the E8372h

I followed the steps from here, it seemed to work fine. I did it in a VM. A copy of the files required can be found here.

Summarised:

  1. Use Huawei Flash Code to get some numbers
  2. Install the serial drivers from FcSerialDrv.rar and Huawei_Drivers.rar
  3. Use E8372_switch_mode.7z to switch it into serial mode (I had to modify to use 192.168.1.1); ignore the stuff about DC unlocker
  4. Downgrade the firmware using E8372_firmware_downgrade.7z
  5. Use SalluhassanNewHuaweiLowDotNet.exe to unlock
  6. Upgrade the firmware again

Apart from the WiFi/Wingle functionality, when you connect via USB, it may present itself differently depending on how it has been configured. The default mode for this is the Hilink mode; it appears as a network adapter, with all configuration handled inside the dongle itself.

It is possible to switch it into stick mode (aka. NCM/NDIS mode) - in this case, it presents three TTYs (supposedly MDM on ttyUSB0, diag on ttyUSB1 and PCUI on ttyUSB2). From this mode, you can issue AT commands on ttyUSB0. You can also send SMS’es via AT commands - I don’t know why the web interface doesn’t expose this. For completeness, you can’t dial numbers/make phone calls via this interface (likely beause it’s a 4G stick).

Frustratingly, when in stick mode, I could not get a connection via NCM instead of via the CDC ethernet/Hilink mode. While I could get as far as getting wwan0, issuing a dhclient -v wwan0 on it yielded no results. It happily accepts the AT^NDIDSUP=1,1,"apn" command, but seemlingly does nothing with it. I’m guessing that the WiFi facilities are somehow interfering with this from working. It would be interesting to compare this against the E3372 which doesn’t have the WiFi functionality.

How to get it into Stick/NCM mode

I did this on Linux. If you have a new enough usb_modeswitch, you can use the alternative Huawei mode switching function:

Modify /etc/usb_modeswitch.conf:

1
HuaweiAltModeGlobal=1

Alternatively, you can manually switch it via:

1
sudo usb_modeswitch -v 12d1 -p 1f01 -M 55534243123456780000000000000011063000000000010000000000000000

You can switch to Hilink mode ia the ‘new’ Huawei switching mode, or manually via

1
sudo usb_modeswitch -v 12d1 -p 1f01 -M 55534243123456780000000000000011062000000101000100000000000000

Before running mode switching, it presents as a CD drive with the USB ID of 12d1:1f01. Switching to stick mode, it becomes 12d1:155e. In Hilink mode, it is 12d1:14db. The full lsusb output in each of these modes may be found here.

This pdf I found on the internet was also pretty good in explaining the details on mode switching, expected device IDs and the NDIS connection procedure (although it didn’t work for me).

OpenWRT on the A5-V11

This was my first foray into seriously trying to use OpenWRT. The device itself is pretty neat, and it’s cheap. Performance/throughput is perhaps not the best, but I’m still up for testing this. The main limitation is the 4MB flash, which makes it hard to fit everything that you’d want onto it.

The stock image that you can download from OpenWRT includes LuCI (the web GUI) and opkg (the package manager). You can’t really install much else on it though. Using the image builder, you can customise it a little bit further, but it’s still pretty hard. I’d recommend just building it from scratch, as that way you can really build just the stuff you need. Notably:

I was able to get SQM, USB network support (for the Huawei E8372h in Hilink/CDC ethernet mode; it shows up as eth1) and USB storage support (ext4 only, it got too large when I tried to add vfat support) while retaining LuCI. opkg and IPv6 support were removed. Configs and images are here:

Steps for building

1
2
3
4
5
6
7
8
git clone http://github.com/openwrt/openwrt
cd openwrt
./scripts/feeds update -a
./scripts/feeds install luci-proto-ncm luci-app-sqm luci-app-firewall
./scripts/feeds install luci-mod-admin-full luci-theme-bootstrap luci-base
make menuconfig #select stuff to install
make download #had to manually download u-boot into dl/
make -j4 #bins in bin/targets/ramips/rt305x/

Flashing from the stock image

It’s described on this page, but in summary:

1
2
3
4
5
telnet 192.168.100.1 #admin/admin
mount /dev/sda1 /mnt
mtd_write write  /mnt/uboot_usb_256_03.img Bootloade
mtd_write write /mnt/firmware.bin Kernel
reboot

Modified usbmode

OpenWRT runs a gimped usb mode switcher - it’s not the same as the usb_modeswitch found on normal distros, but it does use that package for the definitions (transformed into json). Notably it doesn’t support switching using the alternate sequence to get the E8372h into stick mode. This patch allows it to use that mode; you still have to modify /etc/usb-mode.json to actually use HuaweiAlt.

This is how I modified the section in that json file:

1
2
3
4
5
6
7
8
                "12d1:1f01": {
                        "*": {
                                "t_vendor": 4817,
                                "t_product": [ 5339, 5340, 5470 ],
                                "mode": "HuaweiAlt",
                                "msg": [  ]
                        }
                },

Ultimately, I couldn’t get NCM mode to work with the E8372h, although this might be useful for other sticks.

Comments