Change APN using +cgdcont command

Hi I have an interesting problem…

I am using a EM7450 modem. I am using the +cgdcont command to change the APN for profile 1. Since I am using a AT&T card, the APN is m2m.com.attz. I noticed a few times when I changed the APN to something like mickeymouse, the connection remains active even though this is obviously the wrong APN for the SIM card.
Shouldn’t the connection go down when I change the APN to something bogus?

Hello,

at!custom -

“SINGLEAPNSWITCH” Indicate device behavior
when changing APN name, username, or password.
:
• 0 = Do nothing
• 1 = Device detaches and re-attaches after changing APN information
• 2 = Power-cycle the UE

thanks,
James

It is set to 1. Should I see the ttyUSB* devices disappear and reappear after a while?

It is set to 1 and when I changed the APN, I do not see the module disconnect from the USB bus. Did you mean it detaches and reattaches from the cell network?

What was so strange to me is that the +cgdcont command with the bogus APN was sent and acknowledged by the module, but the cell connection kept going as if nothing happened. I was expecting the network to be brought down by the bogus APN.

Yes , it won’t disconnect from the USB bus.
option 2 will reset the modem

So if the APN I entered is bogus, when it reattaches to the network again, the PDP connection should drop right?

yes. you need to reset the modem after programming !custom

Thanks again for your reply.

Actually I do not want to program !custom. I will just leave the default settings at 1.

What I like to make sure is that when I program the APN with either a valid or bogus setting using +cgdcont, the expected PDP connection behavior will result.

sorry I didn’t get the second part of your comment.

Thanks for your reply.

So if I use the +cgdcont command to program a bogus APN into a EM7455 module that has an active PDP connection, should it cause the PDP connection to be disrupted?

yes it will disconnect .
here is an example captured on my callbox:
default is the valid APN
bogus APN is not programmed in the callbox:

at+cgcontrdp
+CGCONTRDP: 1,5,default,192.168.2.2,8.8.8.8,

OK
at!custom?
!CUSTOM:
GPSENABLE 0x01
GPSLPM 0x01
IPV6ENABLE 0x01
UIM2ENABLE 0x01
SIMLPM 0x01
USBSERIALENABLE 0x01
SINGLEAPNSWITCH 0x01

OK
at+cgdcont?
+CGDCONT: 1,“IP”,“default”,“0.0.0.0”,0,0,0,0

OK

at!gstatus?
!GSTATUS:
Current Time: 37 Temperature: 28
Reset Counter: 1 Mode: ONLINE
System mode: LTE PS state: Attached
LTE band: B4 LTE bw: 20 MHz
LTE Rx chan: 2150 LTE Tx chan: 20150
LTE CA state: NOT ASSIGNED
EMM state: Registered Normal Service
RRC state: RRC Idle
IMS reg state: No Srv

PCC RxM RSSI: -36 RSRP (dBm): -63
PCC RxD RSSI: -57 RSRP (dBm): -83
Tx Power: – TAC: 0001 (1)
RSRQ (dB): -6.0 Cell ID: 01A2D101 (27447553)
SINR (dB): 28.6

OK
at+cgcontrdp
+CGCONTRDP: 1,5,default,192.168.2.2,8.8.8.8,

OK
at+cgdcont=1,“ip”,“bogus”
OK
at+cgcontrdp
OK
at!gstatus?
!GSTATUS:
Current Time: 79 Temperature: 28
Reset Counter: 1 Mode: ONLINE
System mode: LTE PS state: Not attached
LTE band: B4 LTE bw: 20 MHz
LTE Rx chan: 2150 LTE Tx chan: 20150
LTE CA state: NOT ASSIGNED
EMM state: Deregistered Attaching
RRC state: RRC Idle
IMS reg state: No Srv

PCC RxM RSSI: -36 RSRP (dBm): -63
PCC RxD RSSI: -57 RSRP (dBm): -83
Tx Power: – TAC: 0001 (1)
RSRQ (dB): -6.0 Cell ID: 01A2D101 (27447553)
SINR (dB): 29.0

OK

at+cgcontrdp
OK
at+creg?
+CREG: 0,2

OK
a/
+CREG: 0,2

OK