Setting up 3G/4G/LTE modem¶
With PiKVM, you can create a portable device to work in a distant environment without a permanent wired internet connection. A cellular modem in combination with any VPN like Tailscale is also an excellent backup for emergency access to the host.
Choosing a modem¶
PiKVM supports a huge number of USB modems. If the modem works with a desktop Linux, it will work with PiKVM as well.
Mini-PCI on PiKVM V4 Plus¶
PiKVM V4 Plus has an internal Mini-PCI and built-in SIM card slot for installing a modem. Please note that only modems with USB data lines are supported.
Here is a list of good modems that you can start with:
An antenna and an SMA pigtail are also required to use the modem.
When choosing an antenna, check the supported frequency list of your cellular ISP and the antenna itself.
Setting up the connection¶
Change default passwords if you haven't done so earlier. It's very important for the security.
Cellular networks can open your device to the big world. PiKVM is safe if you use a strong password, so...
✮ ✮ ✮ CHANGE THE PASSWORDS! ✮ ✮ ✮
PiKVM comes with the following default passwords:
- Linux admin (SSH, console, etc.): user
root
, passwordroot
. - PiKVM Web Interface (API, VNC...): user
admin
, passwordadmin
, no 2FA code.
These are two separate entities with independent accounts.
To change passwords, you will need to use the console access via SSH or the Web Terminal.
If you are using the Web Terminal, enter the su -
command to get the root
access (enter the root
user password).
[root@pikvm ~]# rw
[root@pikvm ~]# passwd root
[root@pikvm ~]# kvmd-htpasswd set admin
[root@pikvm ~]# ro
If you require additional user for the Web UI access, use the following:
[root@pikvm ~]# kvmd-htpasswd set <user> # Set a new user with password or change of an existing one
[root@pikvm ~]# kvmd-htpasswd del <user> # Remove/delete a user
Optionally you can enable the two-factor authentication for more security.
Changing the VNCAuth passkey and IPMI password at the first start of PiKVM is not required, since these services are disabled by default. But it is here just so that you remember their existence.
-
Update the OS and reboot.
Updating PiKVM OS
To update, run following commands under the
root
user:[root@pikvm ~]# pikvm-update
If you encounter an error like:
[root@pikvm ~]# pikvm-update bash: pikvm-update: command not found
It's most likely you have an old OS release. You can update the OS as follows:
[root@pikvm ~]# rw [root@pikvm ~]# pacman -Syy [root@pikvm ~]# pacman -S pikvm-os-updater [root@pikvm ~]# pikvm-update
Next time you will be able to use the usual method with
pikvm-update
. -
Make filesystem writable using
rw
command. -
Install NetworkManager and ModemManager:
[root@pikvm ~]# pacman -S modemmanager networkmanager
-
Create file
/etc/NetworkManager/conf.d/pikvm-unmanaged.conf
with following content:[keyfile] unmanaged-devices=*,except:type:gsm
-
Run the services:
[root@pikvm ~]# systemctl enable --now NetworkManager ModemManager
-
Make sure that ModemManager detects your modem. You will see something similar after
mmcli
, modem0
is detected here:[root@pikvm ~]# mmcli --list-modems /org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] SIMCOM_SIM7600G-H
-
View the modem
0
information:[root@pikvm ~]# mmcli -m 0 ----------------------------------- General | path: /org/freedesktop/ModemManager1/Modem/0 | device id: ... ----------------------------------- Hardware | manufacturer: QUALCOMM INCORPORATED | model: SIMCOM_SIM7600G-H | firmware revision: LE20B04SIM7600G22 | carrier config: ROW_Gen_VoLTE | carrier config revision: ... | h/w revision: 10000 | supported: gsm-umts, lte | current: gsm-umts, lte | equipment id: ... ... ----------------------------------- Status | lock: sim-pin | unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10) | state: locked | power state: on ...
-
Set up the connection. You will need the APN value (from the mobile ISP) and PIN-code for the SIM:
[root@pikvm ~]# nmcli c add type gsm ifname '*' con-name pikvm-lte gsm.apn cytamobile gsm.pin 1234
pikvm-lte
is just a meaning name of the connection, use any you like.gsm.apn cytamobile
sets APN value tocytamobile
(will be different for other ISP).gsm.pin 1234
sets PIN for unlocking the SIM card. If the SIM is not locked, omit these words.
Depending on the ISP, you may need to specify a password and/or some other parameters.
-
Make the connection automatically connected:
[root@pikvm ~]# nmcli connection modify pikvm-lte autoconnect yes
-
The connection will already be working:
[root@pikvm ~]# nmcli cdc-wdm0: connected to pikvm-lte "cdc-wdm0" gsm (option, qmi_wwan), hw, iface wwan0, mtu 1500 ip4 default inet4 XXX.XXX.XXX.XXX/XX route4 XXX.XXX.XXX.XXX/XX metric 700 route4 default via XXX.XXX.XXX.XXX/XX metric 700 ...
-
Perform
reboot
.
To set up a Tailscale VPN, refer to this page.