Slicing Issue with RG501Q

I am unable to activate multiple slices at the same time using the Quectel RG501Q module.
Following are the details of the problem.

Firmware: RG501QEUAAR12A06M4G

Slicing configuration is done by defining the PDP contexts as follows:

at+cgdcont=3,“IP”,“srsapn”,1,“01.000001”
at+cgdcont=4,“IP”,“srsapn”,1,“02.000002”

Following is the output of the activation commands:
at+cgact=1,3
OK
at+cgact=1,4
ERROR

Hi,

I looked at the documentation and found that the AT+CGDCONT command takes a very long parameter chain, and the field is defined at the very end. So, as you wrote, AT+CGDCONT=3,“IP”,“srsapn”,1,“01.000001” is incorrect, because the number 1 actually fits into the <PDP_addr> parameter.

Correct use is described in the manual as follows:

AT+CGDCONT=[,<PDP_type>[,[,<PDP_addr>[,<data_comp>[,<head_comp> … [,]…]]]]]

In the examples in the guide, the simple APN definition is shown as follows:

AT+CGDCONT=4,"IP","UNINET"
OK
AT+CGACT=1,4
OK

Therefore, when defining a slice, the format you should write should look like this:

AT+CGDCONT=3,"IP","srsapn",,,,,,,,,,,,,"01000001"
AT+CGDCONT=4,"IP","srsapn",,,,,,,,,,,,,"02000002"

Quectel_RG50xQ&RM5xxQ_Series_AT_Commands_Manual_V1.2.pdf (1.6 MB)

(post deleted by author)

The initial post had wrong commands. The correct commands i used to setup PDP Contexts and NSSAI are as follows (an they return a OK response):

Screenshot from 2025-09-11 11-43-15

at+c5gnssai=8,“01.000001:02.000002”

The AT commands you mentioned (shown below) do not work.

AT+CGDCONT=3,"IP","srsapn",,,,,,,,,,,,,"01000001"
AT+CGDCONT=4,"IP","srsapn",,,,,,,,,,,,,"02000002"

The issue remains the same. I have provided the following additional logs for my configuration:

Logs

at+c5greg?
+C5GREG: 2,1,“000007”,“00066C000”,11,4,“02.000002”

at+c5gnssai?
+C5GNSSAI: 8,“01.000001:02.000002”

at+c5gnssairdp=0
+C5GNSSAIRDP: 8,“01.000001:02.000002”

at+c5gnssairdp=3
+C5GNSSAIRDP: 8,“01.000001:02.000002”
+C5GNSSAIRDP: “00101”,4,“02.000002”

Dear @apocalypto224
Please share whole test AT commands.
From pert of configurations, 4 is 01.000001, but allowed NSSAI by network 02.000002 .

Hi,

You defined two S-NSSAIs (slices) with AT+C5GNSSAI=8,“01.000001:02.000002”.

But the network only allows NSSAI 02.000002.

This means the modem can write 01.000001 to its configuration, but the network rejects it during attach/registration.

The +C5GREG output also returns “02.000002.”

In this case, the error isn’t in your command set, but in your operator’s slice provisioning.
In other words, the modem allows you to configure multiple NSSAIs simultaneously, but which slice you can actually use is entirely limited by the profile assigned to you by the network.

Try opening a PDU with only 02.000002 (using QMAP or AT+QPDUSIM, AT+CGACT, etc.).

If you remove 01.000001 you will see that the error messages disappear.

Hi Silvia,

I am not sure i understand the test AT commands? Which command output do you need?

Hi Emre,

Thank for you reply and time. I am using open5GS core and srsRAN_Project’s gnb(attached are the configuration files and subscriber defintion screenshot).
configs.zip (84.9 KB)

I would like to point out that these configs work fine when i try to activate slices from two different quectel modules. The issue i am experiencing is when i try to activate these slices from a single device. I am using sysmocom sim cards in these quectel modules.

