Difficulty setting apn

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.

The above problem does not seem to occur when the SIM is unlocked, only when the SIM is using a PIN.
A SIM using authentication and no PIN works fine.
I have previously had problems using a PIN.

I don’t know how connections happen with the network.
Is it possible that the same connection identifier is being used between two devices if the SIM is locked on boot?
Perhaps that is why the credentials from one device ended up on another, because the connection was essentially being reused between two different devices.

no problem is found with SIM pin locked.

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

root@swi-mdm9x28-wp:~# cm info
Device: WP7702
IMEI: 352653090002775
IMEISV: 2
FSN: VU735370350701
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: 29 Unexpected: 0
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: 123456
PDP Type: IPV4V6
Connected: no
root@swi-mdm9x28-wp:~# cm data apn 11111
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: 11111
PDP Type: IPV4V6
Connected: no
root@swi-mdm9x28-wp:~# cm sim enterpin 0000
Success.
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: 11111
PDP Type: IPV4V6
Connected: no
root@swi-mdm9x28-wp:~# cm data apn 99999
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: 99999
PDP Type: IPV4V6
Connected: no
root@swi-mdm9x28-wp:~# cm sim
SIM card is inserted and unlocked (LE_SIM_READY).

I have tried for a long time now to set the apn and auth on data profile 1.
Possibly the network keeps overriding the values I put in, but they are never applied.
The values they are being replaced with are valid apn details, they will allow the device to connect to the network.
The apn details I am trying to apply are for a corporate VPN.

The solution appears to be to use data profile 2, which seems to work fine every time.

I had a eureka moment and have discovered what the problem actually is.

Windows 10 was taking control of the modem and setting the apn details.
Start > Settings > Cellular > uncheck ‘Let Windows manage this connection’

It feels silly in hindsight, but obvious once I discovered what the problem was.

I used your way of changing the APN @shib but when I want to run cm data connect this what happens:

root@swi-mdm9x28-wp:~# cm data connect
Setting up profile 1
Connecting ... ok
Checking if device 'rmnet_data0' is up ... ok
Routing inet ... ok
mv: can't remove '/etc/resolv.conf': Device or resource busy
Routing inet6 ... ok
mv: can't remove '/etc/resolv.conf': Device or resource busy
Testing connection ... ok

After that I try to ping mangoh.io but not a single packet is received:

root@swi-mdm9x28-wp:~# ping mangoh.io
PING mangoh.io (35.184.189.106): 56 data bytes
^C
--- mangoh.io ping statistics ---
9 packets transmitted, 0 packets received, 100% packet loss