Denis,
I made this change. I did not see any change in logs apart from in
"atmodem" had changed to "huaweimodem". However, at commands were the same
in there. One difference was that test/activate-context did not return with
error messages. In fact it did not print anything. Also no at commands were
produced. Also no service was produced visible from connmand.

I made more of these "atmodem" -> "huaweimodem" modifications. All Error
messages from ofono logs apart from one were removed. However, operation
was the same.

I did not find AT^NDISDUP from log even though it seemed to be some in
drivers/huaweimodem/gprs-context.c.

Please find the patch below, if you can find any use of it as it really was
not enough making things work.
I must try something else as I'm running out of time now.
Anyhow, thank for your assistance Denis.

Thanks,
Matti

----- patch ----
diff --git a/plugins/huawei.c b/plugins/huawei.c
index 59995b3..5bf903e 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -791,9 +791,9 @@ static void huawei_pre_sim(struct ofono_modem *modem)
     DBG("%p", modem);

     if (data->have_gsm == TRUE) {
-        ofono_devinfo_create(modem, 0, "atmodem", data->pcui);
+        ofono_devinfo_create(modem, 0, "huaweimodem", data->pcui);
         sim = ofono_sim_create(modem, OFONO_VENDOR_HUAWEI,
-                        "atmodem", data->pcui);
+                        "huaweimodem", data->pcui);
     } else if (data->have_cdma == TRUE) {
         ofono_devinfo_create(modem, 0, "cdmamodem", data->pcui);

@@ -823,17 +823,17 @@ static void huawei_post_sim(struct ofono_modem *modem)
         struct ofono_gprs *gprs;
         struct ofono_gprs_context *gc;

-        ofono_phonebook_create(modem, 0, "atmodem", data->pcui);
+        ofono_phonebook_create(modem, 0, "huaweimodem", data->pcui);
         ofono_radio_settings_create(modem, 0,
                         "huaweimodem", data->pcui);

         ofono_sms_create(modem, OFONO_VENDOR_HUAWEI,
-                        "atmodem", data->pcui);
+                        "huaweimodem", data->pcui);

         gprs = ofono_gprs_create(modem, OFONO_VENDOR_HUAWEI,
-                        "atmodem", data->pcui);
+                        "huaweimodem", data->pcui);
         gc = ofono_gprs_context_create(modem, 0,
-                        "atmodem", data->modem);
+                        "huaweimodem", data->modem);

         if (gprs && gc)
             ofono_gprs_add_context(gprs, gc);
@@ -848,7 +848,7 @@ static void huawei_post_online(struct ofono_modem
*modem)

     if (data->have_gsm == TRUE) {
         ofono_netreg_create(modem, OFONO_VENDOR_HUAWEI,
-                        "atmodem", data->pcui);
+                        "huaweimodem", data->pcui);

         ofono_cbs_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
                         "atmodem", data->pcui);
@@ -861,7 +861,7 @@ static void huawei_post_online(struct ofono_modem
*modem)
         ofono_cdma_netreg_create(modem, 0, "huaweimodem", data->pcui);

         ofono_cdma_connman_create(modem, OFONO_VENDOR_HUAWEI,
-                        "cdmamodem", data->modem);
+                        "huaweimodem", data->modem);
     }

     if (data->have_voice == TRUE) {
diff --git a/plugins/udevng.c b/plugins/udevng.c
index e43d045..976f209 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -321,6 +321,7 @@ static gboolean setup_huawei(struct modem_info *modem)
                 g_strcmp0(info->interface, "255/1/51") == 0) {
             diag = info->devnode;
         } else if (g_strcmp0(info->interface, "255/1/8") == 0 ||
+                g_strcmp0(info->interface, "255/2/22") == 0 ||
                 g_strcmp0(info->interface, "255/1/56") == 0) {
             net = info->devnode;
         } else if (g_strcmp0(info->interface, "255/1/9") == 0 ||
@@ -1104,6 +1105,7 @@ static struct {
     { "huawei",    "cdc_ether",    "12d1"        },
     { "huawei",    "qmi_wwan",    "12d1"        },
     { "huawei",    "option",    "12d1"        },
+    { "huawei",    "huawei_cdc_ncm",    "12d1"        },
     { "speedupcdma","option",    "1c9e", "9e00"    },
     { "speedup",    "option",    "1c9e"        },
     { "speedup",    "option",    "2020"        },


2016-01-12 19:20 GMT+02:00 Denis Kenzior <[email protected]>:

> Hi Matti,
>
> On 01/12/2016 10:56 AM, matti kaasinen wrote:
>
>> Denis,
>>
>> 2016-01-12 18:46 GMT+02:00 matti kaasinen <[email protected]
>> <mailto:[email protected]>>:
>>
>>             activate-context
>>             =>
>>             Error activating /huawei_0/context1:
>>             org.ofono.Error.NotImplemented:
>>             Implementation not provided
>>
>>
>>         There is no gprs context driver provided or it failed to setup.
>>         Do you have TUN/TAP in the kernel or kernel module?
>>
>>     It was not loaded, but I modprobed it now manually and got different
>>     error message:
>>     Error activating /huawei_1/context1: org.ofono.Error.Failed:
>>     Operation failed
>>
>>
>> Ofono log gave now some error messages:
>> ..ofonod: drivers/atmodem/gprs-context.c:at_gprs_activate_primary() cid 1
>> ..ofonod: Modem: > AT+CGDCONT=1,"IP","internet"\r
>> ..ofonod: Modem: < \r\nOK\r\n
>> ..ofonod: drivers/atmodem/gprs-context.c:at_cgdcont_cb() ok 1
>> ..ofonod: Modem: > AT+CGDATA="PPP",1\r
>> ..ofonod: Modem: < \r\n+CME ERROR: 50\r\n
>> ..ofonod: drivers/atmodem/gprs-context.c:at_cgdata_cb() ok 0
>> ..ofonod: Unable to enter data state
>> ..ofonod: src/gprs.c:pri_activate_callback() 0x122580
>> ..ofonod: src/gprs.c:pri_activate_callback() Activating context failed
>> with error: Incorrect parameters
>>
>>
> Looks like your modem has a newer / different firmware.  in
> plugins/huawei.c, line:
>                 gc = ofono_gprs_context_create(modem, 0,
>                                                 "atmodem", data->modem);
>
> Can you try changing "atmodem" to "huaweimodem" and see if it works after
> that?
>
> Regards,
> -Denis
>
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to