Comments (13)
Hi @eeFLis and happy new year to you: that's an excellent idea, I will add it to the TODO list.
from ubxlib.
Hi Alex: are you OK with this now?
Hi Rob, I'll tackle the task a little later. I'm currently working on another problem (not ubxlib).
from ubxlib.
@eeFLis: now done in commit 41349f3.
from ubxlib.
Hi Alex. The simplest approach would be to call uDeviceOpen()
on the cellular device as normal and then, rather than calling uNetworkInterfaceUp()
(which uses automatic network selection), you would call uCellNetConnect() with the pMccMnc
field set to point to the string giving the MCC/MNC of one of the networks (e.g. "52000" for the first TrueMove Company Ltd MCC/MNC), wait for the connection to succeed or fail, if it succeeds then call uCellNetDisconnect(), then repeat for the next MCC/MNC (e.g. "52004" for the next True Move Company Ltd. MCC/MNC).
It might be worth doing a network scan first to see what networks are actually available at that location (see the lte_cfg_main.c example for how to do that, which also shows you how to configure the supported network bands, should you need it) in order to avoid wasting time trying to connect to networks which just aren't visible.
Since both uCellNetScanGetFirst()
and uCellNetScanGetNext()
return the MCC/MNC string anyway, you could just try each one in turn.
from ubxlib.
Hi Rob, I tried the lte_cfg_main.c example and get this:
AT+UMNOPROF?
+UMNOPROF: 100
OK
AT+UGPRF?
+UGPRF: 2,0,""
OK
AT+CFUN=4
OK
+CEDRXP: 4,"0010"
U_CELL_CFG: getting band mask for RAT 10 (in module terms 0).
AT+UBANDMASK?
+UBANDMASK: 0,524420,1,524416
OK
U_CELL_CFG: band mask for RAT 10 (in module terms 7) is 0x0000000000000000 0000000000080084.
Band mask for RAT CAT-M1 is 0x0000000000000000 0000000000080084.
Setting band mask for RAT CAT-M1 to 0x0000000000000000 000000400b0f189f...
I (28269) CELL: >>>>>>>>>>SARA is not alive<<<<<<<<<<
U_CELL_CFG: setting band mask for RAT 10 (in module terms 0) to 0x0000000000000000 000000400b0f189f.
AT+UBANDMASK=0,275063445663,0
ERROR
Unable to change band mask for RAT CAT-M1, it is likely your module does not support one of those bands.
U_CELL_CFG: getting band mask for RAT 10 (in module terms 0).
AT+UBANDMASK?
+UBANDMASK: 0,524420,1,524416
OK
U_CELL_CFG: band mask for RAT 10 (in module terms 7) is 0x0000000000000000 0000000000080084.
Band mask for RAT CAT-M1 is 0x0000000000000000 0000000000080084.
AT+CFUN?
+CFUN: 0
OK
AT+CFUN=1
OK
+CEDRXP: 4,"0010","0010","0001"
AT+COPS=?
+COPS: (1,"262 01","262 01","26201",0),(2,"262 01","262 01","26201",7),(1,"262 03","262 03","26203",0),(1,"262 02","262 02","26202",0),(1,"262 02","262 02","26202",7),(1,"262 03","262 03","26203",7),,(0,1,2,3,4),(0,1,2)
OK
AT
OK
AT+CFUN=0
OK
+CEDRXP: 4,"0010"
6: network: 26201
I (63329) CELL: >>>>>>>>>>SARA is not alive<<<<<<<<<<
4: network: 26201
3: network: 26203
2: network: 26202
1: network: 26202
0: network: 26203
U_CELL_NET: preparing to register/connect...
AT+CREG=2
OK
AT+CGREG=2
OK
from ubxlib.
That looks good: obviously you might need to adjust the band-mask to be correct for your module but you have successfully performed a search and returned a list of MCCs/MNCs, now you would need to try registering with each of them in turn.
from ubxlib.
why are there duplicates in the list?
from ubxlib.
Different RATs:
(1,"262 01","262 01","26201",0), (2,"262 01","262 01","26201",7)
^ ^
2G LTE
from ubxlib.
Hi Alex: are you OK with this now?
from ubxlib.
Hi Rob
Sorry for the intermediate question but why not add pMccMnc
to uNetworkCfgCell_t
so that uNetworkInterfaceUp()
can be used? This way pMccMnc
can be passed to uCellNetConnect in uNetworkPrivateChangeStateCell()
.
from ubxlib.
Hi @eeFLis and happy new year to you: that's an excellent idea, I will add it to the TODO list.
Thank you, a happy new year to you too
from ubxlib.
Hi Rob, I'll tackle the task a little later. I'm currently working on another problem (not ubxlib).
Hi Alex: do you still need this one open?
from ubxlib.
I'm going to assume this can be closed, please re-open (or open another issue) if there is more to discuss.
from ubxlib.
Related Issues (20)
- Build for STM32 CUBE HOT 4
- ESP32 Demo HOT 5
- Power consumption after calling uGnssPwrOff HOT 9
- Untethered Dead Reckoning and odometer use with cellular module integration HOT 22
- stm32u5 example hanging HOT 11
- Data Ready PIN HOT 15
- A good practice proposol HOT 2
- Cellular Callback for Signal Changes HOT 2
- Enable debug log HOT 3
- MQTT Clean Session Support for LARA-R6801D Module HOT 5
- Connecting NEO-6M to ESP32 HOT 3
- PlatformIO PackageException HOT 7
- Config baudrate for NEO-F10 GNSS module using uGnssCfgValSet() HOT 5
- SIM card detection HOT 3
- Mac Address is -1 after ble example script HOT 5
- ESP32: uCellNetConnectStart - stack overflow in task atCallbacks has been detected HOT 11
- Ubxlib / Configuration of the M10 Gnss receiver HOT 7
- SARAR4 Unresponsive HOT 6
- In order to run the Arduino sample on platformio, ubxlib_test.h is included. Please distribute it. HOT 7
- Help needed with integrating ubxlib into ESP-IDF with VS Code HOT 7
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.