Comments (13)
Yes, it has now been running for several hours without any problems. I think it is OK. Thank you
from ubxlib.
Find here:
https://github.com/u-blox/ubxlib/tree/preview_feature_sock_forget_rmea
...a preview branch of the proposed uSockForgetAll()
. Let me know if it meets your expectations, or feel free to suggest any improvements.
from ubxlib.
looks good. thanks
from ubxlib.
Hi there. Yes, I think you are right, I had misinterpreted my own comment above uCellSockCleanup()
:
Lines 193 to 200 in 1b94ec5
...to mean that all sockets had been closed, which happens to be how we use it in our test cases, but of course that's not what it says, it should clean-up only unused sockets-related resources.
Let me try to figure out why I didn't put this in uCellSockDeinit() in the first place.
from ubxlib.
You may find a proposed fix in a preview branch here:
https://github.com/u-blox/ubxlib/tree/preview_fix_sock_clean_up_rmea
This passes our testing, but so did the original code, so please give it some through checking at your end; I am now just removing all of the URCs in uCellSockDeinit()
, just concerned that there was a [potentially thread-safety/race-condition related?] reason why I wasn't doing that before which I can no longer recall.
When you have confirmed that you are happy I will merge the change, push it out to master
here and delete the preview branch some time after that.
from ubxlib.
Hi Rob
looks good thank you.
another question regarding socket celanup:
What do you think about having a function that forces the socketcleanup.
After the module has switched to PSM, we are sure that all sockets are closed.
The reason why we do not close the socket beforehand is that we do not know exactly when the module will switch to PSM.
However, data can still be received from the socket as long as the module has not switched to PSM.
The second reason is that uSockClose
would wake up the module from power save for another 6 seconds.
from ubxlib.
Hi,
You are correct, when the module goes into PSM sockets are closed.
Waking up from PSM you must recreate the sockets and connect to the servers (TCP).
Regards,
Phil.
from ubxlib.
Hi
Thank you for your quick reply.
That's how we do it. But at some point the closed UDP sockets must be cleaned up in ubxlib.
Because the ubxlib does not recognise that the sockets were closed when the module switched to PSM.
from ubxlib.
Hmmm, yes, subtle. I was going to say that uSockDeinit() should do that but of course that would talk to the module, which you do not want.
So maybe uSockForgetAll()
? This would only do a ubxlib
-cleanup of socket resources, for all sockets, it would not deinitialise the sockets layer (i.e. URC handlers would remain loaded), it would not talk to the module at all. I would explain in the function header that the use-case for this is the returning-from-3GPP-sleep case.
from ubxlib.
Sounds good. That would help us
from ubxlib.
OK, I will do that as a separate change. Have you been able to test that the fix for the clean-up issue is good? If so I will get it reviewed and pushed back to master
here.
from ubxlib.
Fix for issue that was the subject of the original post now pushed to 3335108 here. Will do the "uSockForgetAll()
" change next and post a preview branch for that here.
from ubxlib.
The addition of uSockForgetAll()
is now on master
here, see commit 857e2a6. I will close this issue now [please feel free to re-open if there is more to discuss on this topic] and will delete the preview_fix_sock_clean_up_rmea
and preview_feature_sock_forget_rmea
preview branches some time next week.
from ubxlib.
Related Issues (20)
- capture all UBX data from GNSS module HOT 13
- Compiling in ubxlib triggers SecureFault in Trusted Firmware-M on nrf9160 HOT 12
- Cell Network Up Keep Going Callback Fails at Tick Wrap-Around HOT 2
- AT Client Character Wait Fails Once Ticks Wrap Beyond INT32_MAX HOT 2
- Some 64-bit milliseconds tick values were not migrated to 32-bit HOT 30
- Assistance Requested for Configuring ubxlib for LEAN_R8 on Linux HOT 134
- Problems selecting cipher suites HOT 16
- +CME ERROR: Operation not allowed HOT 11
- SARA-R510M8S: How to use cellular network and GNSS network simultaneously? HOT 5
- print ubxlib output to usb on nrf52840 dongle using Zephyr HOT 31
- SPI interface for short-range devices HOT 2
- Using pppd with LARA-R6 via USB HOT 31
- Function rand() do not provide a return status HOT 2
- C2C seems not to have a session counter HOT 2
- AssistNow for SARA-R510M8S HOT 4
- Support for NEO-F9P-15 Base & Rover HOT 11
- few tick timeout comparison and other issues/improvements: HOT 6
- Unable to connect to AWS following example HOT 10
- SAM-M10Q Current Draw Issue 3.3V, ~1mA instead of ~10mA HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ubxlib.