Quectel UEs
It exists several ways to use the Quectel module. In this page we will present two of them. The alternatives are:
- Use the Windows connection package
- Use the Linux-native QMI
Obtain the BubbleRAN Quectel snap
Uninstall udhcpc
package from the machine.
sudo vim $(oai-ue.conf-get-quectel)
# The configuration is as follows
{
"serial-device": "/dev/ttyUSB2",
"network-interface": "wwp0s20f0u4i4", # network interface name created when connecting the Quectel module
"default-apn": "operator", # APN name to request. Should be complian with the CN configuration
"sim-pin": "NULL", # null if NO PIN otherwise use the PIN of your SIM example "1234"
"lte-bands": "7,13", # LTE bands to scan if lte mode
"nr-sa-bands": "78", # SA bands to scan if SA mode
"nr-nsa-bands": "78", # NSA bands to scan if NSA mode
"network-mode": "IPv4", # APN type, check the configuration of your CN. With OAI CN is better to avoid IPv4v6
"radio-preference": "NR-SA", # mode in which the UE will work
"ims": "NULL", # indicates the request or not of IMS service
"sos": "NULL" # indicates the request or not of SOS service
}
Run the snap using
sudo oai-ue.quectel
Use the minicom and quectel connection manager
This method is recommended for expert users ONLY
The udhcpc
packet allows to obtain the IP address and bring up the network interface.
Before you run the quectel script sudo ./quectel-CM ........
check if you have the packet.
otherwise install it by using the command:
sudo apt-get install udhcpc
If this packet is not there you will need to bring up the IP address of the interface manually.
cd ~/files/quectel-CM
sudo ./quectel-CM -4 -p 1234 -s operator
Configuration
# to know the ttyUSB devices related to the quectel module
ls -l /dev/ | grep tty USB
#set the minicom configuration file
sudo minicom -s
# configure /dev/ttyUSB2 as the I/O device for this Quectel module
# and save the configuration under name "quectel"
In the example below we suppose that the Quectel
- works in B78
- requires for APN called "operator". To understand which APN name to use it is important to properly read the CN configuration
AT commands:
1. Preliminary check before running the Quectel
sudo minicom quectel
# did once to configure the Quectel as Row_Commercial
AT+QMBNCFG="select","ROW_Commercial"
at+cfun=1,1 # this is to restart the Quectel after reconfiguration
# assure the good network type and scanned bands with:
at+qnwprefcfg="mode_pref",nr5g
at+qnwprefcfg="nr5g_band",78
# assure that the APNs are well configured. To check config:
at+cgdcont=1,"IP","operator"
#check it with
at+cgdcont?
+CGDCONT: 1,"IP","operator","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
If the output of the APNs is:
at+cgdcont?
+CGDCONT: 1,"IP","operator","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 3,"IP","hos","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 4,"IPV4V6","SOS","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1,,,,,,,,,"",,,,0
You MUST remove everything that is not "operator". Otherwise, the Quectel will require services that are not supported, and it will not connect To remove them:
at+cgdcont=2
at+cgdcont=3
at+cgdcont=4
check back again and the output should be
at+cgdcont?
+CGDCONT: 1,"IP","operator","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
2. Run the Quectel
# assure the good network type and scanned bands with:
at+qnwprefcfg="mode_pref",nr5g
at+qnwprefcfg="nr5g_band",78
# assure that the APNs are well configured. To check config:
at+cgdcont?
+CGDCONT: 1,"IP","operator","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 3,"IP","hos","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 4,"IPV4V6","SOS","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1,,,,,,,,,"",,,,0
#there were ims, sos and something else, I removed them. The only one to keep is the first one.
at+cgdcont=1,"IP","operator"
# to connect:
at+cfun=1
at+cpin=1234
Relation Quectel-CM connection manager / at+cfun=0
or at+cfun=1
Observing the wireshark logs and the CN logs during UE connection and disconnection of the UE we observe that:
- The Quectel-CM is the responsible for the NAS exchanges
- the at command is the responsible for the registration and de-registration requests.
The observation came from the fact that by only doing at+cfun=0 / at+cfun=1
plus quectel CM always running results to
the UE was getting increasing IP address numbers meaning that the disconnection from the CN was not properly completed
for the previous tests.
It is good to do the at+cfun=1
(registration Request -> Registration Complete) and then launch the Quectel-CM
(NAS PDU Session establishment request --> NAS PDU Session Establishment accept + NGAP PDU Session Resource Setup
Response)
It is always good to fist disconnect the quectel-CM (PDU session de-registration request), then disconnect the
Quectel with the at+cfun=0
(NGAP De-registration Request --> De-registration Complete)
OAI gNB network slices
In the OAI configuration file we specify the slice list that the UE might require. For example, we put both the one that Quectel defines for Telestra and the default one for Row Commercial mode.
plmn_list = (
{
mcc = 505;
mnc = 01;
mnc_length = 2;
snssaiList = (
{
sst = 1;
sd = 0xd143a5; // Telestra slice defined by Quectel
},
{
sst = 0x01;
sd = 0x000000; // Quectel slice if Row commercial mode
}
);
}
);
In case of problem it is always possible to check in Wireshark the NGAP message ue connection request that contains the slice requested by the UE.