“Profile could not be activated”-errors with BGS5 | Telit Cinterion IoT Developer Community
February 7, 2019 - 9:50am, 3237 views
Hi,
I have some questions about the opening of connections after the modem has rebooted. I have encountered two situations within the same device, with just an hour apart. At that particular time the same configured APN is used to make a connection. In the first case, the device is not able to make a connection at all. After a reboot using AT+CFUN=1,1, a connection is made quickly and easily. In both cases, the signal strength (as measured by AT^SMONI) was more than enough to make a connection with a dbm > -60.
Multiple devices with the newest modem firmware from Gemalto installed (version 00.000.31) encounter this problem. However, the same issue occurs on devices with the older firmware installed (version 00.000.21).
Device (ATI1 response)
Cinterion
BGS5
REVISION 01.100
A-REVISION 00.000.31
Details
1. After the +PBREADY event the application tries to connect to an NTP server, but only when the signal strength is more than enough to make a connection. Additionally, another connection is opened to send data.
2. First the signal quality is determined via AT^SMONI. Initially there is an unknown signal quality (SMONI signal strength indicated 99). This caused the application to wait with connecting. A few seconds later the signal strength is good enough (-59 dBm).
3. The device tries to open a TCP connection using Connector.open().
4. The BearerControlListenerEx class returns that it was not possible to connect. The listed error, is “27 = Missing or unknown APN.”
5. At some point, the application will attempt to deregister GPRS (by first issuing AT+COPS=2 and then AT+COPS=0)
6. Even going into airplane mode/flight mode (by using AT+CFUN=4,0 and then AT+CFUN=1,0) did not have the effect of subsequently allowing the device to correctly make a connection to the server
7.Regardless of the signal strength (which remains more than good enough all the time), the device is not able to make a connection for a hour or so, until the application triggered a reboot using AT+CFUN=1,1 command.
Interestingly enough, an SMS was able to reach the device, and this caused a reboot to be performed. Sending a text message back to the sender of the SMS message failed with some weird error: “Exception: com.cinterion.io.ATCommandFailedException-AT command: “OK, Rebooting now deliver Error: +CMS ERROR: Network out of order (service)”. After the reboot, the connection to NTP and additional server was established very quickly and without any errors. The exact same code and the exact same APN from the a local setting file was used.
Unfortunately, I am not able to reproduce this issue locally.
Questions
1. Can somebody explain why the BearerControlListenerEx returns error 27 (Missing or unknown APN) when the same APN is used, and the signal quality was just fine?
2. Is it possible to prevent this situation from occurring without a modem reboot?
Hello,
Is it happening frequently, to many devices, in a certain area only, near country border? For now it looks like it could be related to the network.
Please paste the complete SMONI output caught in this situation and AT+CSQ if your application reads it. Please compare SMONI outputs when the connection is working and not working. Maybe it fails only when the module is registered to a certain cell for example.
For now I don't know why there is 'Missing or unknown APN' error if APN is set. Do you have any log? Please check AT+CEER output when the connection fails. Please also paste AT^SCFG? output.
Regards,
Bartłomiej
Hi Bartłomiej,
Thank you for your quick response. The device was installed in a car that was driving on the highway (not near any country borden or particularly area). It regular happens about two ***** per week on about +/-10% of our installed base. Unfortunately, I dont have SMONI output available right now. I will integrate AT+CSQ, AT+CEER and AT^SCFG? into the application and come back to you when I can provide you with some logs.
Kind regards,
Kevin
OK, maybe the log will show the situation better. If the device is in a car driving on a highway it's getting more probable that it might be a network issue in a certain area or related to the fact that the device is moving fast. Please pay attention if the parameters are changing or maybe the device is loosing network.
On the other hand this 'Missing or unknown APN' is also interesting. Please make sure that your BearerControlListenerEx displays APN name. maybe your device is using some special private APN and/or is in roaming etc.
Regards,
Bartłomiej
Hi Bartłomiej,
As requested I have the following log files:
2019-02-14 11:19:40,141 [Thread-7] Ignition Off event
2019-02-14 11:19:40,158 [Thread-7] Ignition Off event occurred
2019-02-14 11:19:40,246 [Thread-7] Generated new sample 24819 of type 4
2019-02-14 11:19:41,763 [NewSample] CommManager: ack not received 24818
2019-02-14 11:19:42,73 [NewSample] Stored 2 message on disk in 291 ms
2019-02-14 11:19:42,106 [Server Commands] Connection closed
2019-02-14 11:19:42,401 [ConnectionLost] Lost connection
2019-02-14 11:19:42,445 [ConnectionLost] Lost connection
2019-02-14 11:19:42,734 [Thread-19] Bearer stage change: Closing, 0
2019-02-14 11:19:42,762 [Thread-19] Bearer stage change: Down, 0
2019-02-14 11:19:42,796 [RetrySending] Opening TCP connection
2019-02-14 11:19:42,838 [Thread-19] Bearer stage change: Unknown, 0
2019-02-14 11:19:42,882 [Thread-19] Bearer stage change: Connecting, 0
2019-02-14 11:19:42,925 [Thread-19] Bearer stage change: Down, 0
2019-02-14 11:19:43,72 [RetrySending] Exception: java.io.IOException-Profile could not be activated
2019-02-14 11:19:43,130 [RetrySending] APN problems for 'socket://vts-staging.wego.nu:8127;bearer_type=gprs;access_point=newline.mobi;username=;password='
2019-02-14 11:19:43,704 [RetrySending] Result:
^SMONI: 2G,4,-82,204,08,0C62,BC59,25,25,3,5,E,NOCONN
OK
2019-02-14 11:19:43,963 [RetrySending] Error response:
+CEER: "No report available"
OK
2019-02-14 11:19:44,244 [RetrySending] Current SQ: -82 dBm - POST,NL KPN
2019-02-14 11:19:44,262 [RetrySending] Failed to open connection
I hope you can help me with this problem because we still get the Profile could not be activated error while the correct APN is set and SQ (signal quatlity) is enough to start a connection. As mentioned before, after a reset the connection was established very quickly. The same code and APN setting where used.
Kind regards,
Kevin
Hello,
Profile could not be activated message is usually thrown when the module cannot connect to APN which in most cases happens when APN name is not correct (which is most probably not the case here) or the network quality is very bad (which also does not seem to be the reason in this case).
What I can see from the log is that the network operator that the module is registered to is KPN Telecom B.V. while APN name is newline.mobi which probably belongs to New Line Mobile B.V. which seem to be a global connectivity provider for M2M. Is New Line Mobile distributing SIM cards? If so your SIM is probably in roaming. Maybe it's a matter of which operator it is registered to - do you have more logs to compare if this problem possibly only happens with one operator for example? Maybe New Line Mobile does not have an agreement with KPN Telecom B.V. for data transmission for example.
Or there's something else. Which in turn might be hard to diagnose without getting traces from the module's firmware. If the devices are moving I assume that this problem is not restricted to any particular area.
Best regards,
Bartłomiej
Hi Bartłomiej,
Thanks!
New Line Mobile is indeed distributing the SIM cards. In this particular case the SIM card was roaming. However, the same problem occurred with other providers without roaming (e.g. Vodafone). New Line Mobile does have a data transaction agreement with KPN Telecom B.V. with a coverage for whole Europe, so this can't be the root cause.
I also checked if different cell sites where used, but this wasn't the case either. The device established a connection to a particular cell site, lost the connection (with a ‘profile could not be found’ error), and within 10 minutes opened a connection again on the same cell site and provider.
Can you please elaborate how I can get traces from the module's firmware?
Kind regards,
Kevin
Hello,
Such traces can only be made with internal tools. But I think that if you can't see any dependencies like network operator, cellID, frequency band, area, overloaded cells, interferences etc. it could be the only reliable way to possibly discover what could be the reason of this behavior if it's the network issue or module. But you'd have to contact Gemalto support directly or via your distributor. Or you can prepare the workaround that would include reboot as a last chance if anything else helps.
Your application could try to establish another connections with increasing delay. As I understand the module is registered to the network for all the time and there is only a problem with GPRS. Does the problem occur sins some certain time or was it always happening since you started this project? Does it happen when the application just starts or can it also happen after the successful data connection? Is only MIDlet used for data connections or is there any other processor using internet connections over AT commands?
Regards,
Bartłomiej
Hi Bartłomiej,
Thanks again!
We will contact our distributor and address this issue. Right now we use a workaround comparable what you describe in your post (OP point 5, 6 and 7).
The problem ("profile could not be activated") occured since the start of this project and primarily after a successful data connection has been established. Only the MIDlet is used for data connections.
If i have any updates on this specific problem I will let you know.
Thanks again for your support.
Kind regards,
Kevin