Re: The loading order of plugins

2018-10-10 Thread matthew stanger
>
> I tried to connect with the Cinterion plugin:

The bearer creation using CGDCONT is correct and the (S)WWAN activation
looks good. The connection logic looks correct so my guess is that the
issue lies in how the hardware/drivers are setup.

My AT^SSRVSET setup is value "1" ( ECM ), and I can't switch to value "10"
> ( NCM ).

I don't even see SSRVSET in the els61-e doc, odd, only in the '2'. Can you
give us any more detail on your WWAN interface? Do the USB0/USB1 interfaces
come up with Linux correctly? Can you use minicom on your ttyACM0 interface
to send 'AT+CGDCONT: 1,"IP","internet.mnc092.mcc466.gprs","",0,0'(redundant
but to be sure,[also are you sure your APN is correct]) and then
'AT^SWWAN=1,1,1'. Pending the hardware has been configured and loaded
correctly that's really all that needs to be done with this modem to start
the connection.

In your plugin are you using the same SWWAN logic, or something different
for your connection? If you can show us your plugin I'm sure we can figure
out the difference and get it fixed in the Cinterion plugin. Are you aiming
to use the WWAN interface for your connection or ppp?

On Tue, Oct 9, 2018 at 3:51 AM Ken CJ Chou  wrote:

> Hi,
>
> matthew stanger  於 2018年10月9日 週二 上午2:48寫道:
>
>> Hi Ken,
>>
>> Given the datasheet Dan linked it seems like that modem family does
>> support the 'SWWAN' connection interface type. Given that I'd expect basic
>> connection attempts to work. Can you enable MM debugging and post the logs
>> of a connection attempt? I'm sure we can get the plugin to support this
>> modem properly.
>>
>> I tried to connect with the Cinterion plugin:
> ---
> $ mmcli -m 0 --simple-connect="apn=internet"
> error: couldn't connect the modem:
> 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown:
> Unknown error'
> ---
>
> The MM debug log showed below:
> ---
> ModemManager[16877]:   [1539104650.509401] ModemManager (version
> 1.8.2) starting in system bus...
>
> ...
>
> ModemManager[16877]:   [1539104666.882872] [device
> /sys/devices/platform/ocp/4740.usb/47401400.usb/musb-hdrc.0.auto/usb1/1-1]
> creating modem with plugin 'Cinterion' and '7' ports
>
> ...
>
> ModemManager[16877]:   [1539104726.574932] Simple connect state
> (4/8): Wait to get fully enabled
> ModemManager[16877]:   [1539104726.575178] Modem
> /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> enabled)
> ModemManager[16877]:   [1539104726.581605] Simple connect state
> (5/8): Register
> ModemManager[16877]:  [1539104726.591762] Launching automatic
> network registration...
> ModemManager[16877]:  [1539104726.592588] (ttyACM0) device open
> count is 2 (open)
> ModemManager[16877]:  [1539104726.593468] Running registration
> checks (CS: 'yes', PS: 'yes', EPS: 'yes')
> ModemManager[16877]:  [1539104726.594093] (ttyACM0) device open
> count is 3 (open)
> ModemManager[16877]:  [1539104726.599229] (ttyACM0): -->
> 'AT+COPS=0'
> ModemManager[16877]:  [1539104726.871750] (ttyACM0): <--
> 'OK'
> ModemManager[16877]:  [1539104726.872422] Running registration
> checks (CS: 'yes', PS: 'yes', EPS: 'yes')
> ModemManager[16877]:  [1539104726.872650] (ttyACM0) device open
> count is 4 (open)
> ModemManager[16877]:  [1539104726.872842] (ttyACM0) device open
> count is 3 (close)
> ModemManager[16877]:  [1539104726.873058] (ttyACM0): -->
> 'AT+CREG?'
> ModemManager[16877]:  [1539104726.901797] (ttyACM0): <--
> '+CREG: 2,1,"2817","0275070D",7'
> ModemManager[16877]:   [1539104726.902306] Modem
> /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed
> (unknown -> registering)
> ModemManager[16877]:  [1539104726.902490] loading Operator Code...
> ModemManager[16877]:  [1539104726.902631] (ttyACM0) device open
> count is 4 (open)
> ModemManager[16877]:  [1539104726.902805] (ttyACM0) device open
> count is 5 (open)
> ModemManager[16877]:  [1539104726.903010] Modem
> /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '0',
> MNC: '0', Location area code: '2817', Cell ID: '275070D')
> ModemManager[16877]:  [1539104726.912133] (ttyACM0): <--
> 'OK'
> ModemManager[16877]:  [1539104726.913176] (ttyACM0) device open
> count is 6 (open)
> ModemManager[16877]:  [1539104726.913763] (ttyACM0) device open
> count is 5 (close)
> ModemManager[16877]:  [1539104726.914355] (ttyACM0): -->
> 'AT+CREG?'
> ModemManager[16877]:  [1539104726.938810] (ttyACM0): <--
> '+CREG: 2,1,"2817","0275070D",7'
> ModemManager[16877]:  [1539104726.946157] (ttyACM0): <--
> 'OK'
> ModemManager[16877]:  [1539104726.946686] (ttyACM0) device open
> count is 6 (open)
> ModemManager[16877]:  [1539104726.946880] (ttyACM0) device open
> count is 5 (close)
> ModemManager[16877]:  [1539104726.947085] (ttyACM0): -->
> 'AT+COPS=3,2'
> ModemManager[16877]:  [1539104726.980321] (ttyACM0): <--
> 'OK'
> ModemManager[16877]:  [1539104726.980764] (ttyACM0) device open
> count is 4 (close)
> ModemManager[16877]:  [1539104726.981000] (ttyACM0): -->
> 'AT+COPS?'
> ModemManager[16877]:  

