Manual Modem Connection
Full control, but carries some risks
We strongly recommend you let the iface manager
handle the modem automatically. Don't try these steps unless you have a specific need and you know what you are doing. The main reason you would want to do this is when you need to use a specific APN and the auto-connect script is detecting and using the wrong one.
If you wish to manually define a modem configuration, then do the following steps, in order.
Figure out which mode is active
Simply run the following command to get the current mode
Find the modem
Find all available modems and establish if you are using legacy or WWAN mode. The following command will attempt to identify all available modems. The output will vary depending on the mode.
All serial interfaces will be checked to see if they respond to modem commands (that is, AT commands).
Find the network code
These are 2 numbers, the mcc
(mobile country code) and mnc
(mobile network code). To find these numbers, run the following command, using the modem device found in the previous step. There's no need to list the full path (but you can if you like).
[OPTIONAL] Inspect the available APNs
If you wish to see which APN(s) are being used by the modem, the run the following command using the mcc and mnc from the previous step, for example
Create config file
PLEASE NOTE: once you manually create a netctl config file called modem
, then iface-manager will NOT attempt to auto-manage the modem.
Creating the file modem
in /etc/netctl
will configure netctl to use the modem to connect to the Internet. The following is an example configuration. The User
and Password
parameters are usually not required and can be removed.
The Init
parameter is optional and we strongly discourage using it unless absolutely necessary. It is here for demonstration purposes only.
Tell iface-manager to restart the modem
If access to the internet is lost for any reason, iface-manager
will attempt to restart network interfaces (ethernet and wifi) in an attempt to restore access. Since the modem is not a "network interface", iface-manager
will ignore it, unless we explicitly tell it to restart the modem if there's no internet access available.
WWAN
It's also important to ensure that the network interface associated with the modem is completely ignored by iface-manager
We also need to make sure that the modem is started after the ModemManager service. Create the following file (if you are logged into the console of the device, you can simply run systemctl edit --full modem
):
And then run systemctl daemon-reload
.
Remove any auto files
Be sure to remove any modem-auto
interface
Check everything is working as expected
Either reboot the device or start the interface with the command
Last updated