diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-03-27 17:29:49 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-03-28 17:05:48 +0100 |
commit | b76dc134bf6bed78c0a83fdc12d2e1f66821148c (patch) | |
tree | 54dd81adfae052eb8178d4427eeec557d85f3703 /plugins/novatel/mm-plugin-novatel.c | |
parent | ca97f0e79fde28f934eddebb32b51dfa31be5d74 (diff) |
novatel: try to flip secondary ports to AT as soon as possible
So do it during port probing. If we send this command early enough in the
first AT port being probed, it should flip the secondary ports to AT mode
before their port probing is finished.
https://bugzilla.gnome.org/show_bug.cgi?id=696696
Diffstat (limited to 'plugins/novatel/mm-plugin-novatel.c')
-rw-r--r-- | plugins/novatel/mm-plugin-novatel.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/novatel/mm-plugin-novatel.c b/plugins/novatel/mm-plugin-novatel.c index a1ee0819..6f798585 100644 --- a/plugins/novatel/mm-plugin-novatel.c +++ b/plugins/novatel/mm-plugin-novatel.c @@ -34,6 +34,21 @@ G_DEFINE_TYPE (MMPluginNovatel, mm_plugin_novatel, MM_TYPE_PLUGIN) int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; +/*****************************************************************************/ +/* Custom commands for AT probing */ + +/* We need to explicitly flip secondary ports to AT mode. + * We also use this command also for checking AT support in the current port. + */ +static const MMPortProbeAtCommand custom_at_probe[] = { + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, + { NULL } +}; + +/*****************************************************************************/ + static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, @@ -71,6 +86,7 @@ mm_plugin_create (void) MM_PLUGIN_ALLOWED_VENDOR_IDS, vendors, MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, forbidden_products, MM_PLUGIN_ALLOWED_AT, TRUE, + MM_PLUGIN_CUSTOM_AT_PROBE, custom_at_probe, MM_PLUGIN_ALLOWED_QCDM, TRUE, NULL)); } |