Hey,

I am facing this problem, too (see https://lists.freedesktop.org/archives/modemmanager-devel/2018-August/006633.html).

I addressed that problem by changing the modem manager logic to set the default bearer using the UCGDFLT command whenever a the bearer changes. This seems to work reasonably (with the drawback as described in the thread linked above). I am still testing this, since I am not yet sure that this really does the job.


@Aleksander, concerning your planned implementation. You wrote in the thread above:

This should be some API that is totally independent from the connection process 
I think.

It is not clear to me how this will work: I don't get any connection not using the UCGDFLT command, so if a bearer is set, this needs to be result somehow in the UCGDFLT command. So how can this be independent from the connection process? If someone sets the APN, e.g. via the Network Manager, the UCGDFLT command must be issued, otherwise it will not work...

 Ulrich

Am 01.11.2018 um 21:17 schrieb Baryshnikov, Maxim (Digiteq Automotive):

Hello everyone,

    I've tried to establish a connection using ModemManager through LTE network and haven't succeed in it. However, I am able to successfully set up an internet connection manually, given the same conditions but without ModemManager, applying the steps suggested in Sec. 5.10.2 of [1]:

AT+CFUN=4

AT+UCGDFLT=1,"IP","internet.t-mobile.cz" -- sets the default PDP context which is applied right after a registration.

AT+CFUN=1

    When I use ModemManager (mmcli -m0 --simple-connect="apn=internet.t-mobile.cz"), it apparently configures a PDP context in the same way as for 3G/2G networks. The modem gets an IP and DNS addresses, but pings are not passing through it.. Please, see the logs and the modem info below.

root@zynq7:~# mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id '9be611a4f382a582972f20fa86efbaa8f6b02918')

-------------------------

  Hardware | manufacturer: 'u-blox'

           | model: 'TOBY-L210'

           | revision: '15.63'

           |   H/W revision: 'unknown'

           | supported: 'gsm-umts, lte'

           | current: 'gsm-umts, lte'

           |   equipment id: '###############'

-------------------------

  System   | device: '/sys/devices/soc0/amba/e0002000.usb/ci_hdrc.0/usb1/1-1/1-1.2'

           | drivers: 'cdc_ether, cdc_acm'

           | plugin: 'u-blox'

           |   primary port: 'ttyACM0'

           | ports: 'ttyACM0 (at), ttyACM1 (at), ttyACM2 (at), wwan0 (net)'

-------------------------

  Numbers  |    own : 'unknown'

-------------------------

  Status   | lock: 'none'

           | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'

           | state: 'searching'

           |    power state: 'on'

           |    access tech: 'unknown'

           | signal quality: '40' (recent)

-------------------------

  Modes    | supported: 'allowed: 2g; preferred: none

|                  allowed: 2g, 3g; preferred: none

           |       allowed: 2g, 3g; preferred: 2g

|                  allowed: 2g, 3g; preferred: 3g

|                  allowed: 3g; preferred: none

|                  allowed: 4g; preferred: none

|                  allowed: 2g, 3g, 4g; preferred: none

|                  allowed: 2g, 3g, 4g; preferred: 2g

|                  allowed: 2g, 3g, 4g; preferred: 3g

|                  allowed: 2g, 3g, 4g; preferred: 4g

|                  allowed: 2g, 4g; preferred: none

|                  allowed: 2g, 4g; preferred: 2g

|                  allowed: 2g, 4g; preferred: 4g

|                  allowed: 3g, 4g; preferred: none

|                  allowed: 3g, 4g; preferred: 3g

|                  allowed: 3g, 4g; preferred: 4g'

           | current: 'allowed: 4g; preferred: none'

-------------------------

  Bands    | supported: 'egsm, dcs, pcs, g850, utran-1, utran-3, utran-4, utran-6, utran-5, utran-8, utran-2, utran-7, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, eutran-11, eutran-13, eutran-17, eutran-20, utran-11'

           | current: 'egsm, pcs, g850, utran-1, utran-5, utran-8, utran-2, eutran-1, eutran-2, eutran-5, eutran-8'

-------------------------

  IP       | supported: 'ipv4, ipv6, ipv4v6'

-------------------------

  3GPP     | imei: '###############'

           |  enabled locks: 'none'

           |    operator id: 'unknown'

           |  operator name: 'unknown'

           | subscription: 'unknown'

           | registration: 'idle'

           |    EPS UE mode: 'csps-2'

-------------------------

  SIM      | path: '/org/freedesktop/ModemManager1/SIM/0'

-------------------------

  Bearers  | paths: 'none'

root@zynq7:~# mmcli -b 0

Bearer '/org/freedesktop/ModemManager1/Bearer/0'

-------------------------

  Status             | connected: 'yes'

                     | suspended: 'no'

                     | interface: 'wwan0'

                     | IP timeout: '20'

-------------------------

  Properties |         apn: 'internet.t-mobile.cz'

|     roaming: 'allowed'

|     IP type: 'none'

             |        user: 'none'

|    password: 'none'

|      number: 'none'

                     | Rm protocol: 'unknown'

-------------------------

  IPv4 configuration | method: 'dhcp'

                     | address: '100.90.53.103'

                     | prefix: '32'

                     | gateway: '100.90.53.103'

|      DNS: '93.153.117.49', '93.153.117.17'

-------------------------

  IPv6 configuration | method: 'unknown'

-------------------------

  Stats |          Duration: '3330'

|    Bytes received: 'N/A'

                     | Bytes transmitted: 'N/A'

Log:

[1541095858.128950] Simple connect started...

[1541095858.129087] PIN: unspecified

[1541095858.129146] Operator ID: unspecified

[1541095858.129204] Allowed roaming: yes

[1541095858.129259] APN: internet.t-mobile.cz

[1541095858.129315] IP family: unspecified

[1541095858.129368] Allowed authentication: unspecified

[1541095858.129420] User: unspecified

[1541095858.129471] Password: unspecified

[1541095858.129524] Number: unspecified

[1541095858.129566] Simple connect state (4/8): Wait to get fully enabled

[1541095858.129851] Simple connect state (5/8): Register

[1541095858.130018] Already registered in network '26201', automatic registration not launched...

[1541095858.130160] Simple connect state (6/8): Bearer

[1541095858.130242] Creating new bearer...

[1541095858.130344] u-blox: checking current USB profile...

[1541095858.130433] (ttyACM0) device open count is 2 (open)

[1541095858.130621] (ttyACM0): --> 'AT+UUSBCONF?<CR>'

[1541095858.140006] (ttyACM0): <-- '<CR><LF>+UUSBCONF: 2,"ECM",,"0x1143"<CR><LF>'

[1541095858.140526] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.140912] u-blox: usb profile loaded: ecm

