aboutsummaryrefslogtreecommitdiff
path: root/src/mm-broadband-modem.h
AgeCommit message (Collapse)Author
2023-09-18api,modem: new 'Physdev' propertyLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-06-16broadband-modem-qmi|mbim: allow limiting multiplexed links with udev tagsAleksander Morgado
Certain QMI or MBIM devices may not be able to support multiplexing at all, or they may support a limited amount of links. The new ID_MM_MAX_MULTIPLEXED_LINKS udev tag allows specifying the maximum number of supported multiplexed links; e.g. 0 to report none supported or 1 to report that one single multiplexed link is supported.
2022-08-01broadband-modem: notify when a sync is needed after a suspend/resumeAleksander Morgado
Modem/SIM implementations that keep cached info that is not supposed to change during runtime of a modem may need to be notified about when a suspend/resume has happened, so that they can clear and reload the internally cached data.
2022-05-20iface-modem: common SIM event reporting logicAleksander Morgado
We no longer have separate mm_base_modem_process_sim_event() and mm_broadband_modem_sim_hot_swap_detected() methods. The only difference between both of them was that one of them would attempt to cleanup the ports context associated to the SIM hot swap event logic as soon as a swap was detected, in order to avoid queueing up multiple such events. The previous logic wasn't working well, though, as there could be mixed AT+QMI or AT+MBIM devices that would also require that same cleanup and so we didn't always know which one should have been called. Now we have a single mm_iface_modem_process_sim_event() method, which will trigger the reprobe and disabling, but which will also perform the cleanup of the SIM ports swap setup as specified by the implementation. So, if a plugin explicitly initializes the serial ports context for SIM hot swap handling, it should also explicitly clean it up. Also, the initialization of the serial ports context for SIM hot swap handling is no longer done automatically for all modems, it will be done only for those modems using it; i.e. the modems that explicitly report support SIM hot swap handling using AT URCs.
2021-05-24broadband-modem: check if skeleton exists when creating device idAleksander Morgado
The logic that creates the device identifier uses some fields that are exposed in DBus (e.g. model, manufacturer...). We should not attempt to load any of that info if the DBus skeleton for the Modem interface is no longer available, as e.g. the device may have gone away already. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/374
2021-02-23charsets: use new str_from_utf8() instead of ↵Aleksander Morgado
take_and_convert_to_current_charset()
2020-09-19core: add autoptr cleanup methods to all internal typesAleksander Morgado
2020-08-01broadband-modem: minor method renameAleksander Morgado
2019-10-11broadband-modem: allow disabling +CIND URC setupAleksander Morgado
Not all modems support correctly +CIND URCs and +CMER settings.
2017-04-18broadband-bearer: once connected, set flow control settingsAleksander Morgado
During modem initialization we detected the flow control settings supported by the modem, and selected the best one to use from them, notifying it to the device via AT+IFC. The device was therefore instructed to use that flow control setting for data transmission in the TTY (i.e. not during AT control commands). The missing thing was to also configure ourselves our end of the serial port with the same flow control settings when getting into data mode. By doing it ourselves, we avoid requiring any explicit setting in pppd for flow control; pppd can assume the flow control settings are already the expected ones. Worth noting that all this setup is completely ignored for TTYs exposed directly via USB. https://bugs.freedesktop.org/show_bug.cgi?id=100394
2016-08-10core: minor coding style changesAleksander Morgado
2016-08-10modem: support SIM hot swapCarlo Lobrano
BaseModem added reprobe property. MMDevice added logic to recreate the modem if it is set invalid and "to reprobe" MMBroadbandModem * added initialization step for SIM hot swap: 1. keep dedicated ports open to listen to modem's unsolicited 2. dedicated error management in case of initialization failure due to SIM missing * added function to be called in order to act upon SIM insertion/removal: 1. close dedicated ports 2. set the modem to be reprobed 3. disable modem * added SIM HOT SWAP boolean property MMIfaceModem * added initialization step for SIM hot swap, if supported by the plugin * dedicated error management in case of initialization failure due to SIM missing
2015-08-02broadband-modem: added voice call supportRiccardo Vangelisti
2014-02-28broadband-modem: allow querying current charsetAleksander Morgado
So that plugins can use it.
2013-02-18broadband-modem: new step during 'enabling_started' to initialize the modemAleksander Morgado
We previously had the modem initialization command merged with some other port setup commands in the 'modem_init' step of the 'Modem' interface. Instead of doing this, we now split the logic into two separate steps: A first 'enabling_modem_init' modem initialization step is to be run just after the ports have been opened, but only during the first enabling operation, and only if the modem was not hotplugged. A hotplugged modem is assumed to be properly initialized already, so no need to ATZ-it. Also, we will now wait 500ms by default after the modem initialization command has been sent, to let it settle down. The second 'modem_init' step will be run during the 'Modem' interface initialization, and it currently only holds specific setup of the primary and secondary serial ports. We'll be modifying this logic a bit in the next commits, so no big deal to have that step name unchanged.
2012-10-04api: only allow including `ModemManager.h' directlyAleksander Morgado
2012-09-14broadband-modem: allow locking/unlocking either 'mem1' or 'mem2' or bothAleksander Morgado
So that e.g. listing all SMS in a given storage ('mem1' lock) doesn't collide with storing a new SMS ('mem2' lock).
2012-09-14broadband-modem: lock/unlock the 'mem1' storage when reading initial SMS listsAleksander Morgado
2012-09-14broadband-modem: new methods to lock/unlock current SMS storagesAleksander Morgado
The default AT commands to play with SMS rely on AT+CPMS to select the default memory storages for different operations. AT+CPMS defines 3 different storages, called 'mem1' (for reading/listing/deleting), 'mem2' (for storing or sending from storage) and 'mem3' (for receiving). For example, when an SMS is to be deleted, we first need to select with AT+CPMS the proper 'mem1' storage before issuing the command to delete the SMS part. But, in order to do this properly we need to synchronize the access to the currently set storages, so that no more than one action is run in the storages at the same time (e.g. don't store an SMS while another SMS is being deleted). In order to synchronize this access, we now provide commands to lock()/unlock() the storages, which should be used when we want to do some operation on them. Note that this logic is only required because we cannot specify the storage explicitly in the specific AT command operations. With QMI we don't need this locking/unlocking.
2012-08-29broadband-modem: let subclasses create their own device IDsAleksander Morgado
2012-08-24api,introspection: report list of drivers, not just oneAleksander Morgado
Different ports of the same modem may get handled by different drivers. We therefore need to provide a list of drivers (new `Modem.Drivers' property with signature 'as') instead of just one (removed `Modem.Driver' property with signature 's'). $ sudo mmcli -m 0 | grep drivers | drivers: 'qcserial, qmi_wwan'
2012-08-06broadband-modem: new generic steps in initialization/enabling/disablingAleksander Morgado
Instead of hardcoding the logic to decide which ports are open or closed in the different steps, we now let the subclasses of MMBroadbandModem to do that themselves. We now provide: * initialization_started() and initialization_stopped(): the generic implementation does the serial port open/close in these steps. * enabling_started(): the generic implementation does the serial port opening here. The serial ports are kept open as long the modem is in enabled state. * disabling_stopped(): the generic implementation does the serial port closing here.
2012-07-16broadband-modem: remove `USE_WS46' propertyAleksander Morgado
3GPP modems will all try to use AT+WS46=? by default to gather supported modes.
2012-04-10broadband-modem: query supported networks to get a better supported modes valueAleksander Morgado
If we base our supported modes default guessing only on capabilities listed by AT+GCAP, we find that we don't know how to differenciate between 2G and 3G 3GPP modems. So, if supported, we will try to query the list of supported networks with AT+WS46=?, which explicitly tells us if the modem supports GERAN and/or UTRAN and/or E-UTRAN. Note that plugins need to request this new behaviour by setting the `MM_BROADBAND_MODEM_USE_WS46' property to TRUE when creating the modem object.
2012-03-16broadband-modem: new method to convert from UTF-8 to the charset in the modemAleksander Morgado
2012-03-16broadband-modem: expose the current charset to UTF-8 converterAleksander Morgado
So that subclasses can also use it.
2012-03-15core: don't pass primary port to interface initializationsAleksander Morgado
They will all get it themselves.
2012-03-15broadband-modem: run setup of all ports as first step in initializationAleksander Morgado
This is run always once all ports grabbed and organized.
2012-03-15core: new MMBroadbandModem object, inherits from MMBaseModemAleksander Morgado
New object to implement broadband modem specific behaviour.