multiple APN contexts activation failure
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
Hi Raj,
Quoted 5 lines · On Thu, Jun 24, 2021 at 12:56:06PM +0000, Athimoolam Rajkumar (XC-CI1/ECP1)…
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?
Hi Daniel,
Quoted 10 lines
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
Quoted 3 lines · On Fri, Jul 02, 2021 at 10:16:24AM +0000, Athimoolam Rajkumar (XC-CI1/ECP1)…
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").
Quoted 2 lines
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 :)