[1541095858.140981] u-blox: checking current networking mode...

[1541095858.141072] (ttyACM0) device open count is 3 (open)

[1541095858.141186] (ttyACM0) device open count is 2 (close)

[1541095858.141312] (ttyACM0): --> 'AT+UBMCONF?<CR>'

[1541095858.153827] (ttyACM0): <-- '<CR><LF>+UBMCONF: 1<CR><LF>'

[1541095858.155688] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.156051] u-blox: networking mode loaded: router

[1541095858.156120] u-blox: creating u-blox broadband bearer (ecm profile, router mode)...

[1541095858.158948] (ttyACM0) device open count is 3 (open)

[1541095858.159090] (ttyACM0) device open count is 2 (close)

[1541095858.159433] u-blox: new u-blox broadband bearer created at DBus path '/org/freedesktop/ModemManager1/Bearer/0'

[1541095858.161586] Simple connect state (7/8): Connect

[1541095858.161719] Connecting bearer '/org/freedesktop/ModemManager1/Bearer/0'

[1541095858.161841] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)

[1541095858.165640] Launching 3GPP connection attempt with APN 'internet.t-mobile.cz'

[1541095858.165760] No specific IP family requested, defaulting to ipv4

[1541095858.165833] No specific IP family requested, defaulting to ipv4

[1541095858.165893] Looking for best CID...

[1541095858.166041] (ttyACM0) device open count is 3 (open)

[1541095858.166219] (ttyACM0) device open count is 2 (close)

[1541095858.166340] (ttyACM0): --> 'AT+CGDCONT?<CR>'

[1541095858.181561] (ttyACM0): <-- '<CR><LF>+CGDCONT: 4,"IP","IMS.MNC001.MCC230.GPRS","100.71.189.48",0,0,0,0,0,0<CR><LF>'

[1541095858.182167] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.182568] Found '1' PDP contexts

[1541095858.182636] PDP context [cid=4] [type='ipv4'] [apn='IMS.MNC001.MCC230.GPRS']