AT+C5GNSSAI? // Which slices does the module want?
AT+C5GNSSAIRDP=0
AT+C5GNSSAIRDP=3
AT+CGDCONT?
AT+CGACT? // Which PDP/PDU is active?

Can you run these and post the results?

AT+C5GNSSAI?

+C5GNSSAI: 8,"01.000001:02.000002"

OK                                                                                                               
                                                                                                                 
AT+C5GNSSAIRDP=0                                                                                                 
                                                                                                                 
+C5GNSSAIRDP: 8,"01.000001:02.000002"                                                                            
                                                                                                                 
OK                                                                                                               
AT+C5GNSSAIRDP=3                                                                                                 
                                                                                                                 
+C5GNSSAIRDP: 8,"01.000001:02.000002"                                                                            
+C5GNSSAIRDP: "00101",0,"",4,"02.000002"                                                                         
                                                                                                                 
OK                                                                                                               
AT+CGDCONT?                                                                                                      
                                                                                                                 
+CGDCONT: 1,"IP","srsapn","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0                                                      
+CGDCONT: 2,"IP","srsapn","0.0.0.0",0,0,0,0,,,,,,,,1,"01.000001" 
+CGDCONT: 3,"IP","srsapn","0.0.0.0",0,0,0,0,,,,,,,,1,"02.000002" 


AT+CGACT?

+CGACT: 1,0                                                                                                      
+CGACT: 2,0                                                                                                      
+CGACT: 3,0 

Okay, when I have time, I will edit the config files according to the AT responses and share them.

Hi,

You can use these config files.
config.zip (3.6 KB)

Could you also follow the steps below?

// Clean restart of services
sudo systemctl restart open5gs-nssfd open5gs-upfd open5gs-smfd open5gs-amfd

//Quick health check (ports & logs)
# Port listening control
ss -lntp | grep -E '(:7777|:9090|:2152|:8805)'
# Expected:
# 127.0.0.14:7777 (nssfd), 127.0.0.7:9090 (upfd metrics), 127.0.0.7:2152 (GTPU)
# 127.0.0.4:7777 (smfd), 127.0.0.5:7777 (amfd), 127.0.0.5:9090 (amf metrics), 127.0.0.4:8805 (PFCP) vb.

# Latest logs (are there any errors)
journalctl -u open5gs-nssfd -n 30 --no-pager
journalctl -u open5gs-upfd  -n 30 --no-pager
journalctl -u open5gs-smfd  -n 30 --no-pager
journalctl -u open5gs-amfd  -n 30 --no-pager

//U-Plane preparation (single DNN: srsapn)

# IP forward
sudo sysctl -w net.ipv4.ip_forward=1

# NAT (If your WAN interface is different, write it instead of eth0)
sudo iptables -t nat -C POSTROUTING -o eth0 -j MASQUERADE 2>/dev/null || \
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# ogstun interface (idempotent)
ip link show ogstun >/dev/null 2>&1 || sudo ip link add ogstun type gretap remote 0.0.0.0 local 0.0.0.0
ip addr show dev ogstun | grep -q '10.45.0.1/16' || sudo ip addr add 10.45.0.1/16 dev ogstun
sudo ip link set ogstun up

Connect the gNB to the AMF.
The gNB (B210/srsRAN or your own gNB) will have an N2/NGAP IP of 127.0.0.5, PLMN = 001/01, and TAC = 7.
Restart the gNB. You should see the NG Setup message in the AMF log.

//UE/Quectel side—AT test sequence

ATZ
AT+CMEE=2
AT+CPIN?
AT+CSQ
AT+C5GREG?                      // 5G register = 1 olmalı
AT+C5GNSSAI=8,"01.000001:02.000002"
AT+C5GNSSAIRDP=0                // Allowed: both slices must be visible
AT+C5GNSSAIRDP=3                // Selected: 01.000001 veya 02.000002
AT+CGDCONT=2,"IP","srsapn",,,,,,,,,,,,,"01.000001"
AT+CGDCONT=3,"IP","srsapn",,,,,,,,,,,,,"02.000002"
AT+CGDCONT?

  • If Selected = 02.000002 :
