======== CELLULAR ======== .. sidebar:: Contents .. contents:: :depth: 3 :local: The cellular interface provides connection to mobile broadband networks using standards defined by 3GPP (3rd Generation Partnership Project). 3GPP has defined a wide range of standards (such as GSM, GPRS, UMTS, HSDPA, LTE, 5G) with different properties: range of coverage, minimum achievable latency, downlink/uplink max throughput, etc. The cellular interface is implemented using "modules" from different vendors. Depending on the "module" installed in each device, the cellular interface will have different capabilities. Operational commands :osdx:op:`interfaces cellular show capabilities` can be used to list the cellular interfaces that are configurable on the system, as well as any relevant information on the "modules" installed. *Example:* .. code-block:: none admin@osdx$ interfaces cellular show capabilities cell0 Module Manufacturer: Quectel Module Model: EC25E Module Firmware: EC25EFAR06A01M4G_TEL Hardware Revision: 10000 IMEI: 866308062070222 Radio Interfaces: gsm, umts, lte Data Service Capability: non-simultaneous-cs-ps Maximum TX/RX rate supported: 50000/100000 Kbps Bands: gsm-dcs-1800, gsm-900-extended, gsm-900-primary, wcdma-2100, wcdma-850-us, wcdma-900 LTE bands: 1, 3, 5, 7, 8, 20, 38, 40, 41 Profile ======= Once the cellular interfaces available in the system are known, they can be configured. To do this, the first thing to do is define a cellular profile that will be later assigned to the cellular interface being configured. To create a cellular profile, use the :osdx:cfg:`cellular profile *` command to give it a name and adjust the different parameters: * ``apn``: configures the APN (Access Point Name) used to establish the connection to the mobile broadband network (mandatory). * ``username``: configures the username to be used in network authentication. * ``password``: configures the password to be used in network authentication. * ``auth``: configures the protocol to be used in network authentication. One of the following values (default, **both**) can be selected. * ``chap``: use the Challenge Handshake Authentication Protocol. * ``pap``: use the Password Authentication Protocol. * ``both``: use CHAP and PAP. Once the cellular profile has been created, the cellular interface can be configured. To do this, use the :osdx:cfg:`interfaces cellular *` command, indicating the name of the interface you want to configure (eg: cell0). By means of the ``profile`` field, you must also select the cellular profile used by this interface. Accessibility Control --------------------- Verifying availability is hard for connections established through mobile devices. However, other mechanisms can be implemented to verify the connection status. For this purpose, OSDx boasts a functionality that, once the connection is established, sends pings at an interval and to the IP address configured by the user and then waits for a response (within this interval). If no response is received before it times out, a second ping is sent and a response is expected within 10 seconds. If there is still no response, two more pings are sent at 5-second intervals. Finally, if there is still no response, the device is reconnected to the network. This mechanism can be independently enabled on each cellular profile that is configured in the system by adjusting the following parameters of the :osdx:cfg:`cellular profile * accessibility-control ping` command: * ``address``: IP address where pings are sent. * ``interval``: time interval (in seconds) between pings sent. Personal Identification Number (PIN) ==================================== In order to establish a connection to the mobile broadband network, a SIM card must be inserted in the corresponding slot. Sometimes, the SIM card is locked by a PIN code. In these cases, configure the SIM card's PIN code using the ``pin`` field. Once the cellular interface is configured, the status of the SIM card can be checked via the :osdx:op:`interfaces cellular * show network-status` operational command. *Example:* .. code-block:: none :emphasize-lines: 2 admin@osdx$ interfaces cellular cell0 show network-status SIM status = OK Registration state = registered Public Land Mobile Network code = 21407 Public Land Mobile Network name = Movistar Network technology currently in use = lte Current Service Domain registered = cs-ps (capable cs-ps) Current Roaming status = off 3GPP Cell ID = 28195870 Radio Band = eutran-3 Bandwidth = 20 Channel = 1301 LTE Tracking Area Code (TAC) = 11091 RX level (dBm) = -69 Coverage level = 4 (**** ) SIM card errors can sometimes cause network connectivity issues. This can be checked using the previous operational command. Instead of displaying **"SIM status = OK"**, it will display **"SIM Status = LOCKED"** and detail the error in brackets. A list of the most common errors is included below: * ``SIM not inserted``: the system does not find any inserted SIM card. * ``PIN not configured``: the inserted SIM card is locked by a PIN code that has not been added to the configuration. * ``Incorrect password``: the inserted SIM card is locked by a PIN code, and the code added to the configuration is incorrect. * ``SIM PUK required``: the inserted SIM card is locked by a PUK code. The **"SIM PUK required"** error usually occurs when the number of attempts to enter a correct PIN code on the SIM card is exceeded. As a result, the SIM is locked by a PUK code. To solve this, the :osdx:op:`interfaces cellular * open-at-terminal` operational command must be launched and **AT+CPIN="12345678","1234"** must be written in the AT terminal (with **12345678** as the PUK code and **1234** as the new PIN code that you want to assign to the SIM card). If the AT terminal then displays **OK**, it means that the SIM card has been successfully unlocked. *Example:* .. code-block:: none admin@osdx$ interfaces cellular cell0 open-at-terminal AT+CPIN="12345678","1234" OK Network Mode ============ Additionally, the type of technology the cellular interface used to connect to the mobile broadband network can be selected. This can be done via the :osdx:cfg:`interfaces cellular * network mode *` command, selecting one of the following values (default, **automatic**). * ``automatic``: using the best technology available. * ``all-but-5g``: using the best technology available except 5G-SA and 5G-NSA. * ``all-but-5g-sa``: using the best technology available except 5G-SA. * ``5g-nsa``: using LTE or LTE + 5G-NSA. * ``5g-sa``: only using 5G-SA. * ``cdma``: only using CDMA. * ``gprs``: only using GPRS. * ``hrpd``: only using CDMA HRPD. * ``hybrid``: using CDMA or CDMA HRPD. * ``lte``: only using LTE. * ``wcdma``: only using UMTS/HSDPA. Depending on the cellular "module" installed in the device, some modes from the list above will not be supported. If you try to select a mode that is not supported by a "module", an error message will be displayed. *Example:* .. code-block:: none :emphasize-lines: 2 admin@osdx# set interfaces cellular cell0 network mode cdma "cdma" is not a network mode supported by cell0 (Quectel EC25E). Supported modes are: automatic, all-but-5g, gprs, lte, wcdma Value validation failed CLI Error: Command error The technology currently used by the cellular interface can be checked via the :osdx:op:`interfaces cellular * show network-status` operational command. *Example:* .. code-block:: none :emphasize-lines: 6 admin@osdx$ interfaces cellular cell0 show network-status SIM status = OK Registration state = registered Public Land Mobile Network code = 21407 Public Land Mobile Network name = Movistar Network technology currently in use = umts Current Service Domain registered = cs-ps (capable cs-ps) Current Roaming status = off 3GPP Location Area Code = 1109 3GPP Cell ID = 40106379 Radio Band = wcdma-900 Channel = 3034 WCDMA Primary Scrambling Code (PSC) = 443 WCDMA High-Speed Call Status = hsdpa-hsupa-unsupported WCDMA High-Speed Service Indication = hsdpa-hsupa-unsupported EcIo (dB) = -7.5 RX level (dBm) = -82 Coverage level = 3 (*** ) Multi-APN ========= The `Profile`_ section has shown how to assign a cellular profile (with a specific APN defined) to a cellular interface in order to create a single PDP (Packet Data Protocol) context. By doing this, only one PDN (Packet Data Network) data call can be configured over the same cellular interface. However, some "modules" (i.e.: Quectel modules) allow for multiple virtual interfaces to be created on the same cellular interface, meaning users can configure multiple PDN data calls. To create a Multi-APN configuration in OSDx, the :osdx:cfg:`interfaces cellular * profile *` command should not be used to configure the cellular interface. Instead, use the :osdx:cfg:`interfaces cellular * pdp * profile *` command, indicating the virtual interface to be configured (from 1 to 4) and the cellular profile to be assigned. :doc:`Here `, you can find an example related to Multi-APN. Examples ======== Single-APN ---------- Imagine that you want to configure the **cell0** cellular interface, for which a SIM card with PIN code **1234** is inserted. Additionally, you want to connect this interface to the mobile broadband network through the **oper_apn.com** APN only using the UMTS/HSDPA technology. In OSDx, this can be achieved by entering the following commands: .. code-block:: none set cellular profile CELPROFILE apn oper_apn.com set interfaces cellular cell0 address dhcp set interfaces cellular cell0 network mode wcdma set interfaces cellular cell0 pin 1234 set interfaces cellular cell0 profile CELPROFILE Multi-APN --------- Imagine that you want to configure two PDN data calls over the **cell0** cellular interface. Additionally, you want to connect each of these virtual interfaces to the mobile broadband network as follows: * Using the APN **oper_apn1.com** for virtual interface **1**. * And, using the APN **oper_apn2.com** for virtual interface **2**. In OSDx, this can be achieved by entering the following commands: .. code-block:: none set cellular profile CELPROFILE1 apn oper_apn1.com set cellular profile CELPROFILE2 apn oper_apn2.com set interfaces cellular cell0 pdp 1 address dhcp set interfaces cellular cell0 pdp 1 profile CELPROFILE1 set interfaces cellular cell0 pdp 2 address dhcp set interfaces cellular cell0 pdp 2 profile CELPROFILE2 set interfaces cellular cell0 pin 1234 :doc:`Here `, you can find more ``interfaces cellular`` examples. Monitoring ========== In OSDx, there are several operational commands related to ``interfaces cellular`` that can display valuable information or allow some action to be executed on these interfaces. Up until now, some of these operational commands have been detailed: * The :osdx:op:`interfaces cellular show capabilities` command displays a list of configurable cellular interfaces, as well as relevant information on the "modules" installed in the device. * The :osdx:op:`interfaces cellular * show network-status` command shows information about the state of the radio link (SIM status, registration state, network technology currently in use, ...). * The :osdx:op:`interfaces cellular * open-at-terminal` command allows a terminal in which to execute AT commands to be opened (for example, to unlock the SIM card by inserting the PUK code). But these are not the only operational commands related to ``interfaces cellular`` that are available. * The :osdx:op:`interfaces cellular * show device-info` command displays information on the "module" installed in the device. *Example:* .. code-block:: none admin@osdx$ interfaces cellular cell0 show device-info Module Manufacturer = Quectel Module Model = EC25E Module Firmware = EC25EFAR06A01M4G_TEL Hardware Revision = 10000 IMEI = 866308062070222 IMSI = 214075541654235 ICCID = 8934075700105849704F Radio Interfaces = gsm, umts, lte Data Service Capability = non-simultaneous-cs-ps Maximum TX/RX rate supported = 50000/100000 Kbps Temperature = 44 * The :osdx:op:`interfaces cellular * show supported-bands` command displays the bands supported by the "module" installed on the device. *Example:* .. code-block:: none admin@osdx$ interfaces cellular cell0 show supported-bands Bands = gsm-dcs-1800, gsm-900-extended, gsm-900-primary, wcdma-2100, wcdma-850-us, wcdma-900 LTE bands = 1, 3, 5, 7, 8, 20, 38, 40, 41 * The :osdx:op:`interfaces cellular * show preferred-bands` command shows the preferred bands to be used by the cellular interface. *Example:* .. code-block:: none admin@osdx$ interfaces cellular cell0 show preferred-bands Bands preference = gsm-dcs-1800, gsm-900-extended, gsm-900-primary, wcdma-2100, wcdma-850-us, wcdma-900 LTE bands preference = 1, 3, 5, 7, 8, 20, 38, 40, 41 * The :osdx:op:`interfaces cellular * show cell-info` command displays information about the serving cell and neighboring cells. *Example:* .. code-block:: none admin@osdx$ interfaces cellular cell0 show cell-info LTE intrafrequency info: UE in idle mode = no PLMN ID coded = 21407 Tracking Area Code = 11091 Global cell ID = 28195872 E-UTRA absolute RF channel number = 2850 LTE serving cell ID = 290 Cell #0 Physical cell ID = 290 Current RSRQ (dB) = -11.300000 Current RSRP (dBm) = -109.300000 Current RSSI (dBm) = -76.200000 Cell selection Rx Level = 0 LTE interfrequency info: UE in idle mode = no LTE info - Neighboring GSM: UE in idle mode = no LTE info - Neighboring WCDMA: UE in idle mode = no * The :osdx:op:`interfaces cellular * show signal-quality` command displays information about the quality of the signal received by the module. *Example:* .. code-block:: none admin@osdx$ interfaces cellular cell0 show signal-quality LTE: RSSI (dBm) = -78 RSRP (dBm) = -109 RSRQ (dB) = -8 SNR (dB) = 12.000000 Tx level in traffic (dBm) = 10.200000 Rx Chain #0 Radio tuned = yes Rx Level (dBm) = -80.700000 ECIO (dB) = 8.400000 RSRP (dBm) = 109.100000 Phase (deg) = 0.000000 Rx Chain #1 Radio tuned = yes Rx Level (dBm) = -82.200000 ECIO (dB) = 8.200000 RSRP (dBm) = 110.400000 Phase (deg) = 0.000000 * The :osdx:op:`interfaces cellular * show network-data-connection` command displays information about the network data connection. *Example:* .. code-block:: none admin@osdx$ interfaces cellular cell0 show network-data-connection Connection status = connected Traffic channel status = active Max. TX channel rate (bps) = 50000000 Max. RX channel rate (bps) = 150000000 IPv4 address = 37.13.233.100 IPv4 mask = 255.255.255.248 IPv4 gateway = 37.13.233.101 IPv4 primary DNS = 80.58.61.250 IPv4 secondary DNS = 80.58.61.254 * Finally, the :osdx:op:`interfaces cellular * reconnect` command allows the user to force the cellular interface to reconnect to the mobile broadband network. Command Summary =============== .. osdx:cmdtree:: cfg cellular interfaces cellular .. osdx:cmdtree:: op interfaces cellular