5b568e97f8126879099c349486465cc9f14f64e5
When changing from idle to registered we'll load registration info before really
reporting that we're registered (so that clients can get the new registration
info directly). During this time, we should also allow LAC/CID updates triggered
in the location interface.
E.g. when receiving this QMI message, we're not processing LAC/CID because when
they get reported, the registration state was not yet 'registered':
[/dev/cdc-wdm0] Received message (translated)...
>>>>>> QMUX:
>>>>>> length = 67
>>>>>> flags = 0x80
>>>>>> service = "nas"
>>>>>> client = 1
>>>>>> QMI:
>>>>>> flags = "indication"
>>>>>> transaction = 0
>>>>>> tlv_length = 55
>>>>>> message = "Serving System" (0x0024)
>>>>>> TLV:
>>>>>> type = "MNC PCS Digit Include Status" (0x29)
>>>>>> length = 5
>>>>>> value = D6:00:01:00:00
>>>>>> translated = [ mcc = '214' mnc = '1' includes_pcs_digit = 'no' ]
>>>>>> TLV:
>>>>>> type = "LTE TAC" (0x25)
>>>>>> length = 2
>>>>>> value = 08:01
>>>>>> translated = 264
>>>>>> TLV:
>>>>>> type = "Detailed Service Status" (0x22)
>>>>>> length = 5
>>>>>> value = 02:03:00:01:00
>>>>>> translated = [ status = 'available' capability = 'cs-ps' hdr_status = 'none' hdr_hybrid = 'yes' forbidden = 'no' ]
>>>>>> TLV:
>>>>>> type = "CID 3GPP" (0x1e)
>>>>>> length = 4
>>>>>> value = 01:A1:4D:04
>>>>>> translated = 72196353
>>>>>> TLV:
>>>>>> type = "LAC 3GPP" (0x1d)
>>>>>> length = 2
>>>>>> value = FE:FF
>>>>>> translated = 65534
>>>>>> TLV:
>>>>>> type = "Current PLMN" (0x12)
>>>>>> length = 5
>>>>>> value = D6:00:01:00:00
>>>>>> translated = [ mcc = '214' mnc = '1' description = '' ]
>>>>>> TLV:
>>>>>> type = "Data Service Capability" (0x11)
>>>>>> length = 2
>>>>>> value = 01:0B
>>>>>> translated = { [0] = 'lte '}
>>>>>> TLV:
>>>>>> type = "Serving System" (0x01)
>>>>>> length = 6
>>>>>> value = 01:01:01:02:01:08
>>>>>> translated = [ registration_state = 'registered' cs_attach_state = 'attached' ps_attach_state = 'attached' selected_network = '3gpp' radio_interfaces = '{ [0] = 'lte '}' ]
<debug> [1444895382.427216] Processing 3GPP info...
<info> [1444895382.433423] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP Registration state changed (idle -> registering)
[ Here we tried to update LAC/CID ]
<debug> [1444895382.439668] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP location updated (MCC: '214', MNC: '1', Location area code: '0', Cell ID: '0')
<info> [1444895382.446788] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP Registration state changed (registering -> home)
<info> [1444895382.452383] Modem /org/freedesktop/ModemManager1/Modem/3: state changed (enabled -> registered)
ModemManager. ModemManager provides a unified high level API for communicating with mobile broadband modems, regardless of the protocol used to communicate with the actual device (Generic AT, vendor-specific AT, QCDM, QMI, MBIM...). Using. ModemManager is a system daemon and is not meant to be used directly from the command line. However, since it provides a DBus API, it is possible to use 'dbus-send' commands or the new 'mmcli' command line interface to control it from the terminal. The devices are queried from udev and automatically updated based on hardware events, although a manual re-scan can also be requested to look for RS232 modems. Implementation. ModemManager is a DBus system bus activated service (meaning it's started automatically when a request arrives). It is written in C, using glib and gio. Several GInterfaces specify different features that the modems support, including the generic MMIfaceModem3gpp and MMIfaceModemCdma which provice basic operations for 3GPP (GSM, UMTS, LTE) or CDMA (CDMA1x, EV-DO) modems. If a given feature is not available in the modem, the specific interface will not be exported in DBus. Plugins. Plugins are loaded on startup, and must implement the MMPlugin interface. It consists of a couple of methods which tell the daemon whether the plugin supports a port and to create custom MMBroadbandModem implementations. It most likely makes sense to derive custom modem implementations from one of the generic classes and just add (or override) operations which are not standard. There are multiple fully working plugins in the plugins/ directory that can be used as an example for writing new plugins. Writing new plugins is highly encouraged! The plugin API is open for changes, so if you're writing a plugin and need to add or change some public method, feel free to suggest it! License. The ModemManager and mmcli binaries are both GPLv2+. The libmm-glib library is LGPLv2+.
Languages
C
98.6%
Meson
0.8%
Python
0.4%
Shell
0.2%