Git Product home page Git Product logo

Comments (13)

RobMeades avatar RobMeades commented on September 24, 2024 1

Hi @eeFLis and happy new year to you: that's an excellent idea, I will add it to the TODO list.

from ubxlib.

alexmaron81 avatar alexmaron81 commented on September 24, 2024 1

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.

RobMeades avatar RobMeades commented on September 24, 2024 1

@eeFLis: now done in commit 41349f3.

from ubxlib.

RobMeades avatar RobMeades commented on September 24, 2024

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.

alexmaron81 avatar alexmaron81 commented on September 24, 2024

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.

RobMeades avatar RobMeades commented on September 24, 2024

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.

alexmaron81 avatar alexmaron81 commented on September 24, 2024

why are there duplicates in the list?

from ubxlib.

RobMeades avatar RobMeades commented on September 24, 2024

Different RATs:

(1,"262 01","262 01","26201",0), (2,"262 01","262 01","26201",7)
^ ^
2G LTE

from ubxlib.

RobMeades avatar RobMeades commented on September 24, 2024

Hi Alex: are you OK with this now?

from ubxlib.

eeFLis avatar eeFLis commented on September 24, 2024

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.

eeFLis avatar eeFLis commented on September 24, 2024

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.

RobMeades avatar RobMeades commented on September 24, 2024

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.

RobMeades avatar RobMeades commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.