4.6 KiB
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...
{!_passwd.md!}
-
Update the OS and reboot.
{!_update_os.md!}
-
Make filesystem writable using
rwcommand. -
Install NetworkManager and ModemManager:
[root@pikvm ~]# pacman -S modemmanager networkmanager -
Create file
/etc/NetworkManager/conf.d/pikvm-unmanaged.confwith 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, modem0is detected here:[root@pikvm ~]# mmcli --list-modems /org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] SIMCOM_SIM7600G-H -
View the modem
0information:[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 1234pikvm-lteis just a meaning name of the connection, use any you like.gsm.apn cytamobilesets APN value tocytamobile(will be different for other ISP).gsm.pin 1234sets 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.