Commit Graph
143 Commits
Author SHA1 Message Date
Dan Williams 49b5ffd076 core: use G_DEFINE_TYPE_* instead of rolling our own
Use the macro; save some trees.
2009-10-26 17:56:48 -07:00
Dan Williams 2887a50b23 gsm: ignore errors from power-on command
Phones especially don't seem to consistently implement this.  For now,
we'll hack it out, but later, we'll want to have a class method for
power-on instead of just a property so that subclasses can decided for
themselves (since they know their hardware better) whether failure
of the power-on command is fatal or not.
2009-10-26 15:39:34 -07:00
Alexander Sack 16f3e00f34 gsm: fix unsolicited registration by calling the statemachine callback info - lp:416893 2009-10-15 01:32:08 +02:00
Dan Williams 3d86a3e89a gsm: don't issue CFUN=0 by default
Let plugins do it when they know it's OK.
2009-10-14 13:47:21 -07:00
Dan Williams c77dbb7a94 cdma: give cards more time to register
5 was left-over from debugging unplug-while-registering issues,
was meant to be 15 (ie, 60 seconds) anyway.
2009-10-13 16:05:02 -07:00
Dan Williams f4ada20709 cdma: implement registration in Simple.Connect path
Wait a bit for the modem to register before trying to dial.
2009-10-12 22:44:03 -07:00
Dan Williams c0253c7c29 core: convert MMCallbackInfo modem refs to weak refs
Full references prevented destruction of the modem object if
it was unplugged or somehow removed.  To fix that using full
references on the modems would require that all usage of
MMCallbackInfo to be aware of the validity of the modem and to
ensure the callback was called whenever the modem became invalid.
That, needless to say, would suck.  Since any in-progress calls
can't complete when the modem is invalid anyway, just have the
MMCallbackInfo object return a generic error when the modem goes
away and the call is still in-progress.
2009-10-12 19:51:10 -07:00
Dan Williams 958b9048a3 cdma: split 1x and EVDO registration states
Like UMTS vs. GSM, EVDO and 1x are separate networks and technologies
and have separate registration state.  You can even be roaming on
EVDO while in your home 1x network.  Handle that.
2009-10-12 10:06:53 -07:00
Dan Williams bdd60a4941 cdma: fix memory leak parsing serving system results 2009-10-11 11:31:23 -07:00
Dan Williams 0c5c94b691 cdma: add signal quality update helper for subclasses 2009-10-11 11:25:43 -07:00
Dan Williams 19b7c8fef1 cdma: use consistent terminology for registration 2009-10-11 11:24:41 -07:00
Dan Williams 665d1847a8 cdma: add port accessors for subclasses 2009-10-11 11:23:50 -07:00
Dan Williams e1d757ea76 cdma: use secondary port more aggressively where one exists
Like on the Huawei EC121 and EC168C (Reliance India).
2009-10-11 11:15:46 -07:00
Dan Williams 91171cdae2 cdma: implement generic registration state handling 2009-10-09 16:17:13 -07:00
Dan Williams a088f12956 cdma: better CSS response parsing 2009-10-08 10:16:25 -07:00
Dan Williams 01100c1008 gsm: strip command response bits from mfg/model/revision responses 2009-10-06 12:38:21 -07:00
Dan Williams d867b1fe6a gsm: add cell access technology reporting to Scan() 2009-10-06 11:39:40 -07:00
Dan Williams 912b98723b Merge commit 'origin/master' into enable-split 2009-10-05 09:52:01 -07:00
Dan Williams aa78b5f5e5 bluetooth: handle rfcomm device moves
rfcomm devices seem to be created as 'virtual' devices first, without
any parents, then moved to the right place in the device tree.  So
handle moves too; if the modem was already found in the 'add' phase
it'll be ignored in the move phase.
2009-10-02 23:33:18 -07:00
Dan Williams ed059286c5 bluetooth: physical device is a bit higher up the tree 2009-10-02 23:32:57 -07:00
Dan Williams e5441115a2 bluetooth: recognize rfcomm devices
Two hacks here:
1) rfcomm ports don't have an easily accessible driver name, so we just
match the parent's subsystem to 'bluetooth' and use that

