All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mylene Josserand <mylene.josserand@openwide.fr>
To: ofono@ofono.org
Subject: Re: [help] connect 2 APN at the same time (PPP and QMI)
Date: Fri, 05 Dec 2014 13:38:09 +0100	[thread overview]
Message-ID: <1677713536.28890660.1417783089563.JavaMail.root@openwide.fr> (raw)
In-Reply-To: <5480923E.6020006@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4199 bytes --]

Hi Denis,

 
> Pretty much.  When we pass the chat to the gprs_context driver we set
> the slave chat.  This is needed in order to monitor certain events
> which
> come in via AT commands when the PPP link is active.  In effect we
> require 2 AT command ports.


ok, thank you for the explanation.


> On some hardware there was only a single functional PPP port, so the
> driver might need to be modified to handle that case, but it sounds
> like
> you don't have this issue.


Yes, I have 2 AT command ports but I understand that it must be handled differently with only one AT port.


> 
> Cool, feel free to send a patch for this.
> 
> IP settings are notified to oFono by the gprs_context driver.  If
> there
> are IP settings given, then most likely they should be obtained via
> DHCP.  Running test/list-contexts should tell you all the information
> once both contexts are active.


Yes, I already used this test and sent some "dbus-send" command lines to get informations.
I get an IP address according to ofono :

[ /modem_0 ]
    [ /modem_0/context1 ]
        Username = 
        AuthenticationMethod = chap
        Protocol = ip
        Name = Internet
        Settings = { Interface=wwan0 Method=dhcp }
        IPv6.Settings = { }
        Active = 1
        AccessPointName = APN1
        Password = 
        Type = internet

    [ /modem_0/context2 ]
        Username = 
        AuthenticationMethod = chap
        Protocol = ip
        Name = Internet
        Settings = { Interface=ppp0 Netmask=255.255.255.255 Method=static DomainNameServers=0.0.0.0,0.0.0.0, Address=30.1.63.4 }
        IPv6.Settings = { }
        Active = 1
        AccessPointName = APN2
        Password = 
        Type = internet


but with ifconfig, I did not get the IP address on the PPP0 interface (in this example) :

ppp0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wwan0     Link encap:Ethernet  HWaddr 16:12:29:6F:55:C7  
          inet addr:217.200.57.222  Bcast:217.200.57.223  Mask:255.255.255.252
          inet6 addr: fe80::1412:29ff:fe6f:55c7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1726 (1.6 KiB)  TX bytes:8044 (7.8 KiB)

I run more tests and I tried to exchange the APN names and my problem is not linked to APNs, it is linked to the context2. Whatever APN and whatever interfaces (PPP or QMI) is selected in context 2, it did not get an IP address. So PPP or QMI connections are ok, APN1 or APN2 are ok, this seems to be a context 2 problem. 

I looked deeper in connman's code (which I think is the problem). And, in debug mode, for the 2nd context, the "context_changed" function is called twice with no "Settings" and no "Active" parameters read.

For context 1 :

connmand[1537]: plugins/ofono.c:context_changed() context_path /modem_0/context1
connmand[1537]: plugins/ofono.c:context_changed() /modem_0 Settings
connmand[1537]: plugins/ofono.c:extract_ipv4_settings() Interface wwan0
connmand[1537]: plugins/ofono.c:extract_ipv4_settings() index 35
connmand[1537]: plugins/ofono.c:extract_ipv4_settings() Method dhcp
connmand[1537]: plugins/ofono.c:context_changed() context_path /modem_0/context1
connmand[1537]: plugins/ofono.c:context_changed() /modem_0 Active 1
connmand[1537]: plugins/ofono.c:set_connected() /modem_0

whereas, for context 2 :

connmand[1341]: plugins/ofono.c:context_changed() context_path /modem_0/context2
connmand[1341]: plugins/ofono.c:context_changed() context_path /modem_0/context2


I am going to read/add debug in connman's code (plugin/ofono.c), I will post again if I find something.


Best regards,

Mylène

  reply	other threads:[~2014-12-05 12:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1862208886.28721645.1417597240490.JavaMail.root@openwide.fr>
2014-12-03 10:14 ` [help] connect 2 APN at the same time (PPP and QMI) Mylene Josserand
2014-12-03 23:48   ` Denis Kenzior
2014-12-04 15:34     ` Mylene Josserand
2014-12-04 16:26       ` Mylene Josserand
2014-12-04 16:56         ` Denis Kenzior
2014-12-05 12:38           ` Mylene Josserand [this message]
2014-12-05 13:34             ` Mylene Josserand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1677713536.28890660.1417783089563.JavaMail.root@openwide.fr \
    --to=mylene.josserand@openwide.fr \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.