Re: Latest ModemManagaer and libqmi packages for raspberry-pi?

2016-09-09 Thread Aleksander Morgado
On Wed, Sep 7, 2016 at 6:42 AM, Ajay Garg  wrote:
> Are there PPAs for Raspberry-Pi. on similar lines as
>
> https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-trusty
> https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-xenial
>
>
> If not, is there a way to get the latest modemmanager and qmi libraries for
> raspberry-pi?
> I will be happy to help with the mundanes :)

Truth be told, I have no idea if there are any.

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: QUECTEL EC20/EC21. Several drivers supported, which one is better to use?

2016-09-09 Thread Dan Williams
On Fri, 2016-09-09 at 10:36 +0200, José  wrote:
> Hi Dan,
> 
> thanks for the patch! Unfortunately it is not working. Here is the
> log: http://pastebin.com/A5H3mnPh

Could you try the following patch against ModemManager?  There are two
ways to get the UIM/SIM status, one with the "DMS" service that works
on most devices from 2015 and earlier, and a new way with the "UIM"
service that works on many 2015+ devices.  Perhaps the EC21 is new
enough that it requires the UIM service, but ModemManager doesn't
recognize the error code that it's returning.  This patch will do that.

You'll still need the libqmi patch I posted earlier too.

diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index bc13925..f60d0f4 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -1740,7 +1740,10 @@ dms_uim_get_pin_status_ready (QmiClientDms *client,
 /* We get InvalidQmiCommand on newer devices which don't like the 
legacy way */
 if (g_error_matches (error,
  QMI_PROTOCOL_ERROR,
- QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) {
+ QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND) ||
+g_error_matches (error,
+ QMI_PROTOCOL_ERROR,
+ QMI_PROTOCOL_ERROR_NOT_SUPPORTED)) {
 g_error_free (error);
 qmi_message_dms_uim_get_pin_status_output_unref (output);
 /* Flag that the command is unsupported, and try with the new way 
*/

Dan

> Still trying to contact with Quectel tech support.
> 
> On Thu, Sep 8, 2016 at 9:55 PM, Dan Williams  wrote:
> > 
> > On Thu, 2016-09-08 at 19:05 +0200, José  wrote:
> > > 
> > > Ok, thanks. I am also trying to contact QUECTEL technical
> > > support, so
> > > I will let them now about this.
> > > 
> > > Find the log here: http://pastebin.com/bGr6bAt0
> > Thanks; the errors are due to SIM lock state.  Try backing out your
> > changes to libqmi and then apply the attached patch.  Does that
> > make
> > things work?
> > 
> > Dan
> > 
> > > 
> > > On Thu, Sep 8, 2016 at 6:31 PM, Dan Williams 
> > > wrote:
> > > > 
> > > > 
> > > > On Thu, 2016-09-08 at 17:56 +0200, José  wrote:
> > > > > 
> > > > > 
> > > > > Sure:
> > > > > 
> > > > > root:~# qmicli -d /dev/cdc-wdm0 --get-service-version-info
> > > > > [/dev/cdc-wdm0] Supported versions:
> > > > > ctl (1.5)
> > > > > wds (1.67)
> > > > > dms (1.0)
> > > > > nas (1.25)
> > > > > qos (1.12)
> > > > Thanks, I'll post a patch to work around the DMS stupidity.
> > > > 
> > > > > 
> > > > > 
> > > > > Also, if I patch libqmi to get rid of both ModemManager
> > > > > errors,
> > > > > the
> > > > > modem still does not work.
> > > > Can you post ModemManager --debug logs when you've patched
> > > > libqmi
> > > > to
> > > > get past this issue?
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > > 
> > > > > 
> > > > > On Thu, Sep 8, 2016 at 4:47 PM, Dan Williams  > > > > >
> > > > > wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On Thu, 2016-09-08 at 10:31 +0200, José  wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > This is the output of those commands:
> > > > > > > 
> > > > > > > qmicli -d /dev/cdc-wdm0 --dms-read-user-data
> > > > > > > [/dev/cdc-wdm0] User data read:
> > > > > > > Size: '0' bytes
> > > > > > > Contents:
> > > > > > > 
> > > > > > > qmicli -d /dev/cdc-wdm0 --dms-uim-get-state
> > > > > > > error: couldn't get UIM state: QMI protocol error (94):
> > > > > > > 'NotSupported'
> > > > > > So the device lies about the DMS service version.  If it
> > > > > > didn't
> > > > > > actually support them, it would return "InvalidQmiCommand"
> > > > > > to
> > > > > > both
> > > > > > of
> > > > > > those requests.
> > > > > > 
> > > > > > Could you grab:
> > > > > > 
> > > > > > qmicli -d /dev/cdc-wdm0 --get-service-version-info
> > > > > > 
> > > > > > for me?
> > > > > > 
> > > > > > Thanks,
> > > > > > Dan
> > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On Wed, Sep 7, 2016 at 6:32 PM, Dan Williams  > > > > > > .com
> > > > > > > > 
> > > > > > > > 
> > > > > > > wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On Wed, 2016-09-07 at 17:05 +0200, José  wrote:
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > Hi Dan,
> > > > > > > > > 
> > > > > > > > > thanks for your answer.
> > > > > > > > > 
> > > > > > > > > I compiled libqmi-1.12.6-r0.1.cortexa9hf_vfp_neon.rpm
> > > > > > > > > (notice
> > > > > > > > > that it
> > > > > > > > > is an older version, it was just simpler on my
> > > > > > > > > environment)
> > > > > > > > > with
> > > > > > > > > the
> > > > > > > > > change you proposed. After that, the command seems to
> > > > > > > > > work:
> > > > > > > > > 
> > 

Re: QUECTEL EC20/EC21. Several drivers supported, which one is better to use?

2016-09-09 Thread José
Thanks for the patch Dan. The modem seems to connect, it gets an IP
address and DNS servers, but there is no connectiviy. I cannot resolve
any names, I cannot even ping the gateway (I can ping my own ip
address)

There are also some warnings and errors that may be important. Find
here the log: http://pastebin.com/JC9BALPs

Thanks

On Fri, Sep 9, 2016 at 4:31 PM, Dan Williams  wrote:
> On Fri, 2016-09-09 at 10:36 +0200, José  wrote:
>> Hi Dan,
>>
>> thanks for the patch! Unfortunately it is not working. Here is the
>> log: http://pastebin.com/A5H3mnPh
>
> Could you try the following patch against ModemManager?  There are two
> ways to get the UIM/SIM status, one with the "DMS" service that works
> on most devices from 2015 and earlier, and a new way with the "UIM"
> service that works on many 2015+ devices.  Perhaps the EC21 is new
> enough that it requires the UIM service, but ModemManager doesn't
> recognize the error code that it's returning.  This patch will do that.
>
> You'll still need the libqmi patch I posted earlier too.
>
> diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
> index bc13925..f60d0f4 100644
> --- a/src/mm-broadband-modem-qmi.c
> +++ b/src/mm-broadband-modem-qmi.c
> @@ -1740,7 +1740,10 @@ dms_uim_get_pin_status_ready (QmiClientDms *client,
>  /* We get InvalidQmiCommand on newer devices which don't like the 
> legacy way */
>  if (g_error_matches (error,
>   QMI_PROTOCOL_ERROR,
> - QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) {
> + QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND) ||
> +g_error_matches (error,
> + QMI_PROTOCOL_ERROR,
> + QMI_PROTOCOL_ERROR_NOT_SUPPORTED)) {
>  g_error_free (error);
>  qmi_message_dms_uim_get_pin_status_output_unref (output);
>  /* Flag that the command is unsupported, and try with the new 
> way */
>
> Dan
>
>> Still trying to contact with Quectel tech support.
>>
>> On Thu, Sep 8, 2016 at 9:55 PM, Dan Williams  wrote:
>> >
>> > On Thu, 2016-09-08 at 19:05 +0200, José  wrote:
>> > >
>> > > Ok, thanks. I am also trying to contact QUECTEL technical
>> > > support, so
>> > > I will let them now about this.
>> > >
>> > > Find the log here: http://pastebin.com/bGr6bAt0
>> > Thanks; the errors are due to SIM lock state.  Try backing out your
>> > changes to libqmi and then apply the attached patch.  Does that
>> > make
>> > things work?
>> >
>> > Dan
>> >
>> > >
>> > > On Thu, Sep 8, 2016 at 6:31 PM, Dan Williams 
>> > > wrote:
>> > > >
>> > > >
>> > > > On Thu, 2016-09-08 at 17:56 +0200, José  wrote:
>> > > > >
>> > > > >
>> > > > > Sure:
>> > > > >
>> > > > > root:~# qmicli -d /dev/cdc-wdm0 --get-service-version-info
>> > > > > [/dev/cdc-wdm0] Supported versions:
>> > > > > ctl (1.5)
>> > > > > wds (1.67)
>> > > > > dms (1.0)
>> > > > > nas (1.25)
>> > > > > qos (1.12)
>> > > > Thanks, I'll post a patch to work around the DMS stupidity.
>> > > >
>> > > > >
>> > > > >
>> > > > > Also, if I patch libqmi to get rid of both ModemManager
>> > > > > errors,
>> > > > > the
>> > > > > modem still does not work.
>> > > > Can you post ModemManager --debug logs when you've patched
>> > > > libqmi
>> > > > to
>> > > > get past this issue?
>> > > >
>> > > > Dan
>> > > >
>> > > >
>> > > > >
>> > > > >
>> > > > > On Thu, Sep 8, 2016 at 4:47 PM, Dan Williams > > > > > >
>> > > > > wrote:
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On Thu, 2016-09-08 at 10:31 +0200, José  wrote:
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > This is the output of those commands:
>> > > > > > >
>> > > > > > > qmicli -d /dev/cdc-wdm0 --dms-read-user-data
>> > > > > > > [/dev/cdc-wdm0] User data read:
>> > > > > > > Size: '0' bytes
>> > > > > > > Contents:
>> > > > > > >
>> > > > > > > qmicli -d /dev/cdc-wdm0 --dms-uim-get-state
>> > > > > > > error: couldn't get UIM state: QMI protocol error (94):
>> > > > > > > 'NotSupported'
>> > > > > > So the device lies about the DMS service version.  If it
>> > > > > > didn't
>> > > > > > actually support them, it would return "InvalidQmiCommand"
>> > > > > > to
>> > > > > > both
>> > > > > > of
>> > > > > > those requests.
>> > > > > >
>> > > > > > Could you grab:
>> > > > > >
>> > > > > > qmicli -d /dev/cdc-wdm0 --get-service-version-info
>> > > > > >
>> > > > > > for me?
>> > > > > >
>> > > > > > Thanks,
>> > > > > > Dan
>> > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On Wed, Sep 7, 2016 at 6:32 PM, Dan Williams > > > > > > > .com
>> > > > > > > >
>> > > > > > > >
>> > > > > > > wrote:
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > On Wed, 2016-09-07 at 17:05 +0200, José  wrote:
>> > > > > > > > >
>> > > > > > > > >
>>