Hi Vinothkumar,
On 07/14/2017 02:11 PM, Eswaran Vinothkumar (BEG/PJ-IOT-EL) wrote:
Hello,
I am currently working on an embedded project where we are using TELIT
910 EUG Modem chip. We are using Yocto as the build system.
Versions Used: Connman:1.34 and Ofono:1.20
To establish the internet connection I am using the python scripts
within the ofono/test directory as follows:
/usr/lib/ofono/test/enable-modem
/usr/lib/ofono/test/online-modem
/usr/lib/ofono/test/set-roaming-allowed
/usr/lib/ofono/test/register-auto
/usr/lib/ofono/test/enable-gprs
/usr/lib/ofono/test/create-internet-context web.vodafone.de vodafone
vodafone
/activate-context
/process-context-settings
After this I could see that the device gets the IP address, gateway and
nameserver as shown below,
ofono_start_gsm.sh[192]: Interface is wwan0
ofono_start_gsm.sh[192]: IP address is 10.249.29.20
ofono_start_gsm.sh[192]: Gateway is 10.249.29.21
ofono_start_gsm.sh[192]: Nameserver is 10.105.144.254
That looks good.
At this point I excepted Connman to connect to the internet but it
doesn’t. I am seeing the following error message from Connman:
Not really. With the test scripts above you have controlled oFono
directly. That means you have run it standalone. ConnMan should all
those steps you did with the scripts itself.
connmand[176]: Online check failed for 0x1ce7c80 Vodafone.
I think we need to figure out first why ConnMan doesn't drive oFono.
This might be an problem which be depended on the previous steps.
Also ping and wget didn’t work. The output of ip route and
/etc/resolv.conf are as follows:
route -n
Kernel IP routing table
Destination Gateway Genmask
Flags Metric Ref Use Iface
0.0.0.0 10.166.199.10 0.0.0.0
UG 0 0 0 wwan0
10.105.144.254 10.166.199.10 255.255.255.255
UGH 0 0 0 wwan0
10.166.199.8 0.0.0.0 255.255.255.252
U 0 0 0 wwan0
10.166.199.10 0.0.0.0 255.255.255.255
UH 0 0 0 wwan0
192.168.1.0 0.0.0.0 255.255.255.0
U 0 0 0 eth0
192.168.1.255 0.0.0.0 255.255.255.255
UH 0 0 0 eth0
It is hard to tell how this routing table came about without the logs.
If ConnMan is not controlling the modem, then the default gateway is not
added by ConnMan.
cat /etc/resolv-conf.connman
# Generated by Connection Manager
nameserver ::1
nameserver 127.0.0.1
These entries are there because ConnMan does provide a complete DNS
proxy. You can also disable it via the command line, please check the
documentation on the impact of this option.
The contents of ip route and resolv.conf looked strange for me. I
looked
into Connman documents and the mailing list discussions, it seems like
expected behavior from connman.
Yes, it's the DNS proxy settings.
As a test case, I manually started the DHCP client on wwan0. After
that
I could see that the device is connected to the internet. I checked
with ping and wget. Also have downloaded some files to test the internet
connection.
Okay, at least we know now it supposed to work :)
The output of ip route and /etc/resolv.conf are as follows:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags
Metric Ref Use Iface
0.0.0.0 10.166.250.1 0.0.0.0
UG 0 0 0 wwan0
10.166.250.0 0.0.0.0 255.255.255.240 U
0 0 0 wwan0
192.168.1.0 0.0.0.0 255.255.255.0
U 0 0 0 eth0
192.168.1.255 0.0.0.0 255.255.255.255 UH
0 0 0 eth0
cat /etc/resolv.conf
nameserver 10.105.16.254
nameserver 10.105.144.254
dhclient overwrites resolv.conf.
I have the following question. Is this the expected behavior?
If ConnMan doesn't steer oFono, I would say yes.
Do I need
to run dhclient or missing some configuration in Connman?
No, you don't need dhclient or any other standalone networking tools.
ConnMan has built in support for these setups.
I have read in
the mailing list that the connman has internet DHCP client and running
another might cause confusion.
Yes, it's basically the problem of a global resource (/etc/resolv.conf).
Only one entity should control this file. There are some use cases where
it makes sense to disable the DNS proxy and run your own DNS proxy. But
you should make this decision with proper consideration what the impact is.
After running connmanctl services I could see the connection is
listed
as AR (Ready state). I expected it to be in AO(online state)
*AR Wired ethernet_0001c01df20b_cable
*AR Vodafone cellular_204046850339628_context1
That is strange, it looks like ConnMan controls the modem. So that is
good. Hmm, so the first routing table is from ConnMan I suppose. It's a
bit hard to tell without the logs.
I tried disconnecting the service and connecting it back.
connmanctl disconnect cellular_204046850339628_context1 àsuccessfully
disconnects the connection
connmanctl connect cellular_204046850339628_context1 àagain the connman
fails with the message Online check failed for 0x1ce7c80 Vodafone.
Running dhclient manually again fixes this issue.
Okay, maybe we get the routing information from oFono wrong.
I am puzzled about the issue here. Let me know if you need some more
log
messages. Any help on the topic is appreciated.
Yes, the oFono logs and ConnMan logs would help. I suspect that we
somehow read the IP configuration from oFono wrong.
Thanks,
Daniel
ps: Please send plain text messages. Much appreciated.