Re: The loading order of plugins

2018-10-09 Thread Aleksander Morgado
>> BUT, why is it that the modem cannot be supported by the Cinterion
>> plugin? Which are the commands that are different? Can the Cinterion
>> plugin not be updated to support this new model as well?
>>
> Then AT command such as "AT^SQPORT?" is not supported by "Cinterion Gemalto 
> ELS61". And The response message of command "AT+CFUN?" is in the format 
> "+CFUN: 1, 0", which is different from other modem.
> The main reason that the modem cannot be supported by the Cinterion plugin is 
> that the modem needs extra steps before connecting.
> But there're still some modems work well with the Cinterion plugin, so I 
> think its difficult to update the Cinterion plugin to support all those 
> modems.
>

If you already have a working plugin supporting this modem, could you
post your branch somewhere so that we can review it and see whether it
makes sense to merge it into the generic cinterion plugin? IMO none of
the reasons above would justify having a completely new plugin, I'm
sure the generic plugin could be adjusted to work properly with this
one as well.

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


Re: The loading order of plugins

2018-10-09 Thread Ken CJ Chou
Hi,

matthew stanger  於 2018年10月9日 週二 上午2:48寫道:

> Hi Ken,
>
> Given the datasheet Dan linked it seems like that modem family does
> support the 'SWWAN' connection interface type. Given that I'd expect basic
> connection attempts to work. Can you enable MM debugging and post the logs
> of a connection attempt? I'm sure we can get the plugin to support this
> modem properly.
>
> I tried to connect with the Cinterion plugin:
---
$ mmcli -m 0 --simple-connect="apn=internet"
error: couldn't connect the modem:
'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown:
Unknown error'
---

The MM debug log showed below:
---
ModemManager[16877]:   [1539104650.509401] ModemManager (version
1.8.2) starting in system bus...

...

ModemManager[16877]:   [1539104666.882872] [device
/sys/devices/platform/ocp/4740.usb/47401400.usb/musb-hdrc.0.auto/usb1/1-1]
creating modem with plugin 'Cinterion' and '7' ports

...

