diff options
author | David McCullough <david.mccullough@accelecon.com> | 2014-06-30 17:10:01 +1000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-07-01 11:08:47 +0200 |
commit | 83c8db88193e910981c06ea0d35c3b182dddb49d (patch) | |
tree | 6da78e6c1f8bcc052077e7d0cd13f672e8d8f3ac /plugins | |
parent | 8f837b830d5f636a113bacc8c552f990766694fa (diff) |
huawei: avoid AT^GETPORTMODE in Huawei MU609
The MU609 modems from Huawei have a bug (confirmed by Huawei) that causes
the modem to reset if AT^GETPORTMODE is issued.
I have provided and example udev rule I use to disable this command as a
patch, feel free to drop that if its not acceptable. Since I cannot tell
the modem type from within the udev rules this is less specific than my
previous code based patch, but much simpler ;-)
I have two modems that share the same USB ID, however, neither supports the
^GETPORTMODE command (and one of them crashes when it is issued). Perhaps
someone with a Huawei that supports ^GETPORTMODE can check their USB ID's
and see if they clash.
Here is a comment from the Huawei devs:
> We confirmed this is a issue. This is Qualcomm baseband command at Data
> Card. We didn’t delete and block it. We will fix this issue in next FW.
> Thank you very much.
Sign-off-by: David McCullough <david.mccullough@accelecon.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/huawei/77-mm-huawei-net-port-types.rules | 3 | ||||
-rw-r--r-- | plugins/huawei/mm-plugin-huawei.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/huawei/77-mm-huawei-net-port-types.rules b/plugins/huawei/77-mm-huawei-net-port-types.rules index 051b5d00..7309be8a 100644 --- a/plugins/huawei/77-mm-huawei-net-port-types.rules +++ b/plugins/huawei/77-mm-huawei-net-port-types.rules @@ -3,6 +3,9 @@ ACTION!="add|change|move", GOTO="mm_huawei_port_types_end" ENV{ID_VENDOR_ID}!="12d1", GOTO="mm_huawei_port_types_end" +# MU609 does not support getportmode (crashes modem with default firmware) +ATTRS{idProduct}=="1573", ENV{ID_MM_HUAWEI_DISABLE_GETPORTMODE}="1" + # Mark the modem and at port flags for ModemManager SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="01", ATTRS{bInterfaceProtocol}=="01", ENV{ID_MM_HUAWEI_MODEM_PORT}="1" SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="01", ATTRS{bInterfaceProtocol}=="02", ENV{ID_MM_HUAWEI_AT_PORT}="1" diff --git a/plugins/huawei/mm-plugin-huawei.c b/plugins/huawei/mm-plugin-huawei.c index 26191a61..c9b923e4 100644 --- a/plugins/huawei/mm-plugin-huawei.c +++ b/plugins/huawei/mm-plugin-huawei.c @@ -250,6 +250,7 @@ static void huawei_custom_init_step (HuaweiCustomInitContext *ctx) { FirstInterfaceContext *fi_ctx; + GUdevDevice *port; /* If cancelled, end */ if (g_cancellable_is_cancelled (ctx->cancellable)) { @@ -286,7 +287,8 @@ huawei_custom_init_step (HuaweiCustomInitContext *ctx) } /* Try to get a port map from the modem */ - if (!ctx->getportmode_done) { + port = mm_port_probe_peek_port (ctx->probe); + if (!ctx->getportmode_done && !g_udev_device_get_property_as_boolean (port, "ID_MM_HUAWEI_DISABLE_GETPORTMODE")) { if (ctx->getportmode_retries == 0) { g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); huawei_custom_init_context_complete_and_free (ctx); |