This guide will let you fully utilize the LTE module on the A06 model of uConsole.
This is a updated translated version of a part of my blog written in Chinese. For Chinese version, please visit this page.
The CM4 variant of uConsole used a different way to manage the power of the LTE modem, and CM4 RaspberryOS system doesn’t have some quirk like A06 Armbian Ubuntu based system does. This guide is for A06 variant.
For some part of this guide, this guide still can be applied for the CM4 variant.
Please acknowledge that if your modem have upgraded to 9011 firmware (RNDIS mode, shown a
usb0 network interface), then most part of this guide CANNOT work on your upgraded firmware. You need to downgrade it to stock 9001 firmware. However there is no information and firmware package for 9001 firmware downgrade from 9011 provided by ClockworkPi, maybe contact to uConsole dev team can help.
Please use the official guide: https://github.com/clockworkpi/uConsole/wiki/How-to-use-the-4G-extension#cm4
The stock system image had a script to enable or disable the LTE modem.
For A06 variant this will be
Powering on the modem by running:
sudo uconsole-4g enable
It will be almost certain that if you have 9001 firmware on your LTE modem, the ModemManager won’t pick up the modem immediately due to how ModemManager detects the modem and how LTE modem power up sequence timing works.
Usually a manual restart for
ModemManager service can solve the issue.
sudo systemctl restart ModemManager.service
Also available on: https://gist.github.com/SuperMarioSF/baea9fc13fc320e5a002c58cf107bd10
Note: It is recommended to use this part AFTER you configured everything else in this guide.
It is tedious to power on the modem every time you need to use it. So powering on the LTE modem on boot may be useful. In this part you can configure your LTE modem to power on during the system boot and power off during system shutdown.
The downside of the approach is a 30s delay during system shutdown sequence, because there is no good way for systemd to ignore a service during shutdown when stop action is configured. But this will properly power off the LTE modem, so this should be a good thing.
For 9001 firmware user: The ModemManager will be started or restarted with the LTE modem automatically, so no need for manual restart ModemManager every time after powering on the LTE modem. If LTE modem service is stopped, the ModemManager service will also be stopped. This behavior won’t affect 9011 firmware user.
Became root, and write two files to systemd configuration.
/etc/systemd/system/uConsoleLTE.service: A direct convert from
uconsole-4gscript to a systemd service unit file. Provide
uConsoleLTEservice for managing power of LTE modem.
[Unit] Description=uConsole LTE Module After=polkit.service Requires=polkit.service Before=ModemManager.service PropagatesReloadTo=ModemManager.service [Service] Type=oneshot RemainAfterExit=yes TimeoutStartSec=20 TimeoutStopSec=35 # Setup PWRKEY pin ExecStartPre=/usr/bin/gpio mode 34 out # Setup RESET pin ExecStartPre=/usr/bin/gpio mode 33 out # Set RESET pin to high ExecStartPre=/usr/bin/gpio write 33 1 # Set PWRKEY pin to high ExecStartPre=/usr/bin/gpio write 34 1 # Delay for module to properly reseted ExecStartPre=/usr/bin/sleep 2 # Set RESET pin to low ExecStartPre=/usr/bin/gpio write 33 0 # Wait for module to boot up ExecStart=/usr/bin/sleep 13 # Wait for ModemManager to properly shutdown. ExecStop=/usr/bin/sleep 5 # Setup PWRKEY pin ExecStop=/usr/bin/gpio mode 34 out # Set PWRKEY pin to low ExecStop=/usr/bin/gpio write 34 0 # Set PWRKEY pin to high ExecStop=/usr/bin/gpio write 34 1 # Delay for module to properly send power off signal ExecStop=/usr/bin/sleep 3 # Set PWRKEY pin to low ExecStop=/usr/bin/gpio write 34 0 # Delay for module to power off ExecStop=/usr/bin/sleep 20 [Install] WantedBy=multi-user.target
/etc/systemd/system/ModemManager.service: A modified ModemManager service configuration, added
BindsToto sync with the state with
uConsoleLTEservice given above.
[Unit] Description=Modem Manager After=polkit.service Requires=polkit.service ConditionVirtualization=!container BindsTo=uConsoleLTE.service [Service] Type=dbus BusName=org.freedesktop.ModemManager1 ExecStart=/usr/sbin/ModemManager StandardError=null Restart=on-abort CapabilityBoundingSet=CAP_SYS_ADMIN CAP_NET_ADMIN ProtectSystem=true ProtectHome=true PrivateTmp=true RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_QIPCRTR NoNewPrivileges=true User=root [Install] WantedBy=multi-user.target
After written the systemd configuration file, reload systemd configuration to apply.
sudo systemctl daemon-reload
Configuring LTE modem auto start on boot:
# Enable auto start and also start modem now sudo systemctl enable --now uConsoleLTE # Disable auto start sudo systemctl disable
Manually powering on and off the LTE modem:
# Powering on sudo systemctl start uConsoleLTE # Powering off sudo systemctl stop uConsoleLTE # Power cycle sudo systemctl restart uConsoleLTE
If your LTE modem had already upgraded to 9011 firmware, then after you power on the modem, there will be a
usb0 interface in your system. Configure it as a normal Ethernet interface with DHCP will just work.
For stock 9001 firmware there will be more settings involved.
This part of settings is required only on 9001 firmware.
First, install the broadband provider information package for NetworkManager, and restart the NetworkManager to apply.
sudo apt install mobile-broadband-provider-info sudo systemctl restart NetworkManager.service
After that, you can configure the LTE modem connection profile. Head to the network connection settings, add a “Mobile Broadband” network, then follow the setup wizard.
You should see your LTE modem is available, and you need to pick the correct Cellular Network Operator and the correct APN accordingly. If you don’t know what APN you should use, or your Cellular Network Operator is not in this list, ask your Cellular Network Operator for configuration, or just Google it.
After the configuration, enable the connection you just created, and you will be online.
This feature only work on stock 9001 firmware.
This should be an easy one.
Gnome provided a software called
gnome-calls, a dial pad and caller UI.
sudo apt install gnome-calls
After installing the package, start the Gnome Calls software once, and it will be automatically registered as a auto startup (minimized) for your desktop session. Next time a phone call is incoming, the caller UI will show up and you can decide to pick it up or not.
Due to some missing settings currently there will be no ringtone, only the caller UI window will show up. If you missed a call there will be a notification shown.
You need to use a wired earphone connect to the 3.5mm earphone port on the LTE modem side (left side of machine). The earphone should be a 3.5mm TRRS plug, and wired like this:
T - Left R - Right R - Microphone S - Ground
Depends on your region this wiring maybe different (usually the Microphone and Ground pin swapped for USA users on their earphone.) so you need to do some test about this.
You won’t able to be talking via system side of the audio, so if you plugged the earphone to the system side (right side of the machine), you won’t able to hear or talk to the other side of the phone. And for the exact reason you can’t use the Bluetooth audio for calling. The modem simply doesn’t have any audio connection to the system side, the I2S audio interface is directly connected to a DAC onboard the LTE modem module and wired to the earphone port on the module.
Plus, the system side doesn’t even have a microphone hardware (by default). This is about the maximum privacy you can get.
By the way, if you prefer the dark theme, here is a command to turn all the Gnome application into dark theme:
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
Please note, if you are not logged in (thus Gnome Call is not started) or your uConsole is in sleep state, you won’t able to have a phone call notification. If the system goes to sleep during a call, your call won’t be interrupted, but you need to wake up the system in order to hang up the call from your side.
This feature only work on stock 9001 firmware.
You can use ModemManager-GUi for receiving and sending SMS.
Install the ModemManager-GUI.
sudo apt install modem-manager-gui
Due to a bug introduced in Ubuntu 22.04, ModemManager-GUI no longer properly launches by default. There is some workaround required.
After installed the ModemManager-GUI package, before launching it, run following commands first.
sudo mv /usr/lib/aarch64-linux-gnu/modem-manager-gui/modules/libmodcm_nm09.so /usr/lib/aarch64-linux-gnu/modem-manager-gui/modules/libmodcm_nm09.so_
This command will rename the NetworkManager 0.9 plugin for the ModemManager-GUI, and this plugin will not be loaded by ModemManager-GUI after this, avoiding the crash caused by this plugin.
Without this plugin, features like controlling the connection within ModemManager-GUI and traffic usage accounting will not available. You can still manage your LTE connection with NetworkManager directly.
After the installation (and maybe some workaround), you can launch the ModemManager-GUI. The default settings can be used once the first-run wizard shown.
By default ModemManager-GUI won’t start with your desktop session. If you didn’t launch the ModemManager-GUI you won’t able to receive SMS. Further more, by default there is no notification feature configured for incoming SMS. Following steps will fix these.
From the main window, on the menu: Edit - Preferences
- In “Behavior” tab, check “Hide window to tray on close” and “Add program to autostart list”.
- In “SMS” tab, under “Custom command”, fill following content into “Command” textbox:
notify-send --icon /usr/share/modem-manager-gui/pixmaps/sms-tb.png -t 60000 '%n' '%t'
Click “Apply” to save settings.
When closing the ModemManager-GUI window for the first time you will be asked for minimized to tray, choose the minimize to tray and select never ask again.
By default ModemManager-GUI tray icon is a totally transparent blank icon, this is due to the icon theme doesn’t have a proper icon for notification. Install and select another icon theme can solve this.
sudo apt install numix-icon-theme
In system appearance settings change to Numix icon theme, after this the tray will have a bell icon for ModemManager-GUI.