Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
We let protocol implementations provide the uplink and downlink speeds
agreed with the network as part of the connect result, and we then move
them to the bearer stats in DBus.
|
|
It stores the epoch timestamp of the current bearer session start.
If there is no connected bearer, it is set to 0 and not displayed
in mmcli output.
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
Includes updates by Aleksander Morgado to fix coding style issues.
|
|
There is no input cancellable in the method, so the GTask will never
get cancelled from the outside.
|
|
Just triggering a connection status reload won't change the actual
bearer object state.
We change the signature of the reload_connection_status_finish()
method so that it returns the actual reloaded bearer connection
status, and so both the load_ and reload_ methods can be implemented
with exactly the same method, something that was not possible before.
Once we get the new connection status reloaded, we apply it in the
bearer object only if it's DISCONNECTED (and it wasn't DISCONNECTED
before). This should cover the true real case we're interested in, and
nothing else (i.e. we won't overcomplicate the logic attempting to
handle disconnected->connected transitions detected in the sync()
operation).
|
|
If we called the class reload_connection_status() method, we should
call the class reload_connection_status_finish() as well.
|
|
Refresh connection status on resume to confirm
that the connection bearers are still valid.
|
|
|
|
|
|
|
|
By default, fallback to "unknown" mobile equipment error when the
modem gets disconnected by the network and we don't have any way to
know a more detailed reason.
|
|
When a user-requested connection attempt fails, we not only return the
connection error to the user that requested it, we also publish the
specific connection error in DBus for others to check why the failure
happened.
|
|
|
|
Some of the operations performed by the profile management interface
will require checking whether the operation is attempted on a profile
for which there is a known connected bearer object.
We introduce a new method to lookup a bearer in the bearer list by its
connected profile id.
|
|
Implementations that support profile management will provide the
connected profile id value in the MMBearerConnectResult returned to
the base bearer object during the connection attempt.
|
|
There is no point in providing a configurable default IP family in the
bearer object, because we can always assume IPv4 as being the only
default expected.
Simplify the logic and also provide a new method to get the normalize
the IP family, using IPv4 as default always.
|
|
If using PPP, ModemManager is never in charge of deciding when the
connection is finished, because that would end up making ModemManager
try to use the TTY port while pppd is still using it.
When the modem goes unregistered for some time, we should not force
the disconnection of the bearer object, we still need to wait for pppd
to tell us the modem is disconnected.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/331
|
|
This property will be TRUE if the bearer has the data session
connected through a multiplexed interface.
If the bearer is disconnected, or connected without multiplexing, the
property will report FALSE.
|
|
We were logging it as debug, increase logging level to warning to make
sure it's always logged.
|
|
|
|
|
|
Compiling the amount of bytes transferred and received during all
tracked connection attempts, as well as the total duration of all the
connections.
|
|
When we're reusing over and over the same bearer object, we can
provide statistical information about the number of connection
attempts that have been done and how many of them failed.
|
|
Reporting the state when the UE attaches to access restricted local
operator services.
|
|
|
|
|
|
mm-base-bearer.c: In function ‘modem_3gpp_registration_state_changed’:
mm-base-bearer.c:463:5: warning: switch missing default case [-Wswitch-default]
463 | switch (state) {
| ^~~~~~
|
|
We don't want the connection status checks to interfere with the
disconnection logic, e.g. if they're both using the same TTY for both
things.
E.g. the CGACT? from the conncheck gets in the way of the
disconnection logic:
<debug> [1576037519.710684] Flashing data port (ttyUSB1)...
<debug> [1576037519.710740] (ttyUSB1): port attributes not fully set
<debug> [1576037520.287636] (ttyUSB1) device open count is 3 (open)
<debug> [1576037520.287804] (ttyUSB1): --> 'AT+CGACT?<CR>'
<debug> [1576037520.711067] (ttyUSB1) device open count is 2 (close)
<debug> [1576037520.711127] (ttyUSB1): running init sequence...
<debug> [1576037520.711231] PDP disconnection already sent
<debug> [1576037520.711263] Disconnected bearer '/org/freedesktop/ModemManager1/Bearer/0'
Instead, fully skip all conncheck and stat updates as long as the
modem is not connected. The actual conncheck and stat update timeouts
will be removed once completely disconnected, as it was before.
|
|
|
|
|
|
There are modems out there (e.g. SIM7600E) where we connect a given
CID >1 but once connected, only CID=1 is reported as connected, and
not the one we explicitly attempted to connect. In this situation the
modem is connected successfully, and we're properly ignoring the
disconnection report detected from CGACT? responses, but we're
probably better logging this situation only in debug level, not as
info, because this check is done periodically every 5s...
<debug> [1568649020.333263] (ttyUSB5): --> 'AT+CGDCONT=7,"IP","inet.es"<CR>'
<debug> [1568649020.383517] (ttyUSB5): <-- '<CR><LF>OK<CR><LF>'
<debug> [1568649020.383617] (ttyUSB5) device open count is 3 (open)
<debug> [1568649020.383655] Connection through a plain serial AT port (ttyUSB5)
<debug> [1568649020.383683] (ttyUSB5) device open count is 4 (open)
<debug> [1568649020.383802] (ttyUSB5) device open count is 3 (close)
<debug> [1568649020.383873] (ttyUSB5): --> 'ATD*99***7#<CR>'
<debug> [1568649020.405767] (ttyUSB5): <-- '<CR><LF>CONNECT 115200<CR><LF>'
<debug> [1568649020.405853] [ttyUSB5] Setting flow control: rts-cts
<debug> [1568649020.405878] (ttyUSB5): enabling RTS/CTS flow control
<debug> [1568649020.405897] (ttyUSB5): port attributes not fully set
<debug> [1568649020.405910] (ttyUSB5): flow control settings updated to rts-cts
<debug> [1568649020.405940] (ttyUSB5): port now connected
<debug> [1568649020.405983] Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'
<debug> [1568649020.406081] PPP is required for connection, will ignore disconnection reports
<info> [1568649020.406155] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
<info> [1568649020.406361] Simple connect state (8/8): All done
<debug> [1568649020.406461] (ttyUSB5) device open count is 2 (close)
<debug> [1568649020.448483] (net/ppp0): adding device at sysfs path: /sys/devices/virtual/net/ppp0
<debug> [1568649020.448738] (net/ppp0) could not get vendor/product id
<debug> [1568649020.448776] [filter] (net/ppp0) port filtered: virtual device
<debug> [1568649050.395662] (ttyUSB6) device open count is 2 (open)
<debug> [1568649050.395871] (ttyUSB6): --> 'AT+CGACT?<CR>'
<debug> [1568649050.408638] (ttyUSB6): <-- '<CR><LF>+CGACT: 1,1<CR><LF>+CGACT: 2,0<CR><LF>+CGACT: 3,0<CR><LF>+CGACT: 4,0<CR><LF>+CGACT: 5,0<CR><LF>+CGACT: 6,0<CR><LF>+CGACT: 7,0<CR><LF><CR><LF>OK<CR><LF>'
<debug> [1568649050.408803] connection status loaded: disconnected
---> <info> [1568649050.408825] ignoring disconnection report for bearer '/org/freedesktop/ModemManager1/Bearer/0'
<debug> [1568649050.408848] (ttyUSB6) device open count is 1 (close)
<debug> [1568649055.398994] (ttyUSB6) device open count is 2 (open)
<debug> [1568649055.399084] (ttyUSB6): --> 'AT+CGACT?<CR>'
<debug> [1568649055.411489] (ttyUSB6): <-- '<CR><LF>+CGACT: 1,1<CR><LF>+CGACT: 2,0<CR><LF>+CGACT: 3,0<CR><LF>+CGACT: 4,0<CR><LF>+CGACT: 5,0<CR><LF>+CGACT: 6,0<CR><LF>+CGACT: 7,0<CR><LF><CR><LF>OK<CR><LF>'
<debug> [1568649055.411652] connection status loaded: disconnected
---> <info> [1568649055.411674] ignoring disconnection report for bearer '/org/freedesktop/ModemManager1/Bearer/0'
|
|
|
|
Never automatically flag the bearer as disconnected if it's using PPP,
because we could end up using the TTY at the same time as pppd, with
the wrong CLOCAL settings.
So, whenever we detect that the bearer requires PPP, we will ignore
all disconnection reports generated by ModemManager itself.
|
|
If we cancel connect_cancellable, the connect task will return a
G_IO_ERROR_CANCELLED. We may need to do some cleanup (like, disconnect
if the connection went far enough to actually start the network
connection), thus it's important we check for cancellation correctly.
|
|
This property contains the DBus path of a Bearer object of type
MM_BEARER_TYPE_DEFAULT_ATTACH, which is automatically exposed by the
modem when registered in the LTE network.
Unlike standard bearer objects created by the user, this bearer won't
allow any connection/disconnection request, as its status is bound to
the LTE registration exclusively.
The bearer settings exposed by the object include the APN details that
have been used during the initial packet network attach, which may be
defined by modem settings (e.g. if previously configured in the
firmware which APN to use for the given SIM card operator) or by the
network itself (e.g. if none configured, or if a network override is
required as when roaming).
The bearer object will be created as soon as the LTE attach status
details are known, and only while the modem is enabled. The
implementation allows modems to update the LTE attach status details
during runtime, so the bearer object with the settings may be
recreated during runtime as well.
|
|
Until now we have only allowed to use and setup 'default bearers' (in
4G) or 'primary contexts' (in 2G/3G).
We can define a couple of additional bearer types, though:
* The 'dedicated bearers' (in 4G) or 'secondary contexts' (in 2G/3G),
which are associated to a specific default/primary one, but which
provide specific QoS settings configured via traffic flow templates.
* The 'initial default EPS bearer', which is a special case of default
bearer in LTE, which is automatically created and connected when the
modem is registered in the LTE network.
This commit introduces a new 'MMBearerType' enumeration that will be
associated to each bearer through a 'BearerType' property in the
org.freedesktop.ModemManager1.Bearer interface, showing what kind of
bearer/context this is.
By default, right now, all bearer objects created are 'default'
bearers.
|
|
The numbers were actually swapped!
|
|
|
|
|
|
If we ask too quick for the PDP context status after a successful
connection attempt reported by the modem, we may find it still flagged
as inactive if the modem is still busy setting up the PPP session.
Do an explicit longer initial timeout before we run the first check,
and after that one setup the additional checks at a higher rate.
Reported-by: Colin Helliwell <colin.helliwell@ln-systems.com>
|
|
On modems with a single TTY for both control and data, we cannot use
the TTY to load connection status once we're in connected mode:
Connection through a plain serial AT port (ttyUSB2)
(ttyUSB2): --> 'ATD*99***2#<CR>'
(ttyUSB2): <-- '<CR><LF>CONNECT 100000000<CR><LF>'
(ttyUSB2): port now connected
Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'
Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
Simple connect state (8/8): All done
checking if connected failed: Couldn't check current list of active PDP contexts: No AT port available to run command
checking if connected failed: Couldn't check current list of active PDP contexts: No AT port available to run command
checking if connected failed: Couldn't check current list of active PDP contexts: No AT port available to run command
...
So, disable connection monitoring right away if that situation is
detected:
Connection through a plain serial AT port (ttyUSB2)
(ttyUSB2): --> 'ATD*99***2#<CR>'
(ttyUSB2): <-- '<CR><LF>CONNECT 100000000<CR><LF>'
(ttyUSB2): port now connected
Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'
Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
Simple connect state (8/8): All done
Connection monitoring is unsupported by the device
...
https://bugs.freedesktop.org/show_bug.cgi?id=100376
|
|
|
|
Introduce "sms only" and "CSFB not preferred" home/roaming states to be reported
for the CS context, while already registered on LTE.
Based on 3GPP TS 27.007 v13.5.0.
|
|
|
|
|
|
If the bearer implementation supports it, load stats periodically. By default
every 30s for now.
|
|
|
|
Just so that we don't have same header names in src/ and /libmm-glib.
|