-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSM and EDRX negotiating issues #201
Comments
Hi Aleksandr: could be many reasons - would it be possible to post the AT command exchange that |
sure, here you go
|
Thanks. These are the commands which set the module up to request 3GPP power-saving:
The answer from the network comes back on the end of the
The "Assigned Active Time" is As to why the network is not letting you have 3GPP power saving, your first port of call should probably be to enquire with them. @philwareublox: do you know of any common reasons? |
+CEREG: 5 means ROAMING. I have found networks only allow eDRX and PSM features on Home SIMs. The MNO provide should be able to confirm this is the case. |
Thanks for this detailed analysis! It REALLY helped. I talked with the SIM card service support. I'm in Estonia and I'm using a 1oT SIM card. We have had their SIMs for a while and there is a fact that they don't support LTE-M / NB-IoT technologies that allow usage of PSM/eDRX. So now need to find a solution that supports this technologies and then I hope I'll get things done. I'll leave my comments about the progress anyway here. |
I have just received new SIMs, and my provider says that they are now LTE-M and should be compatible with PSM/eDRX. But the problem is that I still can't activate PSM/eDRX:
This is his answer about the roaming for now:
|
I provide the APN "terminal.apn" to the
Any idea why the APN is changing to something more sophisticated and how to keep the original one? |
Hi again Aleks.
The PSM activation commands, i.e.:
...are not in the AT log fragment you have posted, it looks as though in this case you are requesting EDRX instead with:
Once you are registered with the network, the EDRX values that the network has assigned can be read with uCellPwrGetEDrx(): could you post here the AT exchange that results when you call that API after having requesting EDRX? You should get a URC from the module, Did you try the PSM activation commands and then look for the response from the network on the end of the
...meaning deactivated: has that binary-coded number changed at all? |
This is just something networks do I'm afraid, just to confuse us I guess. It is nothing to worry about, the APN is fine, it is the one you asked for. |
I have found an interesting fact from my SIM provider. It's a super SIM that can connect to different mobile operators, only 1 of them has a CAT-M1 connection. So I need to forcefully point the modem to which operator to connect exactly but I don't find any proper place in the ubxlib where I can do that. I use uNetworkInterfaceUp to connect to the network but it doesn't have an |
Ah, yes, that might explain it. See below for the parameter you want: manual network selection has always been possible down at the ubxlib/common/network/api/u_network_config_cell.h Lines 102 to 106 in b7e8edc
|
Thanks! But now I'm really stuck. The code is updated, operator is M1 but something still keeps me from power saving.
|
That is certainly a step forward; the response from the network no longer says "deactivated":
The value The example code is waiting for the module to send a URC, What you could do instead is call uCellPwrGetEDrx(), that would be another way of confirming what has been agreed. That or you could maybe stimulate some data transfer and then the URC might be emitted. But it certainly looks to me as though you have probably succeeded. EDIT: in order to avoid this misleading people in the future I will update the example to call uCellPwrGetEDrx() if the callback has not been called and print something informative as a result. |
The example is now updated, see 3da65fc. |
Hello again Rob! I'm still struggling to get my eDRX working with no luck I have added a piece of code checking eDRX parameters like from the sample you've updated with uCellPwrGetEDrx. Below is a part of the log with the start of the eDRX-related stuff until the answer is that there's nothing about that.
And here starts the loop waiting for eDRX to set
But I have a question to everything that is going on here.
As wee see, no eDRX. |
Hi, We see UBXLIB sending the AT+CEDRXS command to "request" eDRX to the network. Later we see UBXLIB checking what the network has configured with AT+CEDRXRDP. If you are able to manually control the cellular module you can check this yourself by sending AT+CEDRXS and then checking the network's response with AT+CEDRXRDP. If you are doing this you can also enable +CSCON URC to check the module is sending the request to the network. AT+CSCON=1 AT+CEDRXS=..... +CSCON: 1 # Module communicates edrx settings request to network. AT+CEDRXRDP Regards, |
|
Looking at the detail of the first part of your log, it looks pretty much the same as you had before (the print is broken up by the
...indicates that E-DRX has been agreed with the network, active time 32 seconds. Then you get For the remainder I will take you through what I see and where it seems the code is going and would recommend you poke around with some debug prints etc. to determine what is going on. The sequence beginning Following the code through from the top, the AT client will call uCellPrivateWakeUpCallback(), which is the only function that calls deepSleepWakeUp(). uCellPrivateWakeUpCallback() always calls uCellPrivateIsDeepSleepActive() first to determine how sleepy we were. uCellPrivateIsDeepSleepActive() will only return So to find out what is going on, I recommend scattering debug prints around the code in the path mapped above; debug prints should not affect the module itself in this case and so should not, themselves, affect the problem. In particular, assuming you have connected |
Could you possible paste here the initial part of the log above? I can see that it says E-DRX makes sense as an "occasional" sleep mechanism for a relatively active device that wants to save power, with no intervening deep-sleep that would lose all RAM contents (see advice here), 3GPP power saving on the other hand will lose all RAM/context in the module and the module will take longer to power back up again, it is intended for "wake up once a day" kind of devices. I thought you were running the E-DRX example but if you are enabling 3GPP Power Saving as well as E-DRX then you would get the behaviour above, i.e. the module really has gone into deep sleep and it needs to be woken up "from scratch". |
I just integrated your example into my code but before that, there is nothing special: load the OS -> uNetworkInterfaceUp -> code from e-drx example. This is the piece of log just right before the previous part
|
By means of uCellPwrGet3gppPowerSavingState I have found that exactly right after that 30-second loop my state is U_CELL_PWR_3GPP_POWER_SAVING_STATE_ACTIVE but I don't set the 3GPP before my e-DRX settings. As I explained already the code right now is just this: load the OS -> uNetworkInterfaceUp -> code from e-drx example. How can it be possible? |
I think what might have happened is that the 3GPP Power Saving test was once run on this cellular module and the module has remembered that setting (which of course it has to since it switches all RAM off once it enters deep sleep). You can see
...where the So effectively you have both 3GPP Power Saving and E-DRX on; double the fun but probably not what you wanted. Adding a call to uCellPwrSetRequested3gppPowerSaving() with
|
Thank you. Yes, I was experimenting with both power-saving modes in the beginning. Did it! That changed CPSMS to 0 but that's strange that the modem remembers this state after reset which seems unnatural because RAM should be cleared after reset. But anyway, my device still struggling to get any positive answer from the network about settling eDRX parameters down. How can I help it now? After that 30-seconds loop of checking if eDRX is set modem's power state is U_CELL_PWR_3GPP_POWER_SAVING_STATE_AVAILABLE. |
Good stuff! The issue with this particular command is that, for the kind of deep sleep the module can enter as a result of 3GPP power saving, only the RTC is left running, the entire module is otherwise effectively off, so it has to store the fact that it was asked to enter 3GPP power saving mode in NVRAM, which of course persists across any reset.
Could you paste the debug output into here, so that I can see what is happening now that 3GPP power saving is not getting in the way? |
|
Agreed, as far as I can see the cellular module is being configured to request E-DRX (
...after
I guess it is possible that the network supports 3GPP Power Saving (that was clearly working) but doesn't support E-DRX? Any other suggestions @philwareublox? |
I perhaps didn't quite get you well but I put 5 instances of
to the places you pointed out and 2 before setting eDRX as I have uNetworkInterfaceUp before the function from the example setting eDRX. Anyway, here is the log. I don't know if it helps.
And I have asked my provider about the eDRX exactly. Waiting for his reply. |
Apologies, my explanation was partly wrong and also quite confusing, let me try again: I intended the below, comments beginning with Also, since the AT commands
|
Thank you @RobMeades for all your support. It was super intense and really helpful! My SIM card provider just told me, to their surprise as well, that eDRX is not supported by the mobile operator servicing my virtual operator and it seems that in Estonia there is no possibility to test this feature nowadays yet. Although PSM 3GPP works. |
Darn, that's a shame! Well, we did try. I don't know whether the rather more "on/off" type 3GPP PSM works for your application or not...? |
We will elaborate on this question now |
Hi Aleksandr: do we still need to keep this issue open? |
Hello, I have such a system, SARA-R510M8S-01B + nRF5340 and I'm trying to negotiate PSM or E-DRX modes.
Let me explain what I get from the modem.
Almost all the required code to set uCellPwrSet3gppPowerSavingCallback and uCellPwrSetRequested3gppPowerSaving is copied from cell_power_saving_3gpp_main.c. These procedures come first in the code from booting up the OS, so there is no other stuff with the modem before them. I also have a timer of 30 seconds waiting for the callback from the network about this negotiation.
Running this code I can see this:
How can I understand the reason why the network almost immediately responds with the -1?
The text was updated successfully, but these errors were encountered: