osmo-gsm-tester[master]: ofono_client: Implement network registration during connect()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat Jun 3 14:54:28 UTC 2017


Patch Set 6:

(7 comments)

https://gerrit.osmocom.org/#/c/2779/6/src/osmo_gsm_tester/ofono_client.py
File src/osmo_gsm_tester/ofono_client.py:

Line 414:         if self.mcc is None or self.mnc is None:
> is the following true? None == (None, None)
I assume that mcc_mnc is either set, i.e. a tuple of two number strings, or unset, meaning that it is None (not a tuple but None). I think it's the cleanest choice to allow only those two cases and not bother with also checking (None, None) tuples etc.

None is a valid tuple entry, so a tuple of two entries is definitely not == None.

With None I prefer using 'is', to clearly indicate to not use any operator magic.


Line 427:                     self.log('Already registered with the network')
> No, we need to keep this here to avoid re-registering in case the modem got
I'd prefer: have one separate function to return true when we are already connected and the operator codes match what we want to be connected to. Call this function even before we start to first Scan(). Then call it again here if needed. Would also make this function more readable.


Line 454:         self.mcc, self.mnc = mcc_mnc
> because I need to check the separately (I think unless the following is tru
IMHO store it as mcc_mnc everywhere. If you need to check separately, do things like 'None in mcc_mnc' or 'mcc_mnc[idx]'.

I already suggested below:

  if len(mcc_mnc) != 2 or None in mcc_mnc:
    <raise>


https://gerrit.osmocom.org/#/c/2779/6/suites/aoip_debug/interactive.py
File suites/aoip_debug/interactive.py:

Line 34:           wait(m.is_connected)
(order: first modem)


https://gerrit.osmocom.org/#/c/2779/6/suites/debug/interactive.py
File suites/debug/interactive.py:

Line 30:          wait(m.is_connected)
> As far as I know, the registration confirmation comes from MSC/BSC and goes
we wait until both are true, so the order doesn't matter much semantically. We can choose to wait long for the one first, or the other. I favor waiting for the modem first, because then we don't create CTRL traffic every second which shows up in the pcaps. Instead, we will in the end probably just have one single verification via CTRL that the BSC/MSC agrees that the modem is now attached. So let's wait for modems first.


https://gerrit.osmocom.org/#/c/2779/6/suites/netreg/register.py
File suites/netreg/register.py:

Line 16: ms.connect(nitb.mcc_mnc())
> It's at the end of the file, line 21
ah missed that


https://gerrit.osmocom.org/#/c/2779/6/suites/netreg/register_default.py
File suites/netreg/register_default.py:

Line 18: print(ms.properties())
(rather use ms.info() I guess, properties() are bloated)


-- 
To view, visit https://gerrit.osmocom.org/2779
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8d9eb47eac1044550d3885adb55105c304b0c15c
Gerrit-PatchSet: 6
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list