Author: Emanuele Pagliari
This ROS1 package gathers the main 5G RF quality indexes from Sierra Wireless 5G modems (EM9293 and EM9191) and publish them in the proper ROS1 topic (sierra_nr5g).
The ROS2 porting is available in the ROS2 folder.
The only requirements are Python3 with its related ROS1 dependencies and pySerial installed. Also, a Sierra Wireless 5G modem properly connected to the host computer is needed with a good quality USB-C 3.0 cable.
If the the 5G modem, not only the Sierra Wireless EM9293 and EM9191 but also the Quectel RM520GL have never been used on the robotic platform or computer, it might be needed to upgrade both ModemManager as well as NetworkManager, plus to setup the connection in NetworkManager.
To install and update ModemManager, run the following command:
snap install modem-manager modem-managerTo update NetworkManager, run the following command:
sudo apt-get install network-managerA reboot is recommended after the installation of these dependencies.
Once they are installed, the 5G modem is going to be detected and visible from the network setting menu. However, I reccomend to setup the cellular connection and APN using the following command:
sudo nmcli connection add type gsm ifname '*' con-name '5GSA' apn '5gsa.lulea' connection.autoconnect yeswhere con-name '5GSA' is the name of the connection that you want to add, while apn '5gsa.lulea' is the APN for the 5G network at LTU. These parameters must be set accordendly to the cellular network you want to connect to. As an example, Telia parameters APN is apn 'online.telia.se'.
The developed ROS1 and ROS2 package in this repository works only to gather 5G KPI. Using this package with 4G network will crash the script or result in no output in the ROS topic, since the parser process only the 5G-related RF metrics.
Therefore, it is needed to force the modem to 5G SA only, thus excluding the fallback on 4G LTE tecnology. In order to do this, after the modem has been setup, it is possible to force the 5G SA only operating mode trough the following ModemManager commands.
First of all, the target modem must be individuated. To do this, the following command can be used:
mmcli -LIt will output the available connected modems, in our case the Sierra Wireless EM9293:
/org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless] EM9293Then, using its ID, it is possible to force the 5G SA only modem operating modem likes follow:
mmcli -m 0 —set-allowed-modes='5g|none'An output should appear based on the used modem.
On Ubuntu 20.04 and 22.04 LTS, it is necessary to force the loading of the Option driver using the following commands:
sudo modprobe optionThen, based on the adopted modem, the following command is needed to properly load the Option driver for the Sierra Wireless EM9293:
sudo sh -c "echo '1199 90e3' > /sys/bus/usb-serial/drivers/option1/new_id"For the Sierra Wireless EM9191 instead, the same commands needs the suitable VendorID and ProductID:
sudo sh -c "echo '1199 90d3' > /sys/bus/usb-serial/drivers/option1/new_id"Other modems might need different VID and PID. If the command is successful, the following command should return the ttyUSB0 and ttyUSB1 serial ports as available:
dmesg | grep ttyTo check if the driver has been properly loaded, use the following command:
lsusb -tShould return the following output:
A bash script, denoted as 5Gdriverload.sh is also available to make the process faster. Please use the proper VID and PID based on the modem you are using.
Modify the parser and the publisher to include the nearby cells data as well as 4G LTE data.

