PLS62-W Leaving Airplane **** | Telit Cinterion IoT Developer Community
February 3, 2023 - 6:25pm, 413 views
I have a PLS62-W running firmware 02.010. To conserve power when the device is out of network range I planned to put the modem into Airplane mode (CFUN=4) and then periodically return to normal mode (CFUN=1), wait for SYSSTART, and attempt registration (COPS=0). This seems to work well in normal scenarios with an activated SIM card. The problem I'm having is when the device has a SIM card that isn't activated with a carrier. Under this scenario, when I issue COPS=0 the modem doesn't respond at all. I can set COPS=2 and I can query it (COPS?) but if I try to set it to 0 the modem just doesn't respond, no OK and nor error. I've found that if I don't set COPS=0 after SYSSTART the modem will eventually issue a +PBREADY about 3 minutes later and then the COPS=0 command will work.
While this may not be a typical scenario, it has come up during testing and I'm trying to mitigate it. I don't know of a method for determining whether or not the SIM card is activated so it's hard to work around. For now, it seems that I have to power the modem off/on instead of using Airplane mode. This works but I have to wait 30 seconds to receive the +PBREADY every time I turn the modem on.
I'm hoping there's a better solution available!
Hello!
1) What exactly do you mean by "SIM card that isn't activated with a carrier"?
Do you mean a brand new SIM that was never used or attached with?
Some operators/SIMs require a configuration that PLS62-W sometimes can't handle.
If you have a SIM like this try to put it in your phone to perform the first initialization.
After that it should work well.
It's still a bit puzzling that +PBREADY is taking so long as according to by best knowledge CFUN=4 shouldn't interfere with reading data from SIM card.
2) Are you waiting for COPS=0 to timeout? First SIM attach will always take an extended period of time due to initialization that I mentioned before. To add up COPS=0 won't work before +PBREADY as mentioned in the AT command specification.
3) Going into Airplane mode is ok, additionally to conserve power I suggest looking into AT^SPOW command
Thank you for using Telit Cinterion IoT Developer forum!
Best regards,
Lukasz
1. I'm referring to a SIM card that does not have an active plan with a cellular carrier. This could be a new unused SIM card or one that was previously used with a carrier but the plan has been canceled. I've tried both and they produce the same behavior.
2. I do wait for the COPS=0 timeout but it takes an exceptionally long time under the conditions from (1). I had hoped that this command would simply kick off the automatic registration search and respond with OK quickly. Instead it appears the command doesn't respond until the registration search completes.
3. I do plan to implement the power savings next.
I did some additional testing and found that this issue with COPS=0 isn't unique to exiting Airplane mode, it also occurs after module boot. The difference is that after boot the modem automatically attempts registration (COPS=0) so I don't send this command and simply wait for a registration URC. However, when switching out of Airplane mode (CFUN=4 => 1) the modem doesn't switch to COPS=0 automatically. I have to manually issue the command and that's where I initially observed this long response delay.
Ideally, COPS=0 would provide a more immediate response acknowledging the automatic search has begun and not wait for it to complete. Alternatively, if it were possible to have the module use the same behavior when leaving Airplane mode as it does when it boots (auto switch to COPS=0).
Hello Eric,
I was trying to fix the issue with *** characters and I mistakenly replaced your recent post with what Lukasz wrote before. These stars are put by the automatic phonetic filter. I modified the configuration but then I had to open the post for editing and save.
I'm sorry for that.
Could you edit it or write again?
Best regards,
Bartłomiej
Hello,
Thank you for the update.
When you issue AT+COPS=0 the module tries to perform the automatic attach and it might take some time until it replies. The command does not reply immediately but after the attach result is available. So it's worth waiting even a few minutes. How long does it take in your scenario? How long is it when you have an active SIM?
If the SIM isn't activated the module will never succeed in that and the command should return after a timeout. For this command it should be no longer than 155s.
You can also try to send some other command which should break the COPS execution.
+PBREADY means that the module has finished reading the SIM card data, no network registration is possible before that.
It is true that after leaving airplane mode you should trigger the network registration with AT+COPS command.
Regards,
Bartłomiej
Thank you for confirming the expected behavior. With an activated SIM the registration usually occurs within a few seconds. The unactivated one does time out after about 155s as you suggested. When you say another command will break the COPS execution, is simply sending AT sufficient? Does that actually stop the registration attempt or just simply return the command interface to an idle state?
Yes, sending just AT should interrupt the previous command execution and cause that ERROR result is returned.
After that the module may stay unregistered.