AT+CGACT=1,3
AT+CGPADDR=3
AT+QPING=1,"8.8.8.8"
  • IfSelected = 01.000001:
AT+CGACT=1,2
AT+CGPADDR=2
AT+QPING=1,"8.8.8.8"

//If you get an error, you can check it with this command.
AT+CEER

After AT command , you can apply these commands ;
//Network traffic “smoke test”

#GTP-U
sudo tcpdump -ni any udp port 2152 -vv

# IP flow in ogstun when pinging from UE
sudo tcpdump -ni ogstun icmp

It’s a bit complicated but I can do this much without any hardware :slight_smile:

Thank you for the detailed steps.

Th configs for upf, smf, amf have issues highlighted as follows (with Open5GS v2.7.6):
UPF(formatting issues, fixed)

Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: Open5GS daemon v2.7.6
Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: 09/16 12:02:01.398: [app] INFO: Configuration: '/etc/open5gs/upf.yaml' (../lib/app/ogs-init.c:144)
Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: 09/16 12:02:01.398: [app] INFO: File Logging: '/var/log/open5gs/upf.log' (../lib/app/ogs-init.c:147)
Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: 09/16 12:02:01.453: [gtp] WARNING: unknown key `session` (../lib/gtp/context.c:565)
Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: 09/16 12:02:01.453: [gtp] WARNING: unknown key `metrics` (../lib/gtp/context.c:565)
Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: 09/16 12:02:01.453: [upf] ERROR: No upf.session.subnet: in '/etc/open5gs/upf.yaml' (../src/upf/context.c:122)
Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: 09/16 12:02:01.453: [app] ERROR: Failed to initialize UPF (../src/upf/app.c:28)
Sep 16 12:02:01 testingpc-Precision-3630-Tower open5gs-upfd[754156]: 09/16 12:02:01.453: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:224)
Sep 16 12:02:01 testingpc-Precision-3630-Tower systemd[1]: open5gs-upfd.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 16 12:02:01 testingpc-Precision-3630-Tower systemd[1]: open5gs-upfd.service: Failed with result 'exit-code'.

SMF (pdn and slice are unsupported terms it seems)

Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: Open5GS daemon v2.7.6
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.150: [app] INFO: Configuration: '/etc/open5gs/smf.yaml' (../lib/app/ogs-init.c:144)
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.150: [app] INFO: File Logging: '/var/log/open5gs/smf.log' (../lib/app/ogs-init.c:147)
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.208: [sbi] INFO: Setup NF EndPoint(addr) [127.0.0.200:7777] (../lib/sbi/context.c:507)
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.208: [smf] WARNING: unknown key `pdn` (../src/smf/context.c:974)
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.208: [smf] WARNING: unknown key `slice` (../src/smf/context.c:974)
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.208: [smf] ERROR: No smf.session.subnet: in '/etc/open5gs/smf.yaml' (../src/smf/context.c:181)
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.208: [app] ERROR: Failed to initialize SMF (../src/smf/app.c:28)
Sep 16 12:03:27 testingpc-Precision-3630-Tower open5gs-smfd[754804]: 09/16 12:03:27.208: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:224)

AMF (formatting issues and unsupported nssf field)

Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: Open5GS daemon v2.7.6
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.152: [app] INFO: Configuration: '/etc/open5gs/amf.yaml' (../lib/app/ogs-init.c:144)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.152: [app] INFO: File Logging: '/var/log/open5gs/amf.log' (../lib/app/ogs-init.c:147)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.155: [sbi] INFO: Setup NF EndPoint(addr) [127.0.0.200:7777] (../lib/sbi/context.c:507)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.155: [amf] WARNING: unknown key `mcc` (../src/amf/context.c:583)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.155: [amf] WARNING: unknown key `mnc` (../src/amf/context.c:583)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.156: [amf] WARNING: Ignore tai : mcc((nil)), mnc((nil)), num_of_tac(1) (../src/amf/context.c:643)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.156: [amf] WARNING: unknown key `nssf` (../src/amf/context.c:1083)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.156: [amf] ERROR: No amf.tai in '/etc/open5gs/amf.yaml' (../src/amf/context.c:148)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.156: [sctp] ERROR: Failed to initialize AMF (../src/amf/app.c:30)
Sep 16 12:23:41 testingpc-Precision-3630-Tower open5gs-amfd[757544]: 09/16 12:23:41.156: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:224)
Sep 16 12:23:41 testingpc-Precision-3630-Tower systemd[1]: open5gs-amfd.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 16 12:23:41 testingpc-Precision-3630-Tower systemd[1]: open5gs-amfd.service: Failed with result 'exit-code'.

