USB 4G LTE-Advanced Modem Router Configuration Documentation (TPE-USB4GLTE)

Using our USB 4G LTE-Advanced Modem with ThinkPenguin routers under libreCMC and similar embedded distributions
(directions have been vetted under libreCMC 1.4.9, 1.5, 1.5.2, 1.5.3, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10 but you will need the latest version to install packages from the libreCMC repository as described below)

For the TPE-R1300 upgrade to 1.5.10 (assuming this is the latest release):

https://librecmc.org/librecmc/downloads/snapshots/v1.5.10/targets/ath79/...

0. Directions on flashing the above nor image are here (please note that the directions suggest flashing the OEM ISO version, but that will not work with the 4G modem, so don't do that, utilize the libreCMC version of the image above instead as this is what we test these directions against): https://www.thinkpenguin.com/gnu-linux/vpn-mini-wireless-router-firmware...

1. Connect an Ethernet cable from the router's LAN port to your computer (disconnect your computer from any wifi networks while your at it), plug the USB power cable (white) from your router's micro USB port to a USB port on a computer or the included USB power adapter, and finally connect your USB 4G modem from the USB A port on the mini router to the micro USB port on the 4G modem (don't forget to insert the SIM card and connect the antennas first too).
2. Power the router on (plug in the USB cable to power it) and wait a minute for the router to boot up.. then...
3. Open a browser and go to https://192.168.10.1 (the IP address for a router with a default ThinkPenguin configuration, also you will need to add a security exception to actually bring up the routers login page)
4. Login (either there is no default password or the password is the word "none" without the quotes)
5. If no password is set go to System > Administration and set a password, hit save to save the password
6. Set a router IP address for the router that won't conflict with that of your modem by going to Network > Interfaces and click the Edit button that is next to LAN
7. Under where it says IPv4 address enter 192.168.8.1 and click Save & Apply. You will need to wait till it says "Configuration has been rolled back!" and click the Apply anyway button. Once you get a error message saying "Device unreachable!" you can power off the router (unplug the USB power cable).

8. You will need to temporarily connect an ethernet cable from the WAN port on the mini router to a modem (non-USB) or upstream router with internet access, and then power on the mini router (plug the USB cable back in to power it on) in order to install the packages needed to connect a USB 4G modem (from your PC's network applet you may need to disconnect and then reconnect to obtain a new IP address from the router too).

Open a web browser and go to https://192.168.8.1. You may see a message like "Warning: Potential Security Risk Ahead", but it's ok. Click Advanced > Accept the Risk and Continue. Then login to the router.

Then go to: System > Software

Click the Update lists... button ... (and Dismiss button when finished, assuming no errors)

If you see "Failed to decode signature" it probably means the package repository for the release isn't available and you are on the wrong version of libreCMC. You need to update to the latest librecmc.org non-OEM version.

In the "Download and install package:" box enter the following packages and hit OK button to install each. When prompted "Really attempt to install package-name?" click the install button. Click Dismiss button when finished and repeat for each package.

Packages you need to install (if you copy and paste make sure there are no spaces in front of the package name or you will get an error messaging indicating the package does not exist):

usb-modeswitch
kmod-usb-wdm
uqmi
kmod-usb-net-qmi-wwan
luci-proto-qmi

Packages you may want to install (if you plan to use OpenVPN with the USB cellular modem):

openvpn-openssl

Packages you may want to install (if you plan to use Wireguard for VPN with the USB cellular modem):

wireguard
luci-proto-wireguard
luci-app-wireguard

Our modems ship by default in MBIM (unless QMI was otherwise selected) for out-of-the-box support in most major desktop GNU/Linux distributions. However embedded distributions for routers such as libreCMC and other forks are currently best supported when in QMI mode. These directions thus require the modem to be set in QMI mode.

Follow the directions in the links below for setting your modem/chip in QMI mode.

Switching Between QMI & MBIM Modes with a USB 4G-LTE Advanced Modem (/w a LT4120 chip, TPE-USB4GLTE)

Switching Between QMI & MBIM Modes with a USB 4G-LTE Advanced Modem (/w a EM7455 chip, TPE-USB4GLTE)

The manual directions are below for configuring a router to work with one of our USB 4G modems now that you have the needed software installed, but there is an easier way. You can upload our default 4G configuration for connecting to the internet via one of our USB 4G modems. To do that simply login at https://192.168.8.1 and go to System > Backup / Flash Firmware and click the browse button under where it says restore. You can download the default 4g configuration here (configuration file name is qmi-configured-router-w-usb-4g-modem-att-reseller-apn-default-configuration-libreCMC-2022-07-18.tar.gz). One other note is you'll still need to set the APN after uploading this configuration. To do that you have to login at 192.168.8.1 and go to Network > Interfaces, then click the edit button next to WWAN0. Fill in the APN for your cellular provider and then click the Save & Apply button (and anything else that is required for your provider). Then go to System > Reboot and click the Perform reboot button. That is it. You should now be connected.

Alternatively do it the manual way below:

For the LT4120 model there is one additional step required to configure the router to work with the modem in QMI mode on libreCMC. We need to set the router to a particular configuration on top of having the modem in QMI mode.

Open a terminal and run the follow command (the password requested upon entering the following command is that in which you set to login to your router, and the IP of the router):

ssh root@192.168.8.1

Notes: For those unfamiliar with the vi text editor you'll need to know a few things to actually edit the usb-mode.json file which is required to have the modem come up in the right mode. Once you've scrolled down and found the devices section you need to hit the "a" key on your computer. This puts you into an editing mode. Then you can scroll down and add the lines as directed below. When done you need to save this file. To save hit the escape key on your keyboard, then hit the ":" key on your keyboard. This will let you enter commands into the vi text editor. Type out "wq!" to save and quit. Keep in mind this is all without the quotes. Type exit and hit the enter key, do it twice to exit the ssh session and close out of your terminal window.

Run the command:

vi /etc/usb-mode.json

Then use your keypad to scroll down to the "devices" : { section and find the line with the following device ID "03f0:9d1d".

Replace "config" with "bConfigurationValue" and 0 with 3 so it looks like this:

"03f0:9d1d": {
"*": {
"msg": [ ],
"bConfigurationValue": 3
}
},

9. Reboot the router (you can type reboot and hit enter after you exit vi)
10. Go to https://192.168.8.1 in your browser, then log back into the router
11. Go to Network > Interfaces and click the Add new interface... button
12. Enter a name for the interface, example WWAN0
13. Under the Protocol of the new interface drop down menu select QMI Cellular and hit the Submit button
14. In the APN box enter your cellular providers APN info, ie probably broadband for AT&T, vzwinternet for Verizon, and three.co.uk for Three (see info for some providers in our other provider specific documentation)
15. In the PIN box enter the PIN (if your cellular provider requires it) provided by your cellular provider
16. Enter any other user name/password information your cellular provider requires
17. The Modem device box should have /dev/cdc-wdm0 in it or you should be able to select /dev/cdc-wdm0 if you have the USB modem plugged into a USB port on the router
18. Click the Save & Apply button
19. Under Network > Interfaces click the Delete button that is next to WAN for both the WANs that say "Protocol: DHCPv6 client" and "Protocol: DHCP client"
20. Click Save & Apply
21. Go to System > Reboot and click Perform Reboot button
22. Log back into the router at https://192.168.8.1 and under Network > Interfaces and click the Edit button next to WWAN0
23. Click the Firewall Settings tab
24. Create / Assign firewall-zone select wan: (empty) (it will become wwan0)
25. Click the Save & Apply button
26. Unplug your WAN to modem/upstream router ethernet cable
27. Go to System > Reboot and click Perform Reboot button
28. On your computer go to the network applet and disconnect from the network, then reconnect

You should now be able to access the internet via your router's USB connected cellular modem.

29. To enable wifi and set a password for the access point on the mini router continue as follows
30. Go to Network > Wireless and click the Enable button next to the librecmc SSID access point name
31. To set a password for the access point click the Edit button next to the libreCMC SSID access point
32. Then go to the Wireless Security tab and select WPA2-PSK under Encryption
33. In the Key box enter the password you would like to use for your access point
34. Click the Save & Apply button

Troubleshooting notes:

You may need to power off the router and power it back on, but if the modem does not come back up then re-connect the modem, login to the router and go to Network > Interfaces and click the connect or restart button under where it says WWAN0

You may need to click on your computers network applet and disconnect/reconnect from the wired connection

If everything was working for you and things have stopped working you may need to unplug the modem, plug it back in, login to the router, and go to the Network > Interfaces tab and click reconnect / connect button (the cellular provider may have timed you out after so many hours)

Please note: The white cable included with the router provides power only. It is not a USB data cable which means if you attempt to utilize the white cable to connect the 4G USB modem to the mini router the device will not be detected by the modem even if the blue light comes on indicating that there is power. You can utilize either the optional High Quality Nylon 3FT Micro USB Cable To USB-A (107545) cable or the black USB-A cable included with the USB 4G modem.

If you want to switch to a different cellular provider log back into the router at https://192.168.8.1 and under Network > Interfaces and click the Edit button next to WWAN0. Here you can change the APN and other cellular provider info to switch between AT&T, Verizon, and other providers. Don't forget to switch your SIM card after updating and reboot the router/modem.