Nowadays, dedicated services are provided for 4G/5G communication of IoT devices. Industrial Raspberry Pi terminals are often requested to collect data measured by sensors, etc. With the advent of Pi 5/CM 5, processing performance has been improved, making it possible to not only collect raw data, but also to send the data after processing it in Raspberry Pi to some extent. The Pi 5/CM 5 has improved processing performance.
Unlike the days of 3G, 4G and 5G are now available, and the bandwidth is increasing. Running costs have also become lower, and real-time operation has increased due to high-speed communication. The ability to transmit large files has also expanded the range of IoT terminal operations.
Due to the location of the installation due to the network environment, there will be cases where 4G/5G communication using SIM cards will be required instead of wireless LAN or wired cables.
Models equipped with a direct SIM card slot, such as the industrial Raspberry Pi “PL-R4” series, do not require additional equipment and can be considered for flexible operation without being restricted to conventional communication methods.

Thus, with the Raspberry Pi, the threshold for mobile communication has been lowered. As long as you can secure a power supply, you no longer have to give up on projects using IoT terminals outdoors.
MEEQ SIM for operation verification
This time we used “MEEQ SIM,” a communication service for IoT available from 143 yen per month (tax included).
As mentioned above, the “PL-R4” series has a model equipped with a SIM card slot as well as Wi-Fi, so you can freely choose a telecommunication company simply by replacing the SIM card.
Since not all SIM cards work the same way, we also tested the “MEEQ SIM. As before, we were able to use it without any problems.
Examples of additional services
Some telecommunications companies that you contract with offer their own services.
Examples of Services
- MEEQ Global SIM
- MEEQ Data Platform
- MEEQ AI
- MEEQ Business Tools
*5G communication is available as a separate option.
The use of the MEEQ data platform will be an easy service to imagine, as it is dedicated to the IoT.
This is an operation to send data measured by Raspberry Pi or other devices.
Data stored in MEEQ IoT storage can be viewed in real time, imported into a database for processing, and used in conjunction with the company’s own systems. Another convenient feature is the ability to access IoT storage directly from your AWS account.
As in the previous section, in addition to mobile communication, which is a general data SIM card, there are several other services being developed for IoT devices.
It is difficult to know what kind of telecommunication companies are available for corporate contract services because they are not very commonly introduced.
We hope that the operation of a general data SIM card that can be contracted by an individual is sufficient, but we hope that you are aware that some of these services are designed for IoT devices.
Industrial Raspberry Pi and Mobile Networking
4G (LTE) communication with “PL-R4” was previously introduced with OCN’s SIM.
This article again describes the mobile communication connection, but please also refer to the previous article for more details.
Connection setup with 4G (LTE) communication module
Check on Raspberry Pi side
The SIM card can be used after activation.
It may take some time for the activation to be completed depending on the contracting company. Wait for a while until the activation is completed. We did not measure the time this time, but it was completed after 30 minutes.

We used “PL-R4” with Raspberry Pi Compute Module 4. operating system is bullseye.
- Raspberry Pi Compute Module 4
- bullseye 64bit
- Starting with 32GB eMMC
- Dedicated Antenna
- SIM card (MEEQ)
First, let’s check what the connection information is on the Raspberry Pi side.
Simply use the ip command to check eth0, wlan0, and wwan0.
ip a
nmcli command to show current connection status
nmcli connection show

Image shows connected state
command can be omitted. Simply c alone produces the same result.
nmcli c
I checked the next one as well.
nmcli device status
4G (LTE) communication was found to be wwan0, device was cdc-wdm0, connection type was gsm, etc.
Connection settings (APN)
SIM cards require a SIM activation process in advance with most contractors.
The same is true for MEEQ in this case, and the activation should be completed from a dedicated user screen. Activation can be done from another machine, not from the device itself.
Have you activated your SIM card?
The next step is to set up an APN connection to the Raspberry Pi.
If the device is equipped with a SIM card slot, as is the case with the PL-R4, there is no need to install a driver; all that is required is to create a profile to be connected.
ufw settings
Nowadays, from the standpoint of security risk, you should set up a firewall in ufw just to be safe before making mobile communications.
sudo apt update
sudo apt install -y ufw
Configure the settings according to the actual situation at the site or company, such as allowing web as well as ssh and vnc ports, and only allowing communication in the local environment.
Please refer to the previous article for detailed settings.
UFW – Firewall
Proceed as before, allowing only the necessary ports.
nmcli command to configure APN settings
Configure the APN settings from the command:
The information required to configure the APN is available at your contractor. Please replace it in your environment.
Generally, you will find the connection information on the SIM card you received or in your contract documents.
- con-name Connection name = arbitrary, easy-to-understand name
- apn access point name = APN name provided by the SIM company
- user/password=user name and password provided by the SIM company
A single nmcli command line completes the APN setup. It is very easy.
The line breaks are provided for readability, but you may remove the \
and run the program on a single line.
Apply each piece of information and execute.
sudo nmcli con add type gsm ifname wwan0 \
con-name connection name apn access pint name user user name password password
explanation
ifname specifies the network interface name. according to the man page, an asterisk (*) has no value and the default name will be used if wwan0 is not set, so an asterisk is acceptable the first time. ( ifname "*"
)
If wwan0 already exists, specify it for stringing.
ifname │ connection.interface-name
A value of * will be interpreted as no value, making the connection profile interface-independent.
Note: use quotes For bond, team and bridge connections a default name will be generated if not set.
(Translation)
- is interpreted as having no value, and the connection profile is no longer dependent on the interface.
Note: To suppress shell expansion, enclose * in quotes; for bond, team, and bridge connections, default names will be generated if not configured.
Quoted from: https://manpages.ubuntu.com/manpages/focal/man1/nmcli.1.html#property aliases
After execution, the name of the destination appears in the Mobile Broadband group of the network connection. This is OK.

