-
Notifications
You must be signed in to change notification settings - Fork 81
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
deep sleep state #75
Comments
Hi there: I'll need to refresh my memory, and probably consult @philwareublox, the expert in these matters (who is out of the office this week) but I believe the answer is that there is no good way, which is why I kept that URC detection over in the private area. I will get back to you... |
Having consulted the oracle @philwareublox, you are quite correct that a callback for If you have also enabled "UART power saving" then the physical HW of the module may then enter a very low power deep sleep state; it also may not, i.e. you may get Consequently Given the above, would a callback on |
hi Rob It is fine for us if its only work for SARA-R5. we use a SARA R510s module. we rather think of a get function for the deepSleepState What do you think about that? |
If that is sufficient it would be easier to implement; in order to decouple it from deep sleep ('cos deep sleep requires 3GPP power saving but 3GPP power saving does not necessarily mean that there will be deep sleep), and since we already have
Would that be OK? |
that would be great. since there is |
Yup, can do that, let me put something together and I'll post a preview branch here for you to look at. |
I have pushed a preview branch here: https://github.com/u-blox/ubxlib/tree/preview_cell_3gpp_ps_state Note that I've performed no testing on this as yet, all I know is that it passes compilation/static-analysis/doxygen/code-style checking. When you get a chance, please let me know if it does what you want and I will then start testing. |
that was fast. thank you that is exactly what we need. |
Great, thanks for the swift feedback. Feel free to use the preview branch if you want to get moving quickly; I won't be able to get the testing/reviewing done until next week but I think it is pretty unlikely to change. When I have update the |
Hi There seems to be a issue when this seems to be because in |
Ah, well spotted, so would this be the right fix do you think (see the additional "or" check on
|
yes that should fix the issue. Thank you |
Great, I've updated the preview branch. Haven't managed to get this onto |
btw during the long time test we noticed that sometimes the at client seems to be confused what was already read from the RX buffer. Have you observed this behavior on your test system or do you have an idea what could be causing it? |
That's interesting: our testing is limited to about 40 minutes of fairly intense AT activity, we don't have a long term test setup at the moment, hence it's not something I've seen. That said, the test system re-write is intended to allow us a lot more flexibility, so we could set such a thing up. Can you describe the kind of scenario? |
the scenario is as follows:
this works for an hour and more before the error occurs |
Great - looks like it is time I set that up as a separate long-term test. Will aim to do so in the next few weeks. The buffering code in the AT Client is more complex than it needs to be in order to support the intercept functions, needed by short-range EDM mode and cellular chip-to-chip encryption, so there could be a problem in there somewhere. |
is there a way around this when it is not needed? This is because the application will stop working if it thinks it is receiving data that does not really exist. |
Unfortunately not - the code is just written to include that functionality (see bufferFill()), taking it out would require re-writing the code, which would of course be simpler, but then you've got new AT Client buffer handling code to re-test, whereas the current stuff has been in place for a few years now and so is, at least in other respects, pretty well hardened. We will work to track it down: if you gain any further insights please update this ticket, or maybe start another dedicated to the subject. |
Hi Rob what we see when the issue occurs is that
|
Interesting: depending on how adventurous you feel and how much static RAM you have free, there is a compilation switch When defined this causes log points that are already present in the code to become active and record the AT Client buffer state to a static logging buffer. The logging is started and stopped with I'm not yet done with the test system re-write, should be this week though, then I can try to reproduce the problem. |
thanks for the hint. I have seen this option, unfortunately we dont have enough memory for it. |
How much RAM might you have free? We currently set the number of entries in the logging array to 1000, which is likely overkill. Each entry is 16 |
thanks this way it fits the issue seems to occur between place 3 and 4.
|
Oooo, interesting, let me refresh my memory as to what the log points mean and I'll post back here... |
Hmmm, yes, you're right: between And, barring stack weirdness, the only way it can do that is if Are you using a debugger? If so, might it be possible to drop some diagnostic information into some variables down in the UART driver and then put a break-point on where the problem occurs and go look at them? If not, let me try to think up something else. |
Yes we use a debugger. We will do it as you suggested. However, the issue occurs only rarely and sometimes first after hours. |
Thanks, and sorry to encumber you with this, I really will get to it next week, but if you happen to find out something first then do let me know. |
no problem. We are grateful that you point us in the right direction. |
I think we have found the problem the error happened when we migrated the STM32F4 porting layer to STM32L4.
since then the error has not appeared again |
Woohoo! Well found, the ST HAL is a bit of a nightmare for "out by one" problems. I really hope that is it; if not, please don't hesitate to raise the problem again. I won't feel encumbered :-). |
I believe the issues raised here are now sorted with commit 0c56afa being pushed to |
Hi Rob
is there a way to detect when the module is going to enter deep sleep right before vint = low?
I think the only possibility is to check for
+UUPSMR: 1
URC. I have seen that you already do this in the "private" area.is it possible to make the
deepSleepState
readable through the API as well?The text was updated successfully, but these errors were encountered: