Difficulty setting apn

WP7700 running Legato 19.07 (firmware release 12).

I am trying to change the apn and the auth method for this sim, but none of the changes are being applied.
I have come across this problem many times before, and the only way I can get the apn to change is to revert to a previous firmware version.
The situation only seems to occur when using authentication.
I have mentioned this issue previously, but the bug that it was suggested that I was seeing is no longer in the known issues list for release 12.

root@swi-mdm9x28-wp:~# cm sim status
SIM card is inserted and locked (LE_SIM_INSERTED).

root@swi-mdm9x28-wp:~# cm data info
Index:                         1
APN:                           telstra.internet
PDP Type:                      IPV4
Connected:                     no
root@swi-mdm9x28-wp:~# cm sim enterpin xxxx
Success.
root@swi-mdm9x28-wp:~# cm data info
Index:                         1
APN:                           telstra.corp
PDP Type:                      IPV4
Connected:                     no
Auth type:                     CHAP
User name:                     user@url.com
Password:                      password
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 0, new 1
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to up
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to down
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-64
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-64
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 0, new 1
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to up
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to down
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-64
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-64
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 0, new 1
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to up
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to down
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-64
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-64
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 0, new 1
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to up
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0

how about using AT+CGDCONT to change?

I will give this a go when I encounter this next and will let you know how it goes.

Good afternoon @shib,

Just thought I’d run this quickly on my side and it seems OK in my test. (note I’ve removed the obvious bits of info given its a public forum :slight_smile:)

root@swi-mdm9x28-wp:~# cm info all
Device:                        WP7702
IMEI:                          352653090002973
IMEISV:                        4
FSN:                           VU735370600901
Firmware Version:              SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
Bootloader Version:            SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
MCU Version:                   002.013
PRI Part Number (PN):          9907365
PRI Revision:                  001.001 
Carrier PRI Name:              GENERIC
Carrier PRI Revision:          001.055_000
SKU:                           1103530
Last Reset Cause:              Reset, User Requested
Resets Count:                  Expected: 55	Unexpected: 3

cm sim
SIM card is inserted and unlocked (LE_SIM_READY).

root@swi-mdm9x28-wp:~# cm data
Index:                         1
APN:                           telstra.iot
PDP Type:                      IPV4
Connected:                     no
root@swi-mdm9x28-wp:~# cm radio
Power:                         ON
Current Network Operator:      Telstra Mobile
Current RAT:                   Module not registered on network, RAT not available
Status:                        Not registered but currently searching for a new operator (LE_MRC_REG_SEARCHING)
Signal:                        Good signal strength (3)
PS:                            Packet Switched Not registered (LE_MRC_REG_NONE)

root@swi-mdm9x28-wp:~# cm data apn "telstra.internet"
root@swi-mdm9x28-wp:~# cm radio off
root@swi-mdm9x28-wp:~# cm radio on
root@swi-mdm9x28-wp:~# cm radio
Power:                         ON
Current Network Operator:      
Current RAT:                   Module not registered on network, RAT not available
Status:                        Not registered but currently searching for a new operator (LE_MRC_REG_SEARCHING)
Signal:                        No signal strength (0)
PS:                            Packet Switched Not registered (LE_MRC_REG_NONE)

root@swi-mdm9x28-wp:~# cm radio
Power:                         ON
Current Network Operator:      Telstra Mobile
Current RAT:                   LTE network (LE_MRC_RAT_LTE)
Status:                        Registered, home network (LE_MRC_REG_HOME)
Signal:                        Very strong signal strength (5)
PS:                            Packet Switched Registered, home network (LE_MRC_REG_HOME)