[1541095858.183035] Using empty CID 5 with PDP type 'ipv4'

[1541095858.183166] (ttyACM0) device open count is 3 (open)

[1541095858.183284] (ttyACM0) device open count is 2 (close)

[1541095858.183412] (ttyACM0): --> 'AT+CGDCONT=5,"IP","internet.t-mobile.cz"<CR>'

[1541095858.208571] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.208902] checking supported authentication methods...

[1541095858.209015] (ttyACM0) device open count is 3 (open)

[1541095858.209150] (ttyACM0) device open count is 2 (close)

[1541095858.209283] (ttyACM0): --> 'AT+UAUTHREQ=?<CR>'

[1541095858.214173] (ttyACM0): <-- '<CR><LF>+UAUTHREQ: (1-8),(0-2),,<CR><LF>'

[1541095858.214660] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.214933] Not using authentication

[1541095858.215014] setting up authentication preferences in PDP context #5...

[1541095858.215111] (ttyACM0) device open count is 3 (open)

[1541095858.215229] (ttyACM0) device open count is 2 (close)

[1541095858.215362] (ttyACM0): --> 'AT+UAUTHREQ=5,0,"",""<CR>'

[1541095858.228421] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.228664] activating PDP context #5...

[1541095858.228771] (ttyACM0) device open count is 3 (open)

[1541095858.228887] (ttyACM0) device open count is 2 (close)

[1541095858.229018] (ttyACM0): --> 'AT+CGACT=1,5<CR>'

[1541095858.679091] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.679468] gathering gateway information for PDP context #5...

[1541095858.679573] (ttyACM0) device open count is 3 (open)

[1541095858.679703] (ttyACM0) device open count is 2 (close)

[1541095858.679826] (ttyACM0): --> 'AT+UIPADDR=5<CR>'

[1541095858.895104] (ttyACM0): <-- '<CR><LF>+UIPADDR: 5,"ccinet4","100.90.53.103","255.255.255.0","",""<CR><LF>'

[1541095858.896432] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.896811] IPv4 gateway address retrieved: 100.90.53.103

[1541095858.896890] gathering IP and DNS information for PDP context #5...

[1541095858.896983] (ttyACM0) device open count is 3 (open)

[1541095858.897093] (ttyACM0) device open count is 2 (close)

[1541095858.897218] (ttyACM0): --> 'AT+CGCONTRDP=5<CR>'

[1541095858.902575] (ttyACM0): <-- '<CR><LF>+CGCONTRDP: 5,6,"internet.t-mobile.cz.MNC001.MCC230.GPRS","'

[1541095858.903034] (ttyACM0): <-- '100.90.53.103.255.255.255.255","100.90.53.103","93.153.117.49","93.153.117.17","0.0.0.0","0.0.0.

[1541095858.903398] (ttyACM0): <-- '<CR><LF>OK<CR><LF>'

[1541095858.903792] IPv4 address retrieved: 100.90.53.103

[1541095858.903863] IPv4 subnet retrieved: 255.255.255.255

[1541095858.903936] Primary DNS retrieved: 93.153.117.49

[1541095858.903978] Secondary DNS retrieved: 93.153.117.17

[1541095858.904039] finished IP settings retrieval for PDP context #5...

[1541095858.904144] (wwan0): port now connected

[1541095858.904200] Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'

[1541095858.904851] (ttyACM0) device open count is 3 (open)

[1541095858.905034] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)

[1541095858.908564] Simple connect state (8/8): All done

[1541095858.910318] (ttyACM0) device open count is 2 (close)

    The question is: is there a workaround for that? If no, should then the ublox plugin

be modified somehow? Or, maybe I've missed something in the modem's configuration..

Thank you in advance for any support.

Best regards,

Maxim Baryshnikov

--

[1] - https://www.u-blox.com/sites/default/files/AT-CommandsExamples_AppNote_%28UBX-13001820%29.pdf



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

--
Best regards / Mit freundlichen Grüßen / Salutations distinguées

Ulrich Mohr

SEMEX-EngCon GmbH
Carl-Merz-Strass 26
76275 Ettlingen
Phone: +49 (0) 7243 5143596
email:  u.m...@semex-engcon.com
___________________________________________
Executive board: A. Stiegler, H.-J. Nitzpon
Commercial register: Mannheim, HRB 718881
Company domicile: Ettlingen

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

Reply via email to