All of lore.kernel.org
 help / color / mirror / Atom feed
* multiple APN contexts activation failure
@ 2021-06-24 12:56 Athimoolam Rajkumar (XC-CI1/ECP1)
  2021-07-02  8:03 ` Daniel Wagner
  0 siblings, 1 reply; 4+ messages in thread
From: Athimoolam Rajkumar (XC-CI1/ECP1) @ 2021-06-24 12:56 UTC (permalink / raw)
  To: connman

Hi,

I was trying to activate multiple cellular contexts with Connman ( Due to requirement to connect multiple APNs using the same SIM ).
It was possible directly calling the ofono APIs, but via Connman it was not possible.

The available 3 APN contexts are listed as 3 different cellular context services correctly, but when I try to connect to second cellular service, the previous connected cellular service is disconnected.
On looking at the logs and code, looks like it was due to calling of __connman_device_disconnect(network->device) function inside __connman_network_connect in network.c

I am wondering why the different networks/APN contexts of the same modem device has to be disconnected instead of moving to "ready state" before initiating the connection to the new network/APN context.
Is it then not possible at all to have multiple APN contexts activated via Connman?


Regards,
Raj 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: multiple APN contexts activation failure
  2021-06-24 12:56 multiple APN contexts activation failure Athimoolam Rajkumar (XC-CI1/ECP1)
@ 2021-07-02  8:03 ` Daniel Wagner
  2021-07-02 10:16   ` Athimoolam Rajkumar (XC-CI1/ECP1)
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Wagner @ 2021-07-02  8:03 UTC (permalink / raw)
  To: Athimoolam Rajkumar (XC-CI1/ECP1); +Cc: connman

Hi Raj,

On Thu, Jun 24, 2021 at 12:56:06PM +0000, Athimoolam Rajkumar (XC-CI1/ECP1) wrote:
> I am wondering why the different networks/APN contexts of the same
> modem device has to be disconnected instead of moving to "ready state"
> before initiating the connection to the new network/APN context.  Is
> it then not possible at all to have multiple APN contexts activated
> via Connman?

It's been a while since I looked at the ofono plugin, but this sounds
like a bug to me. I didn't see any special logic in the plugin from a
quick glance. The plugin should expose per context a new network object
which is independent from the core's perspective.

Hmm, what are you main.conf settings? Do you happen to do have

  SingleConnectedTechnology = true

set?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: multiple APN contexts activation failure
  2021-07-02  8:03 ` Daniel Wagner
@ 2021-07-02 10:16   ` Athimoolam Rajkumar (XC-CI1/ECP1)
  2021-07-02 13:11     ` Daniel Wagner
  0 siblings, 1 reply; 4+ messages in thread
From: Athimoolam Rajkumar (XC-CI1/ECP1) @ 2021-07-02 10:16 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: connman

Hi Daniel,

> It's been a while since I looked at the ofono plugin, but this sounds like a bug to
> me. I didn't see any special logic in the plugin from a quick glance. The plugin
> should expose per context a new network object which is independent from the
> core's perspective.
> 
> Hmm, what are you main.conf settings? Do you happen to do have
> 
>   SingleConnectedTechnology = true
> 
> set?

SingleConnectedTechnology is set to False in main.conf.
I don't see a problem with ofono plugin as like you explained, new network object is created per context.
All the network object belongs to same modem device and hence while connecting to second APN/network the previous one is disconnected via call to __connman_device_disconnect(network->device);

May be separate setting needed to allow multiple networks of same device to be connected at the same time 


Regards,
Raj

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: multiple APN contexts activation failure
  2021-07-02 10:16   ` Athimoolam Rajkumar (XC-CI1/ECP1)
@ 2021-07-02 13:11     ` Daniel Wagner
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Wagner @ 2021-07-02 13:11 UTC (permalink / raw)
  To: Athimoolam Rajkumar (XC-CI1/ECP1); +Cc: connman

On Fri, Jul 02, 2021 at 10:16:24AM +0000, Athimoolam Rajkumar (XC-CI1/ECP1) wrote:
> All the network object belongs to same modem device and hence while
> connecting to second APN/network the previous one is disconnected via
> call to __connman_device_disconnect(network->device);

So there is only one __connman_device_disconnect() and this was added
via 3b6dd9aa9030 ("Add support for disconnecting networks first").

> May be separate setting needed to allow multiple networks of same
> device to be connected at the same time

Hmm, it might be that we have here an artifact. The original commit did
the following:

+		mode = connman_device_get_mode(network->device);
+		if (mode == CONNMAN_DEVICE_MODE_NETWORK_SINGLE)
+			__connman_device_disconnect(network->device);

and eventually the mode stuff got dropped but the disconnect stayed.  So
we might just want to drop it. Though this needs some testing first :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-02 13:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 12:56 multiple APN contexts activation failure Athimoolam Rajkumar (XC-CI1/ECP1)
2021-07-02  8:03 ` Daniel Wagner
2021-07-02 10:16   ` Athimoolam Rajkumar (XC-CI1/ECP1)
2021-07-02 13:11     ` Daniel Wagner

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.