root@swi-mdm9x28-wp:~# cm data
Index:                         1
APN:                           telstra.internet
PDP Type:                      IPV4
Connected:                     no
root@swi-mdm9x28-wp:~# cm data auth CHAP "user@domain.com" "UserPassword"
root@swi-mdm9x28-wp:~# cm data apn "telstra.corp"
root@swi-mdm9x28-wp:~# cm data info
Index:                         1
APN:                           telstra.corp
PDP Type:                      IPV4
Connected:                     no
Auth type:                     CHAP
User name:                     user@domain.com
Password:                      UserPassword
root@swi-mdm9x28-wp:~# cm radio off
root@swi-mdm9x28-wp:~# cm radio on
root@swi-mdm9x28-wp:~# cm radio
Power:                         ON
Current Network Operator:      Telstra Mobile
Current RAT:                   LTE network (LE_MRC_RAT_LTE)
Status:                        Registered, home network (LE_MRC_REG_HOME)
Signal:                        Very strong signal strength (5)
PS:                            Packet Switched Registered, home network (LE_MRC_REG_HOME)

root@swi-mdm9x28-wp:~# cm data info
Index:                         1
APN:                           telstra.corp
PDP Type:                      IPV4
Connected:                     no
Auth type:                     CHAP
User name:                     user@domain.com
Password:                      UserPassword
root@swi-mdm9x28-wp:~# cm data connect
Setting up profile 1
Connecting ... ok
Checking if device 'rmnet_data0' is up ... ok
Routing inet ... ok
Updating /etc/resolv.conf ... ok
Updating /etc/resolv.conf ... ok
Testing connection ... ok
root@swi-mdm9x28-wp:~# cm data info
Index:                         1
APN:                           telstra.corp
PDP Type:                      IPV4
Connected:                     yes
Auth type:                     CHAP
User name:                     user@domain.com
Password:                      UserPassword
Interface:                     rmnet_data0
Family[IPv4]:                  inet
IP[IPv4]:                      10.20.x.yy
Gateway[IPv4]:                 10.20.x.xy
Dns1[IPv4]:                    139.130.4.4
Dns2[IPv4]:                    203.50.2.71
root@swi-mdm9x28-wp:~# cm radio
Power:                         OFF
Current Network Operator:      
Current RAT:                   Module not registered on network, RAT not available
Status:                        Not registered and not currently searching for new operator (LE_MRC_REG_NONE)
Signal:                        No signal strength (0)
PS:                            Packet Switched Not registered (LE_MRC_REG_NONE)

root@swi-mdm9x28-wp:~# cm data auth NONE
root@swi-mdm9x28-wp:~# cm data apn "telstra.internet"
root@swi-mdm9x28-wp:~# cm radio on
root@swi-mdm9x28-wp:~# cm radio
Power:                         ON
Current Network Operator:      Telstra Mobile
Current RAT:                   LTE network (LE_MRC_RAT_LTE)
Status:                        Registered, home network (LE_MRC_REG_HOME)
Signal:                        Very strong signal strength (5)
PS:                            Packet Switched Registered, home network (LE_MRC_REG_HOME)

root@swi-mdm9x28-wp:~# cm data connect
Setting up profile 1
Connecting ... ok
Checking if device 'rmnet_data0' is up ... ok
Routing inet ... ok
Updating /etc/resolv.conf ... ok
Updating /etc/resolv.conf ... ok
Testing connection ... ok
root@swi-mdm9x28-wp:~# cm data info
Index:                         1
APN:                           telstra.internet
PDP Type:                      IPV4
Connected:                     yes
Interface:                     rmnet_data0
Family[IPv4]:                  inet
IP[IPv4]:                      10.96.134.15
Gateway[IPv4]:                 10.96.134.16
Dns1[IPv4]:                    10.4.149.70
Dns2[IPv4]:                    10.5.133.45
root@swi-mdm9x28-wp:~# 

Regards,
Tyrone

Hi Tyrone,

when everything is working properly I can freely change the apn as you demonstrated.
The issue I have is when a mangoh has previously had a successful data connection with SIM_A, and SIM_A is then swapped for SIM_B, which uses a different set of credentials.

Once the device has started playing up, I have never been able to get it working again without re-applying the firmware.