ModemManager[16877]:   [1539104726.574932] Simple connect state
(4/8): Wait to get fully enabled
ModemManager[16877]:   [1539104726.575178] Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> enabled)
ModemManager[16877]:   [1539104726.581605] Simple connect state
(5/8): Register
ModemManager[16877]:  [1539104726.591762] Launching automatic
network registration...
ModemManager[16877]:  [1539104726.592588] (ttyACM0) device open
count is 2 (open)
ModemManager[16877]:  [1539104726.593468] Running registration
checks (CS: 'yes', PS: 'yes', EPS: 'yes')
ModemManager[16877]:  [1539104726.594093] (ttyACM0) device open
count is 3 (open)
ModemManager[16877]:  [1539104726.599229] (ttyACM0): -->
'AT+COPS=0'
ModemManager[16877]:  [1539104726.871750] (ttyACM0): <--
'OK'
ModemManager[16877]:  [1539104726.872422] Running registration
checks (CS: 'yes', PS: 'yes', EPS: 'yes')
ModemManager[16877]:  [1539104726.872650] (ttyACM0) device open
count is 4 (open)
ModemManager[16877]:  [1539104726.872842] (ttyACM0) device open
count is 3 (close)
ModemManager[16877]:  [1539104726.873058] (ttyACM0): -->
'AT+CREG?'
ModemManager[16877]:  [1539104726.901797] (ttyACM0): <--
'+CREG: 2,1,"2817","0275070D",7'
ModemManager[16877]:   [1539104726.902306] Modem
/org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed
(unknown -> registering)
ModemManager[16877]:  [1539104726.902490] loading Operator Code...
ModemManager[16877]:  [1539104726.902631] (ttyACM0) device open
count is 4 (open)
ModemManager[16877]:  [1539104726.902805] (ttyACM0) device open
count is 5 (open)
ModemManager[16877]:  [1539104726.903010] Modem
/org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '0',
MNC: '0', Location area code: '2817', Cell ID: '275070D')
ModemManager[16877]:  [1539104726.912133] (ttyACM0): <--
'OK'
ModemManager[16877]:  [1539104726.913176] (ttyACM0) device open
count is 6 (open)
ModemManager[16877]:  [1539104726.913763] (ttyACM0) device open
count is 5 (close)
ModemManager[16877]:  [1539104726.914355] (ttyACM0): -->
'AT+CREG?'
ModemManager[16877]:  [1539104726.938810] (ttyACM0): <--
'+CREG: 2,1,"2817","0275070D",7'
ModemManager[16877]:  [1539104726.946157] (ttyACM0): <--
'OK'
ModemManager[16877]:  [1539104726.946686] (ttyACM0) device open
count is 6 (open)
ModemManager[16877]:  [1539104726.946880] (ttyACM0) device open
count is 5 (close)
ModemManager[16877]:  [1539104726.947085] (ttyACM0): -->
'AT+COPS=3,2'
ModemManager[16877]:  [1539104726.980321] (ttyACM0): <--
'OK'
ModemManager[16877]:  [1539104726.980764] (ttyACM0) device open
count is 4 (close)
ModemManager[16877]:  [1539104726.981000] (ttyACM0): -->
'AT+COPS?'
ModemManager[16877]:  [1539104727.007466] (ttyACM0): <--
'+COPS: 0,2,"00340036003600390032",7'
ModemManager[16877]:  [1539104727.013676] (ttyACM0): <--
'OK'
ModemManager[16877]:  [1539104727.014463] loaded Operator Code: 46692
ModemManager[16877]:  [1539104727.014866] Modem
/org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '466',
MNC: '92', Location area code: '2817', Cell ID: '275070D')
ModemManager[16877]:  [1539104727.014993] loading Operator Name...
ModemManager[16877]:  [1539104727.015115] (ttyACM0) device open
count is 5 (open)
ModemManager[16877]:  [1539104727.015287] (ttyACM0) device open
count is 6 (open)
ModemManager[16877]:  [1539104727.015418] (ttyACM0) device open
count is 5 (close)
ModemManager[16877]:  [1539104727.024610] (ttyACM0): -->
'AT+CGREG?'
ModemManager[16877]:  [1539104727.053901] (ttyACM0): <--
'+CGREG: 2,1,"","0275070D",7,"FF"'
ModemManager[16877]:  [1539104727.054411] Modem
/org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '466',
MNC: '92', Location area code: '', Cell ID: '275070D')
ModemManager[16877]:  [1539104727.063875] (ttyACM0): <--
'OK'
ModemManager[16877]:  [1539104727.064409] (ttyACM0) device open
count is 6 (open)
ModemManager[16877]:  [1539104727.064616] (ttyACM0) device open
count is 5 (close)
ModemManager[16877]:  [1539104727.064818] (ttyACM0): -->
'AT+CGREG?'
ModemManager[16877]:  

