aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-02-20iridium: use generic disconnection logicAleksander Morgado
The generic disconnection logic now already handles getting the port fully closed and a wait time before reopening it, so no need for a custom disconnection logic any more.
2013-02-20serial-port: allow specifying some wait time between closing and reopeningAleksander Morgado
We will now by default wait some time (1s) between port getting fully closed and the port being reopened again. This logic seems to work for multiple modems where there is a single port for both AT and data, like my Nokia C7 and Iridium modems. If this wait time is not applied, the port ends up returning EAGAIN for every write that we try to do afterwards.
2013-02-20serial-port: remove unneeded property nameAleksander Morgado
Was incorrectly included in a previous commit
2013-02-20bearer-novatel-lte: fix reference counting of the 'data' portAleksander Morgado
2013-02-20plugin: plug memleaksAleksander Morgado
2013-02-20bearer: plug memleakAleksander Morgado
2013-02-20broadband-modem: plug memleakAleksander Morgado
2013-02-20iface-modem: fix modem state consolidation upon bearer disconnectionBen Chan
Patch "iface-modem: fix invalid modem state consolidation" (commit 69aff6183a9e6532b4074c89831d6dcfa81ddcce) incorrectly consolidates the modem state upon the disconnection of a bearer. The modem state remains 'connected' after the last bearer is disconnected. This patch fixes that.
2013-02-19build: fix passing arguments to configure from autogen.sh (bgo #694157)Evan Nemerson
2013-02-19zte: load unlock retries with +ZPINPUKAleksander Morgado
e.g: AT+ZPINPUK=? | | ZPINPUK: 3,10 | OK
2013-02-19at-serial-port: plug memleakAleksander Morgado
2013-02-19core: update logging levels of several messagesAleksander Morgado
'info' log level, the default if none specified, included too many logs which aren't that useful, to try to minimize the noise we produce by default.
2013-02-19plugin-manager: log time required for device probingAleksander Morgado
2013-02-19plugin-manager: if minimum time consumed and all deferred tasks, abort probingAleksander Morgado
For the case where we just get a device with all net ports (i.e. all deferred until result suggested), just abort the probing if the minimum probing time is consumed.
2013-02-19broadband-bearer: fallback to primary AT port if no data AT port availableAleksander Morgado
Spotted by Dan Williams <dcbw@redhat.com> with his ADU960S.
2013-02-18base-modem: don't run port init sequence if we're just sending a commandAleksander Morgado
This may happen when sending commands to the modem while in non-enabled state, like when sending the PIN. In this case, just send the command, don't fully initialize the port with the initialization sequence.
2013-02-18broadband-bearer: fully reopen data port before flashingAleksander Morgado
When disconnecting the data port, first fully close and reopen the port before flashing. This helps with some modems where the flashing mechanism doesn't fully work, like this ZTE modem: Before: [1360325270.357678] [mm-bearer.c:690] mm_bearer_disconnect(): Disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0' [1360325270.357796] [mm-iface-modem.c:1198] mm_iface_modem_update_state(): Modem /org/freedesktop/ModemManager1/Modem/1: state changed (connected -> disconnecting) [1360325270.358503] [mm-broadband-bearer.c:1539] disconnect_3gpp(): Sending PDP context deactivation in secondary port... [1360325270.358549] [mm-serial-port.c:927] mm_serial_port_open(): (ttyUSB4) device open count is 2 (open) [1360325270.358633] [mm-at-serial-port.c:392] debug_log(): (ttyUSB4): --> 'AT+CGACT=0,2<CR>' [1360325270.375131] [mm-at-serial-port.c:392] debug_log(): (ttyUSB4): <-- '<CR><LF>OK<CR><LF>' [1360325270.375251] [mm-serial-port.c:967] mm_serial_port_close(): (ttyUSB7) device open count is 1 (close) [1360325270.375282] [mm-serial-port.c:927] mm_serial_port_open(): (ttyUSB7) device open count is 2 (open) [1360325270.375300] [mm-broadband-bearer.c:1497] cgact_secondary_ready(): Flash primary port... [1360325270.375833] [mm-serial-port.c:967] mm_serial_port_close(): (ttyUSB4) device open count is 1 (close) [1360325271.377539] [mm-broadband-bearer.c:1455] primary_flash_3gpp_ready(): PDP disconnection already sent in secondary port [1360325271.377634] [mm-serial-port.c:967] mm_serial_port_close(): (ttyUSB7) device open count is 1 (close) [1360325271.377680] [mm-port.c:149] mm_port_set_connected(): (ttyUSB7): port now disconnected [1360325271.377721] [mm-bearer.c:623] disconnect_ready(): Disconnected bearer '/org/freedesktop/ModemManager1/Bearer/0' [1360325286.415396] [mm-serial-port.c:927] mm_serial_port_open(): (ttyUSB7) device open count is 2 (open) [1360325286.415510] [mm-at-serial-port.c:392] debug_log(): (ttyUSB7): --> 'AT+ZPAS?<CR>' [1360325287.400589] [mm-broadband-modem.c:1717] modem_load_signal_quality(): loading signal quality... [1360325287.400679] [mm-serial-port.c:927] mm_serial_port_open(): (ttyUSB7) device open count is 3 (open) [1360325289.401873] [mm-iface-modem.c:762] access_technologies_check_ready(): Couldn't refresh access technologies: 'Serial command timed out' [1360325289.401940] [mm-serial-port.c:967] mm_serial_port_close(): (ttyUSB7) device open count is 2 (close) [1360325289.401998] [mm-at-serial-port.c:392] debug_log(): (ttyUSB7): --> 'AT+CIND?<CR>' [1360325292.403162] [mm-serial-port.c:927] mm_serial_port_open(): (ttyUSB7) device open count is 3 (open) [1360325292.403247] [mm-serial-port.c:967] mm_serial_port_close(): (ttyUSB7) device open count is 2 (close ... After: [1360326617.604527] [mm-bearer.c:690] mm_bearer_disconnect(): Disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0' [1360326617.604622] [mm-iface-modem.c:1198] mm_iface_modem_update_state(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> disconnecting) [1360326617.605006] [mm-broadband-bearer.c:1535] disconnect_3gpp(): Sending PDP context deactivation in secondary port... [1360326617.605034] [mm-serial-port.c:929] mm_serial_port_open(): (ttyUSB4) device open count is 2 (open) [1360326617.605088] [mm-at-serial-port.c:392] debug_log(): (ttyUSB4): --> 'AT+CGACT=0,2<CR>' [1360326617.620075] [mm-at-serial-port.c:392] debug_log(): (ttyUSB4): <-- '<CR><LF>OK<CR><LF>' [1360326617.620206] [mm-broadband-bearer.c:1493] cgact_secondary_ready(): Flash primary port... [1360326617.620241] [mm-serial-port.c:1334] mm_serial_port_flash(): (ttyUSB7) reopening before flash (2) [1360326617.620265] [mm-serial-port.c:969] mm_serial_port_close(): (ttyUSB7) device open count is 1 (close) [1360326617.620286] [mm-serial-port.c:969] mm_serial_port_close(): (ttyUSB7) device open count is 0 (close) [1360326617.620320] [mm-serial-port.c:985] mm_serial_port_close(): (ttyUSB7) closing serial port... [1360326617.620356] [mm-port.c:149] mm_port_set_connected(): (ttyUSB7): port now disconnected [1360326617.621355] [mm-serial-port.c:1017] mm_serial_port_close(): (ttyUSB7) serial port closed [1360326617.621403] [mm-serial-port.c:860] mm_serial_port_open(): (ttyUSB7) opening serial port... [1360326617.622836] [mm-serial-port.c:417] real_config_fd(): (ttyUSB7): port attributes not fully set
2013-02-18serial-port: new method to reopen a portAleksander Morgado
We will fully close the port and the re-open it again keeping the same open_count that we had before.
2013-02-18broadband-bearer: try to run CGACT first on the primary portAleksander Morgado
It may happen that the primary port is not the data port; if so, try with the primary port first, and otherwise fallback to the secondary port.
2013-02-18broadband-bearer: update disconnection logicAleksander Morgado
We were maintaining the port we used for dialling (the data port) open during the connection, as specified by the CDMA or 3GPP specific logic. We'll now close that open count reference ourselves within the CDMA or 3GPP disconnection logic itself.
2013-02-18bearer,3gpp: dial operation specifies which data port to useAleksander Morgado
Instead of deciding in advance which data port to use, we let the dialling operation gather it. For the generic dialling logic, ATD-based, always an 'AT' port will be used as data port, even if we grabbed a 'net' port. Those plugins that can work with 'net' ports will grab the specific 'net' port themselves.
2013-02-18bearer: new helper 'MMBearerConnectResult' typeAleksander Morgado
Instead of returning 3 variables in connect_finish(), return a single reference counted struct. This simplifies how the result is built and passed within a GSimpleAsyncResult to each _finish() method. This also simplifies the dialling step in the 3GPP connection sequence, as we can use the same new type.
2013-02-18ports: add port initialization sequences instead of iface-modem's modem_init()Aleksander Morgado
Instead of a custom modem_init() step in the 'Modem' interface, just add a sequence of port initialization commands in each port. While enabling for the first time a non-hotplugged modem, we will issue the port initialization commands only after having run the enabling_modem_init() step (i.e. after ATZ usually).
2013-02-18at-serial-port: new properties to define and manage a set of init commandsAleksander Morgado
We are now able to specify a list of AT commands to be run whenever the port is opened for the first time (i.e. open_count from 0 to 1). These commands are to be treated as a 'port initialization' sequence, where port-configuration specific AT commands are defined (e.g. ATE0).
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.
2013-02-15serial-port: don't steal data from PPP when connectedDan Williams
There was a race where if PPP was slow to start, MM could read the first bits of PPP from the port, which MM shouldn't really do. So if the port is connected, remove our GIOChannel watch and let pppd handle all the data. When the port is disconnected, re-attach our watch and start reading from the port again. This may make it harder to detect spurious disconnects if for example pppd drops the connection and the thing controlling PPP (eg, NetworkManager or something else) doesn't tell us about that event by disconnecting the bearer. This is arguably programmer error though. See the logs in https://bugzilla.gnome.org/show_bug.cgi?id=624956#c10 for an example of this: DEBUG: <1280300196.929489> (ttyACM0): <-- '<CR><LF>CONNECT<CR><LF>' DEBUG: <1280300196.929761> (ttyACM0): port now connected DEBUG: <1280300196.929853> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected) DEBUG: <1280300196.929954> (ttyACM0): simple connect state 6 DEBUG: <1280300196.933432> (ttyACM0): <-- '~\-1}#\-64!}!} } }2}#}$\-64#}!}$}%\-36}"}&} }*} } g}%~'
2013-02-15Revert "serial-port: don't steal data from PPP when connected"Dan Williams
This reverts commit 625e1c4884215bb9989dad6c9868c06ba76a4d94. By simply returning when data is available, no data gets cleared from the file descriptor and data_available() keeps getting rescheduled, leading to a busy-loop. This is the wrong approach, we should be removing the GIOChannel watch instead.
2013-02-15broadband-modem-longcheer: fix getting and setting of allowed modesDan Williams
When setting allowed modes, a ",2" crept into the MODODR command when porting the plugin from 0.6. That shouldn't be there. When getting allowed modes, 2 is UMTS preferred and 4 is GSM preferred, which the previous code combined into only UMTS preferred.
2013-02-15modem: use +CEREG to determine EPS network registration statusBen Chan
This patch adds the support for solicited/unsolicited EPS network registration status via AT+CEREG, which is configurable via the 'iface-modem-3gpp-eps-network-supported' property of the MMIfaceModem3gpp interface and is disabled by default.
2013-02-14vl600: update AT com tool and RE notesDan Williams
2013-02-14broadband-modem: don't try QCDM access technology checks for non-QCDM 3GPP ↵Dan Williams
devices Result handling code mistakenly ran for these devices, when it shouldn't.
2013-02-14broadband-modem-qmi: don't try to load access technologies using QCDMAleksander Morgado
2013-02-14bearer-qmi: wait longer for the 'Stop Network' replyAleksander Morgado
The 'Stop Network' reply may really take more than 10s to arrive; so let's wait some more time, 30s, before falling back.
2013-02-13libmm-glib,simple-connect-properties: avoid using an uninitialized variableAleksander Morgado
2013-02-12core: use g_unix_signal_add() for more reliable Unix signal handlingDan Williams
There were a few problems with MM's existing signal handling, first of which was that calling g_main_loop_quit() from a signal handler only works 50% of the time due to severe restrictions on what you can do from the handler. This caused INT or TERM to sometimes be ignored by MM. Instead, use the glib signal functions which ensure that the handler is run in the right context, where we can do anything we want.
2013-02-12serial-port: don't steal data from PPP when connectedDan Williams
There was a race where if PPP was slow to start, MM could read the first bits of PPP from the port, which MM shouldn't really do. So if the port is connected, don't read any data and let pppd do its thing. See the logs in https://bugzilla.gnome.org/show_bug.cgi?id=624956#c10 for an example of this: DEBUG: <1280300196.929489> (ttyACM0): <-- '<CR><LF>CONNECT<CR><LF>' DEBUG: <1280300196.929761> (ttyACM0): port now connected DEBUG: <1280300196.929853> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected) DEBUG: <1280300196.929954> (ttyACM0): simple connect state 6 DEBUG: <1280300196.933432> (ttyACM0): <-- '~\-1}#\-64!}!} } }2}#}$\-64#}!}$}%\-36}"}&} }*} } g}%~'
2013-02-08qcdm: fix handling of active pilot setDan Williams
Typo caused candidate or remaining sets to be treated as the active pilot set.
2013-02-08sierra: fix access tech reporting logicAleksander Morgado
2013-02-07broadband-modem-mbm: handle HSPA access technology in ERINFO responseDan Williams
HSUPA/HSPA capable devices (ex F5521gw) can report '3' here, which we'll decide to interpret as HSPA. It might actually be HSDPA + HSUPA, but whatever...
2013-02-06broadband-modem-longcheer: fix handling of preferred modesDan Williams
Treat NONE the same as ANY and handle specific preferred modes too.
2013-02-06iface-modem-messaging: fix INSTANCE_CAST() vs. GET_INTERFACE() confusionDan Williams
Yeah, GObject is pretty obscure here. But to get the implementation's override function, we want GET_INTERFACE, otherwise we're looking at some random memory location that's sometimes NULL. And then we crash.
2013-02-06libmm-glib,manager: add missing logic to ensure the proxy is createdAleksander Morgado
2013-02-06cli: don't autostart the ModemManager serviceAleksander Morgado
2013-02-06libmm-glib,manager: don't fail creation if the ModemManager process is not foundAleksander Morgado
A 'GDBusObjectManagerClient' for a service for which there is no current name-owner is a perfectly valid and useful object. For example, we could then connect to the 'notify::name-owner' property to follow the life cycle of the ModemManager process. So, don't tie the successful creation of a 'MMManager' to the successful creation of the internal GDBusProxy for the 'Manager1' interface. If there is no current name owner, the GDBusProxy wouldn't be created, and instead we would completely fail the 'MMManager' creation.
2013-02-06libmm-glib: fix error reporting when 'MMManager' is createdAleksander Morgado
2013-02-06anydata: support QMI-based devicesDan Williams
Some devices (like the ADU960S) support QMI, so if the modem has a QMI port, use it.
2013-02-06trivial: fix typoDan Williams
2013-02-06iface-modem-cdma: fix handling of HDR registration stateDan Williams
hybrid mode is the first parameter, not the third. Caused EVDO to look like it wasn't registered.
2013-02-06trivial: add debugging to generic QCDM registration parsingDan Williams
2013-02-06broadband-modem-novatel: read HDR revision for access technologyDan Williams
Specialize what the superclass gave us, if we can.