I am getting a new lot of SIMs in December, and expect to see this problem again as some of the Mangohs have been used before with a different SIM.
I will take the time to do some more testing then.

Hi @shib,

Have you tried using another Data Connection Profile, I.E., cm data profile 2?

I have not. I will certainly try that though.

@jyijyi
I had a look at AT+CGDCONT and wasn’t sure how I might use that.
I am not making use of the airvantage service.

@raf
Changing to data profile 2 worked. Once I changed to profile 2 I was able to freely change the apn details.

The only way I can change the apn on profile one is by following this procedure:

  1. Turn radio off
  2. Set apn
  3. Set auth
  4. Reboot

These are the results when trying to change profile 1:

example on using +CGDCONT to set APN of profile 1 to “hkcsl”:
AT+CGDCONT=1,“IP”,“hkcsl”

That was unsuccessful.

That means the firmware does not let you to change.
Have you tried another fw?

This has been happening to me since the beginning, in every firmware release so far for the WP7700.
I don’t believe it is their intention to prevent the apn being changed, I think it is a bug.

I am able to change the apn on profile 1, I just need to follow the procedure I described before:

After doing that, AT+CGDCONT? returns the changed apn.

i don’t see problem on my WP7702…

root@swi-mdm9x28-wp:~# cm info
Device: WP7702
IMEI: 352653090002874
IMEISV: 2
FSN: VU735370521401
Firmware Version: SWI9X06Y_02.16.06.00 7605a6 jenkins 2018/06/20 17:56:12
Bootloader Version: SWI9X06Y_02.16.06.00 7605a6 jenkins 2018/06/20 17:56:12
MCU Version:
PRI Part Number (PN): 9907365
PRI Revision: 001.001
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.028_001
SKU: 1103530
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 596 Unexpected: 256
root@swi-mdm9x28-wp:~# legato version
18.06.1_7bc924287cc41a0157bd414af840e754
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: nbiotdirect
PDP Type: IPV4
Connected: no
root@swi-mdm9x28-wp:~# cm data apn hkcsl
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: hkcsl
PDP Type: IPV4
Connected: no
root@swi-mdm9x28-wp:~#

I didn’t see in your example you setting the authentication details.
Can you please try:

cm data apn xxx
cm data auth CHAP yyy zzz
cm data info

Mine falls over when setting the authentication.

I am not sure which layer handles this feature, but I have previously been using: 9999999_9908397_SWI9X06Y_02.32.02.00_00_TELSTRA_001.035_000.spk
And I have just tried:
9999999_9907618_SWI9X06Y_02.32.02.00_00_GENERIC_001.055_000.spk
And both suffer from the same problem.

no problem is found:

root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: hkcsl
PDP Type: IPV4
Connected: no
root@swi-mdm9x28-wp:~# cm data apn xxx
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: xxx
PDP Type: IPV4
Connected: no
root@swi-mdm9x28-wp:~# cm data auth CHAP yyy zzz
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: xxx
PDP Type: IPV4
Connected: no
Auth type: CHAP
User name: yyy
Password: zzz
root@swi-mdm9x28-wp:~# cm data info
Index: 1
APN: xxx
PDP Type: IPV4
Connected: no
Auth type: CHAP
User name: yyy
Password: zzz
root@swi-mdm9x28-wp:~# cm data apn hkcsl
root@swi-mdm9x28-wp:~# cm data info
Index: 1
APN: hkcsl
PDP Type: IPV4
Connected: no
Auth type: CHAP
User name: yyy
Password: zzz
root@swi-mdm9x28-wp:~# cm info
Device: WP7702
IMEI: 352653090002874
IMEISV: 2
FSN: VU735370521401
Firmware Version: SWI9X06Y_02.16.06.00 7605a6 jenkins 2018/06/20 17:56:12
Bootloader Version: SWI9X06Y_02.16.06.00 7605a6 jenkins 2018/06/20 17:56:12
MCU Version:
PRI Part Number (PN): 9907365
PRI Revision: 001.001
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.028_001
SKU: 1103530
Last Reset Cause: Power Down
Resets Count: Expected: 597 Unexpected: 256