Re: The loading order of plugins

2018-10-09 Thread Ken CJ Chou
Hi,

Aleksander Morgado  於 2018年10月9日 週二 上午12:16寫道:

> Hey,
>
> > I'm now working on a modem "Cinterion Gemalto ELS61". And I tried to use
> it with ModemManager.
> > ModemManager suggests the "Cinterion" plugin. But somehow, the AT
> command set and some response message format of "Cinterion Gemalto ELS61"
> is different from other modems supported by the "Cinterion" plugin. So I
> wrote a plugin named "G-ELS61" especially for it.
> >
> > The question is, both "Cinterion" plugin and "G-ELS61" plugin support
> modem "Cinterion Gemalto ELS61". ModemManager will select the prior loaded
> plugin as best-plugin.
> > While the order of loading plugins is not fixed in ModemManager (Since
> "readdir()" returns entries in the order that files are linked in
> filesystem). That means ModemManager may use different plugin for the same
> modem on different devices.
> >
> > Currently, I use a simple workaround to solve the issue. I sort the
> loading order by the plugins' filename before loading. So that I can
> control the loading order of my plugin by its filename. The diff log is
> attached below:
> >
>
> Plugins can say "I don't support this specific device", and so in your
> case you could update the Cinterion plugin so that the specific
> vid:pid is listed in MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, and then the
> order of loading of plugins is irrelevant, see:
>
> https://www.freedesktop.org/software/ModemManager/api/latest/ref-overview-modem-port-probing.html#id-1.2.5.4
> .
>
Thanks, it's a better solution to this condition.

BUT, why is it that the modem cannot be supported by the Cinterion
> plugin? Which are the commands that are different? Can the Cinterion
> plugin not be updated to support this new model as well?
>
> Then AT command such as "AT^SQPORT?" is not supported by "Cinterion
Gemalto ELS61". And The response message of command "AT+CFUN?" is in the
format "+CFUN: 1, 0", which is different from other modem.
The main reason that the modem cannot be supported by the Cinterion plugin
is that the modem needs extra steps before connecting.
But there're still some modems work well with the Cinterion plugin, so I
think its difficult to update the Cinterion plugin to support all those
modems.

regards,
Ken

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


Re: The loading order of plugins

2018-10-08 Thread matthew stanger
Hi Ken,

Given the datasheet Dan linked it seems like that modem family does support
the 'SWWAN' connection interface type. Given that I'd expect basic
connection attempts to work. Can you enable MM debugging and post the logs
of a connection attempt? I'm sure we can get the plugin to support this
modem properly.

Also what is your hardware interface setup & AT^SSRVSET setup?

On Mon, Oct 8, 2018 at 12:36 PM Dan Williams  wrote:

> On Mon, 2018-10-08 at 18:16 +0200, Aleksander Morgado wrote:
> > Hey,
> >
> > > I'm now working on a modem "Cinterion Gemalto ELS61". And I tried
> > > to use it with ModemManager.
> > > ModemManager suggests the "Cinterion" plugin. But somehow, the AT
> > > command set and some response message format of "Cinterion Gemalto
> > > ELS61" is different from other modems supported by the "Cinterion"
> > > plugin. So I wrote a plugin named "G-ELS61" especially for it.
> > >
> > > The question is, both "Cinterion" plugin and "G-ELS61" plugin
> > > support modem "Cinterion Gemalto ELS61". ModemManager will select
> > > the prior loaded plugin as best-plugin.
> > > While the order of loading plugins is not fixed in ModemManager
> > > (Since "readdir()" returns entries in the order that files are
> > > linked in filesystem). That means ModemManager may use different
> > > plugin for the same modem on different devices.
> > >
> > > Currently, I use a simple workaround to solve the issue. I sort the
> > > loading order by the plugins' filename before loading. So that I
> > > can control the loading order of my plugin by its filename. The
> > > diff log is attached below:
> > >
> >
> > Plugins can say "I don't support this specific device", and so in
> > your
> > case you could update the Cinterion plugin so that the specific
> > vid:pid is listed in MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, and then the
> > order of loading of plugins is irrelevant, see:
> > https://www.freedesktop.org/software/ModemManager/api/latest/ref-over
> > view-modem-port-probing.html#id-1.2.5.4.
> >
> > BUT, why is it that the modem cannot be supported by the Cinterion
> > plugin? Which are the commands that are different? Can the Cinterion
> > plugin not be updated to support this new model as well?
>
> If it helps to figure that out:
>
> https://developer.gemalto.com/sites/default/files/els61-e2_atc_01000.pdf
>
> Dan
> ___
> ModemManager-devel mailing list
> ModemManager-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: The loading order of plugins