2) libgudev doesn't seem be be able to get the rfcomm device's device file,
which would normally be /dev/rfcommX.  Oh well, we don't use the device file
yet anyway
2009-10-02 22:31:16 -07:00
Dan Williams 3b19a85727 core: split generic modem enable/disable operations 2009-09-23 16:04:25 -07:00
Dan Williams f2a3825f9d generic: match CONNECT even if we get PPP spew
Found by Eugene Crosser <crosser@average.org>
2009-09-23 01:38:42 -07:00
Dan Williams 64b7be7460 serial: use connected notifier only when needed
It's only relevant when the port is open anyway, and marking the port
disconnected in nm_serial_port_close(), which used to be called from
the finalize() function, would trigger the notifier when stuff was
already cleaned up.  So move the nm_serial_port_close() call to
dispose() and remove the connected notifier before we clean the
port up.
2009-09-09 07:28:54 -07:00
Dan Williams c02adee802 serial: mark port disconnected on close
Otherwise it could still be connected when the port was opened again,
and subsequent calls for stuff could fail.
2009-09-08 17:41:25 -07:00
Dan Williams 14e5c52f78 core: don't allow concurrent flashes on the same device
Previously, a few operations (like disable) could trigger a modem
flash in parallel with another flash.  That's wrong, don't allow
that.  At the same time, add in finer-grained error checking on
serial port speed operations, and fix a GSM generic bug that would
send the POWER_UP string on disable.
2009-09-08 17:34:04 -07:00
Noel J. Bergman 53af144f49 udev: handle removal of parent usb devices
fix device removal event handling to remove modems
if the associated parent usb device is removed
2009-09-09 01:17:20 +02:00
Dan Williams 63dcc3e189 cdma: handle older AT+CSS response format 2009-08-31 14:30:23 -05:00
Bryan Duff 8a6cbdfb88 core: fix uninitialized variable 2009-08-26 11:28:14 -05:00
Alexander Sack cd75023068 gsm: handle "net" device removal properly in release_port 2009-08-20 20:32:37 +02:00
Dan Williams ca767e4037 gsm: update for D-Bus interface specification changes
Specifically, SupportedModes, SupportedBands, and SMS completeness changes.
2009-08-17 13:16:41 -05:00
Alexander Sack 12ac98e9f6 license: add license header to all files and set copyright based on git log 2009-08-06 12:43:51 +02:00
Dan Williams 2d194a5798 gsm: harmonize band/mode enums
Use the same enum for set/get of band and mode, as for exposing the
device's capabilities.
2009-08-05 13:03:59 -04:00
Dan Williams c307606e74 cdma: fix serving-system parsing for oddly-placed spaces
Sierra 580 returns "+CSS: 0, Z , 0" when not associated.  Handle that.
2009-07-22 07:42:05 -04:00
Dan Williams 354785f440 cdma: handle devices that don't prefix CSS result with +CSS:
Like the Sanyo SCP-3800 (Sprint Katana LX).  Make up your freakin'
mind people, either prefix *all* responses with the command stem,
or don't.  But just pick one dammit.
2009-07-17 23:03:16 -04:00
Dan Williams 34f3117a82 cdma: fix 32-bit compile issues 2009-07-07 17:34:04 -04:00
Dan Williams 736aa0d2d6 serial: rework 'connected' logic
So many modems just don't implement carrier detect that it makes
the previous 'connected' logic useless, so base it off connect/disconnect
and fix up a few places that didn't check connect status before
trying to send commands.  Also ensure the serial port is unlocked
for PPP to use when connected.
2009-07-06 11:40:22 -04:00
Dan Williams 52da9990ee plugins: allow plugins to more easily suggest port types
ZTE modems need to use udev rules to assign port type hints,
so generalize that and port all the plugins over to suggested
port types in the MMModem interface's grab_port() function.
2009-07-02 13:48:30 -04:00
Dan Williams 4e7548e496 gsm: fix init for modems for which ATZ does not play well with others 2009-06-29 23:11:43 -04:00
Dan Williams 5298be26dd Merge branch 'master' into udev 2009-06-29 22:54:32 -04:00
Dan Williams 8e3da63599 gsm: increase COPS manual registration timeout; it just takes longer sometimes 2009-06-29 22:53:20 -04:00
Dan Williams 78633192d2 plugin-base: better Huawei detection; don't drop BUSlink response 2009-06-29 22:49:19 -04:00
Dan Williams d929eb859b errors: fix typo 2009-06-29 17:35:15 -04:00
Dan Williams b38c3160ae plugin-base: don't scribble on memory when looking up cached capabilities 2009-06-29 16:53:23 -04:00
Dan Williams 7b7df91eb8 manager: do modem creation from an idle handler
It helps make the supports/grab callchain less crappy to look at
in gdb by ensuring that the supports chain unwinds before the grab
happens, and also ensures that we use the right subsys/name variables
rather than depending on ones the plugin provided to supports_callback,
that may go be freed by the plugin somewhere in grab_port().
2009-06-29 16:51:25 -04:00
Dan Williams ef1e709c12 serial-port: shut valgrind up 2009-06-29 16:50:50 -04:00
Dan Williams 853af00142 plugin-base: fix finding the physical device again
Don't mis-use udev's ID_BUS key.
2009-06-29 14:24:43 -04:00
Dan Williams c106368ce7 Merge commit 'origin/master' into udev 2009-06-29 13:14:11 -04:00
Dan Williams c397247c05 gsm: attempt to fix registration crashes due to mishandled timeouts 2009-06-29 13:00:58 -04:00
Dan Williams b79ebbac35 gsm/cdma: mark netdev as data device if it was found first 2009-06-29 10:15:14 -04:00