Thank you for that.
The fact that it works for you but not for me is a bit strange.

A few possible differences between our setups is that I am using SIMs with a static IP, and that I have previously established a data connection using authentication.

I will explore this a bit more and post back if I find anything conclusive.

There is something very odd happening.

I just did a clean install on a Mangoh red. This mangoh has never had any credentials stored.
I had only just been working on a different Mangoh with a unique set of apn credentials.
After programming this unit it started displaying the credentials that I had programmed in to previous unit.

This is the output of cm data info over a few minute period. Username and password have been scrubbed.

cm data info output

root@swi-mdm9x28-wp:~# cm data info
Index: 1
APN: telstra.internet
PDP Type: IPV4
Connected: no
root@swi-mdm9x28-wp:~# cm data info
Index: 1
APN: telstra.corp
PDP Type: IPV4
Connected: no
Auth type: PAP
User name: user@domain
Password: pass
root@swi-mdm9x28-wp:~# cm data info
Index: 1
APN: telstra.internet
PDP Type: IPV4
Connected: no
root@swi-mdm9x28-wp:~# cm data info
Index: 1
APN: telstra.corp
PDP Type: IPV4
Connected: no
Auth type: PAP
User name: user@domain
Password: pass
root@swi-mdm9x28-wp:~#

This is the output from the log over the same period

log output

dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to down
dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0x1ab event Temporary Down
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60
mobile_uploader.c app_state_dataconnection_callback() 285 | data connection status: 0
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 0, new 1
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to up
dcsCellular.c le_dcsCellular_RetryConn() 1271 | Cellular connection 1 already maxed out retry allowed (4)
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to down
dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0x1ab event Temporary Down
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60
mobile_uploader.c app_state_dataconnection_callback() 285 | data connection status: 0
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 0, new 1
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to up
dcsCellular.c le_dcsCellular_RetryConn() 1271 | Cellular connection 1 already maxed out retry allowed (4)
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to down
dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0x1ab event Temporary Down
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60
mobile_uploader.c app_state_dataconnection_callback() 285 | data connection status: 0
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 0, new 1
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to up
dcsCellular.c le_dcsCellular_RetryConn() 1271 | Cellular connection 1 already maxed out retry allowed (4)
dcsCellular.c DcsCellularPacketSwitchHandler() 736 | Packet switch state: previous 1, new 0
dcs_db.c le_dcs_EventNotifierTechStateTransition() 310 | Notify all channels of technology 2 of system state transition to down
dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0x1ab event Temporary Down
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60
mobile_uploader.c app_state_dataconnection_callback() 285 | data connection status: 0
le_mrc.c SignalStrengthIndHandlerFunc() 876 | Signal Strength Ind Handler called with RAT.4 and ss.-60

The particular credentials it had seemingly magically gained are brand new, I was only sent them yesterday so there is no way for this unit to have had them programmed.

AT+CGDCONT? output

AT+CGDCONT?
+CGDCONT: 1,“IP”,“telstra.internet”,“0.0.0.0”,0,0,0,0

OK
AT+CGDCONT?
+CGDCONT: 1,“IP”,“telstra.corp”,“0.0.0.0”,0,0,0,0

OK
AT+CGDCONT?
+CGDCONT: 1,“IP”,“telstra.internet”,“0.0.0.0”,0,0,0,0

OK

what do you mean?
Do you mean the APN is changed automatically?
Some LTE network will push the APN to the module.

Yes the APN is being changed automatically, back and forth, over and over ad nauseam.
Where it gets strange is the APN authentication details are also being changed.

These sims were organised by the customer, and are on fixed IPs, but the credentials for each are unique.
It seems strange that if the ISP were pushing out APN details that they would be sending authentication details as well.

Do you know if there is a way to disable that or is it a necessary feature?

I think this is feature of LTE.
I remember I tried a roaming SIM card before, it will automatically change the APN when start.