2018-10-08 Thread Dan Williams
On Mon, 2018-10-08 at 18:16 +0200, Aleksander Morgado wrote:
> Hey,
> 
> > I'm now working on a modem "Cinterion Gemalto ELS61". And I tried
> > to use it with ModemManager.
> > ModemManager suggests the "Cinterion" plugin. But somehow, the AT
> > command set and some response message format of "Cinterion Gemalto
> > ELS61" is different from other modems supported by the "Cinterion"
> > plugin. So I wrote a plugin named "G-ELS61" especially for it.
> > 
> > The question is, both "Cinterion" plugin and "G-ELS61" plugin
> > support modem "Cinterion Gemalto ELS61". ModemManager will select
> > the prior loaded plugin as best-plugin.
> > While the order of loading plugins is not fixed in ModemManager
> > (Since "readdir()" returns entries in the order that files are
> > linked in filesystem). That means ModemManager may use different
> > plugin for the same modem on different devices.
> > 
> > Currently, I use a simple workaround to solve the issue. I sort the
> > loading order by the plugins' filename before loading. So that I
> > can control the loading order of my plugin by its filename. The
> > diff log is attached below:
> > 
> 
> Plugins can say "I don't support this specific device", and so in
> your
> case you could update the Cinterion plugin so that the specific
> vid:pid is listed in MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, and then the
> order of loading of plugins is irrelevant, see:
> https://www.freedesktop.org/software/ModemManager/api/latest/ref-over
> view-modem-port-probing.html#id-1.2.5.4.
> 
> BUT, why is it that the modem cannot be supported by the Cinterion
> plugin? Which are the commands that are different? Can the Cinterion
> plugin not be updated to support this new model as well?

If it helps to figure that out:

https://developer.gemalto.com/sites/default/files/els61-e2_atc_01000.pdf

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


Re: The loading order of plugins

2018-10-08 Thread Aleksander Morgado
Hey,

> I'm now working on a modem "Cinterion Gemalto ELS61". And I tried to use it 
> with ModemManager.
> ModemManager suggests the "Cinterion" plugin. But somehow, the AT command set 
> and some response message format of "Cinterion Gemalto ELS61" is different 
> from other modems supported by the "Cinterion" plugin. So I wrote a plugin 
> named "G-ELS61" especially for it.
>
> The question is, both "Cinterion" plugin and "G-ELS61" plugin support modem 
> "Cinterion Gemalto ELS61". ModemManager will select the prior loaded plugin 
> as best-plugin.
> While the order of loading plugins is not fixed in ModemManager (Since 
> "readdir()" returns entries in the order that files are linked in 
> filesystem). That means ModemManager may use different plugin for the same 
> modem on different devices.
>
> Currently, I use a simple workaround to solve the issue. I sort the loading 
> order by the plugins' filename before loading. So that I can control the 
> loading order of my plugin by its filename. The diff log is attached below:
>

Plugins can say "I don't support this specific device", and so in your
case you could update the Cinterion plugin so that the specific
vid:pid is listed in MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, and then the
order of loading of plugins is irrelevant, see:
https://www.freedesktop.org/software/ModemManager/api/latest/ref-overview-modem-port-probing.html#id-1.2.5.4.

BUT, why is it that the modem cannot be supported by the Cinterion
plugin? Which are the commands that are different? Can the Cinterion
plugin not be updated to support this new model as well?

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