I followed all the steps as follows:

  • Clean restart of services
  • Quick health check (ports & logs)
  • U-Plane preparation (single DNN: srsapn)
  • Connect the gNB to the AMF.

After these steps, i am having issue with the defintion of PDP Contexts. The following commands return an ERROR.

AT+CGDCONT=2,"IP","srsapn",,,,,,,,,,,,,"01.000001"
AT+CGDCONT=3,"IP","srsapn",,,,,,,,,,,,,"02.000002"

AT+CEER (+CEER: No cause information available)

The format of the provided AT+CGDCONT does not seem to match the format provided in the rg50xq&rm5xxq series at commands manual v1.2(that you previously attached in the thread).

AT+CGDCONT: <cid>,<PDP_type>,<APN>,<PDP_addr>,<data_comp>,<head_comp>[,<IPv4_addr_alloc>[,<request_type>[,<P-SCF_discoverty>[,<IM_CN_Signalling_Flag_Ind>[,<NSLPI>[,<securePCO>[,<IPv4_MTU_discoverty>[,<Local_Addr_Ind>[,<Non-IP_MTU_discoverty>[,<Reliable_Data_Service>[,<SSC_mode>[,<S-NSSAI>[,<Pref_access_type>[,<RQos_ind>[,<MH6-PDU>[,<Always-on_req>]]]]]]]]]]]]]]]]

When I try again, some errors become more noticeable. However, analyzing errors and developing solutions is truly time-consuming.

It would be more appropriate to contact a Quectel expert for support.
I’d be happy to recommend another solution when I have the time.

1 Like

Dear @apocalypto224
Please share your whole test AT commands one by one.
Any AT commands which you used.

Hi Silvia,

Please find the AT commands here:

AT+QCFG="volte_disable",1
AT+QNWPREFCFG="mode_pref",NR5G
AT+QNWPREFCFG="nr5g_band",78
AT+C5GNSSAI=8,"01.000001:02.000002"
AT+CGDCONT=2,"IP","srsapn",,,,,,,,,,,,,,1,"01.000001"
AT+CGDCONT=3,"IP","srsapn",,,,,,,,,,,,,,1,"02.000002"
AT+CGACT=1,2
AT+CGACT=1,3

Dear @apocalypto224
But you don’t share the response of these AT command.
Please add AT+Q5GREG?

Hi Silvia,

The output is already in the previous replies. Please find it again here with responses:

AT+QCFG="volte_disable",1
OK
AT+QNWPREFCFG="mode_pref",NR5G
OK
AT+QNWPREFCFG="nr5g_band",78
OK
AT+C5GNSSAI=8,"01.000001:02.000002"
OK
AT+CGDCONT=2,"IP","srsapn",,,,,,,,,,,,,,1,"01.000001"
OK
AT+CGDCONT=3,"IP","srsapn",,,,,,,,,,,,,,1,"02.000002"
OK
AT+CGACT=1,2
ERROR
AT+CGACT=1,3
OK
AT+C5GREG?
+C5GREG: 2,1,“000007”,“00066C000”,11,4,“02.000002”

Dear @apocalypto224
at+c5greg?
+C5GREG: 2,1,“000007”,“00066C000”,11,4,“02.000002”
=>Allowed S-NSSAIs received from the network is 02.000002, don’t include 01.000001.
Please note this.