On 10/26/2017 05:57 PM, Eswaran Vinothkumar (BEG/PJ-IOT-EL) wrote:
I am using Connman and oFono to establish the internet connection.
Versions used: Connman:1.35
Modem device: Sierra MC7455
To establish the internet connection at system startup, I am running a
shell script which calls the scripts within the test directory of /ofono
./create-internet-context web.vodafone.de vodafone vodafone
With this setting, I could connect to the internet. I have a check
before running each scripts whether the previous step is successful or not.
I have some questions regarding the autoconnect feature of Connman. I
looked into the source file of ofono plugin. If I understood correctly,
connman tries to activate the context if the modem is in online state,
registered to the network and GPRS is attached. I am running the script
I had mentioned above everytime on boot up, is it really required when
autoconnect feature is enabled in Connman?
No, ConnMan is suppose to do that for you. If not, then we have a bug
I enabled the debug logs of connman and I could see that connman
to connect to cellular network when it gets the notification from ofono
regarding the GPRS activation. This initially looked like I still need
to activate the modem by running the scripts:
If I enable the cellular technology 'connmanctl enable cellular',
connman takes care of this setting also. Is this correct?
Yes, that should do the trick.
May I know is there any issue in running the script at start up
Connman does exactly the same. Looks like reduntant but I have seen some
issues with network registration of my modem, it takes a few minutes
before my modem gets connected to network. Is there any timeout
implemented in connman, after which it stops trying to autoconnect?
It could be that ConnMan gets slightly confused if you run the script in
parallel. Though we added a bunch of checks in the plugin I have never
tested it this way.
IIRC, when you enable the cellular technology, the plugin just will just
tell oFono to enable the modem and then from this point on it event
driven. Check oFono's log what is happening. It sounds like a problem
with the modem.
Also during system reboot, I see following error messages from
while connecting to internet:
/sierra_0 path /sierra_0/context1 org.ofono.ConnectionContext.Active
connmand: Failed to change property: /sierra_0/context1
org.ofono.ConnectionContext.Active: org.ofono.Error.InProgress Operation
already in progress
This could be the result of ConnMan and the script trying to enable the
modem at the same time (operation in progress).
This happens randomly not all the time. ofono fails to activate the
internet context and connman tries to activate it again. This loops
around and after sometime the device fails to connect to the internet.
Is there any way to restart the autoconnect after sometime if connection
IIRC, ConnMan does only one autoconnect attempt. There is comment in
plugin which says, that oFono will try a few time until it gives up.
What you can do is to tell the service to connect again, basically you
do an autoconnect by repeating telling ConnMan to go connect. At least
this should work for the time being. We had some discussion in the past
on the autoconnect behavior for WiFi. It looks like the current
autoconnect algorithm is not good enough.