Check the connection (Raspberry Pi side)
To verify the 4G (LTE) connection, other means of connection were temporarily disabled and verified.
If only a wired LAN connection is needed, simply not connecting a LAN cable is acceptable.
Command to temporarily disable Wi-Fi and wired LAN connections
nmcli connection down connection name(eg:有線接続\1)
It can be reactivated by executing the up command.
nmcli connection up connection name
If you are in a GUI environment, there is a panel applet called Network Connection Monitor in the taskbar, so you can add a new one and check the packets sent and received by the connection.

If the value of packets sent and received is increasing, it is easy to see that communication is actually taking place.
You can also find out the signal strength by checking with the mmcli
command introduced in the previous issue.
Details of the communication modem
mmcli -m 0
--------------------------------
Status | lock: sim-pin2
| unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
| state: connected
| power state: on
| access tech: lte
| signal quality: 100% (recent)
As shown in the status section, signal quality was 100% indoors via a dedicated antenna.

Antennas for mobile networks used [LANTIP6701/TG .55.8113)]
If you cannot connect
If you can’t connect after setting it up, check to see if you have a 4G (LTE) line with a SIM card and an IP address assigned to you by your contracting company.
Is the router, including the IP address granted, also the IP address of the contracting company?
Check with the route command.
route -n
or
netstat -nr
ss -pt
Now there are also ss commands. Each of these can examine different things depending on the options.
All commands can be executed as is on the Raspberry Pi OS.
The interface name for 4G (LTE) communication is wwan0.
If you just want to check the IP address, you can use the ifconfig command to specify the interface name.
ifconfig wwan0
If an IP address is assigned, and it is not a private IP, nor is it the router IP address of a telecommunications company, then you are communicating over 4G (LTE).
I displayed the official Raspberry Pi page. You can see that the connection is properly made with wwan0.

Verify connection (SIM card company side)
Some SIM card companies that you subscribe to have a user screen to monitor the status of your connection.
In this MEEQ, you can also check the amount of communication at a glance by logging in to the user screen.

[Added] Support for DoCoMo, au, and Softbank lines.

The OCN SIM card we tried last time was a DoCoMo line.
In addition to the DoCoMo line, the MEEQ SIM this time tested an au line and a Softbank line at the same time.
We were able to confirm successful communication with the PL-R4 series of industrial Raspberry Pi, regardless of the carrier’s line.
We can see that the same communication is possible with the command mmcli -m 0
, which we checked earlier on the DoCoMo line.

Signal reception is the same as with smartphones and varies from region to region. It can’t be helped.
After several attempts, the DoCoMo line was almost 100% at this installation.
The DoCoMo line is still strong.
The SoftBank line was followed by 94 %〜、au回線は76%~84%.
The communication module in the PL-R4 has a wide range of supported bands, and the contracted connection provider also offers a choice of line types, so you can choose a SIM card without concern.
You can choose a plan that emphasizes the maximum number of packets, speed such as 4G (LTE) or 5G, or simply consider the running cost.
It should be noted that there are also types of industrial Raspberry Pi that allow you to choose the telecommunications company and connection provider you use, just as you would sign up for a standard mobile line.
Mobile communication cards for IoT terminals
Other SIM cards for IoT exist.
The same is true for regular data communication SIM cards, which also allow 4G (LTE) communication on the Raspberry Pi.
If there are services behind the scenes that are also prepared for IoT, it will be less of a hassle to implement.
We would like to choose a communication service that fits the project content, including the initial cost.
For more information on MEEQ, introduced as a SIM card that is also suitable for industrial Raspberry Pi, please click on the link.
MEEQ: https: //www.meeq.com/meeq/index.html

Article contributed by Raspida
Raspberry Pi information site that even non-engineers can enjoy using raspida.com a Raspberry Pi information site that even non-engineers can enjoy and handle. He also contributes technical blog articles to the PiLink site on the Raspberry Pi for industrial use.