Bug 2432

Summary: connman: 3g connection times out
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Darren Hart <dvhart>
Component: connectivityAssignee: Dongxiao Xu <dongxiao.xu>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: jiajun.xu, meta.mr.watcher, meta.watcher, yilongx.y.sun
Version: 1.2   
Target Milestone: 1.2.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Darren Hart 2012-05-07 22:22:48 UTC
Using test-connman (from the connman-tests package) to connect to a 3G network on the FRI2 fails with a timeout.

A bit of hardware context:

# lsusb | grep Eric
Bus 001 Device 002: ID 0bdb:190d Ericsson Business Mobile Networks BV 

# lsmod | grep cdc
cdc_wdm                 7329  0 
cdc_acm                14230  4 

And for connman:

# ./test-connman services
* Wired                      { ethernet_00b3386ee31d_cable }
  AT&T                       { cellular_310410469131422_context1 }

# ./test-connman connect cellular_310410469131422_context1
net.connman.Error.OperationTimeout: Operation timeout

# ./list-services | grep cellular -A 22
[ /net/connman/service/cellular_310410469131422_context1 ]
    Strength = 80
    Nameservers = [ ]
    State = failure
    Provider = { }
    Type = cellular
    Security = [ ]
    AutoConnect = false
    Immutable = false
    Proxy = { }
    Roaming = 0
    IPv4.Configuration = { Method=dhcp }
    IPv6.Configuration = { Method=auto Privacy=disabled }
    Name = AT&T
    Favorite = false
    Error = connect-failed
    Domains = [ ]
    Ethernet = { Method=auto }
    Nameservers.Configuration = [ ]
    Proxy.Configuration = { }
    Domains.Configuration = [ ]
    IPv4 = { }
    IPv6 = { }

t# dmesg | grep usb0
cdc_ncm 1-2:1.6: usb0: register 'cdc_ncm' at usb-0000:05:02.3-2, CDC NCM, 02:80:37:ec:02:00
ADDRCONF(NETDEV_UP): usb0: link is not ready
cdc_ncm: usb0: network connection: disconnected
cdc_ncm: usb0: 21 mbit/s downlink 5 mbit/s uplink
cdc_ncm: usb0: network connection: connected
ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
usb0: no IPv6 routers present
cdc_ncm: usb0: network connection: disconnected
ADDRCONF(NETDEV_UP): usb0: link is not ready
cdc_ncm: usb0: 21 mbit/s downlink 5 mbit/s uplink
cdc_ncm: usb0: network connection: connected
ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
usb0: no IPv6 routers present
cdc_ncm: usb0: network connection: disconnected
ADDRCONF(NETDEV_UP): usb0: link is not ready
Comment 1 Dongxiao Xu 2012-05-09 06:51:07 UTC
Hi Darren,

I tried it locally with 1.2 image for FRI2, and it works well in my side. You can follow the steps as:
(To do the steps, you need to install the ofono-test package.)

 - Make sure "connmand" and "ofonod" are running in the system.
 - Make sure the 3G modem device is installed. We can verify this step by the ofono's test program "list-modems".
 - Enable and online the 3G modem by running "enable-modem" and "online-modem"
 - Set the 3G connection context by running ofono's tool "create-internet-context". This includes the settings for ISP, AccessPointName, Protocol, etc.
 - Run the created 3G connection context by "activate-context". After this, the 3G network interface should be established.
 - Add DNS server address into /etc/resolv.conf, or use the default value.
 - Configure the address, netmask for the 3G network interface.
 - Verify the 3G connection by "ping www.intel.com" or other.

Thanks,
Dongxiao
Comment 2 Darren Hart 2012-05-09 15:26:59 UTC
I will try the commands you listed... but I don't see how these make the bug invalid. The bug was opened against connman, because as I understand it, the commands I listed should bring up the 3g connection. Regardless, please don't close a bug as invalid without giving the reported a chance to verify the proposed resolution.
Comment 3 Darren Hart 2012-05-09 18:01:53 UTC
Running through the commands in Comment #1 were successful up to the activate-context command which reported an error:

root@fri2:/usr/lib/ofono/test# ./enable-modem
Connecting modem /mbm_0...

root@fri2:/usr/lib/ofono/test# ./online-modem 
Setting modem /mbm_0 online...

root@fri2:/usr/lib/ofono/test# ./create-internet-context
Found context /mbm_0/context1

root@fri2:/usr/lib/ofono/test# ./activate-context 
Error activating /mbm_0/context1: org.ofono.Error.Failed: Operation failed

root@fri2:/usr/lib/ofono/test# ./list-modems 
[ /mbm_0 ]
    Features = gprs net cbs ussd gps sms stk rat sim 
    Emergency = 0
    Powered = 1
    Lockdown = 0
    Interfaces = org.ofono.ConnectionManager org.ofono.NetworkRegistration org.ofono.CellBroadcast org.ofono.SupplementaryServices org.ofono.LocationReporting org.ofono.SmartMessaging org.ofono.PushNotification org.ofono.MessageManager org.ofono.SimToolkit org.ofono.RadioSettings org.ofono.SimManager 
    Online = 1
    Model = F5521gw
    Revision = R2A07(R2A07)
    Type = hardware
    Serial = 356215040140315
    Manufacturer = Ericsson
    [ org.ofono.ConnectionManager ]
        Powered = 1
        Attached = 1
        Bearer = none
        Suspended = 0
        RoamingAllowed = 0
    [ org.ofono.NetworkRegistration ]
        Status = registered
        Strength = 80
        Name = AT&T
        LocationAreaCode = 33998
        Mode = auto-only
        MobileCountryCode = 310
        Technology = hspa
        CellId = 13805302
        MobileNetworkCode = 410
    [ org.ofono.CellBroadcast ]
        Topics = 
        Powered = 1
    [ org.ofono.SupplementaryServices ]
        State = idle
    [ org.ofono.LocationReporting ]
        Type = nmea
        Enabled = 0
    [ org.ofono.SmartMessaging ]
    [ org.ofono.PushNotification ]
    [ org.ofono.MessageManager ]
        Alphabet = default
        UseDeliveryReports = 0
        Bearer = cs-preferred
        ServiceCenterAddress = +13123149810
    [ org.ofono.SimToolkit ]
        IdleModeIcon = 
        MainMenuTitle = 
        MainMenu = 
        MainMenuIcon = 
    [ org.ofono.RadioSettings ]
        TechnologyPreference = any
    [ org.ofono.SimManager ]
        Retries = [pin2 = 3] [puk2 = 10] [pin = 3] [puk = 10] 
        MobileCountryCode = 310
        FixedDialing = 0
        SubscriberNumbers = 
        PreferredLanguages = en 
        BarredDialing = 0
        CardIdentifier = 89014104254691314226
        LockedPins = 
        MobileNetworkCode = 410
        SubscriberIdentity = 310410469131422
        Present = 1
        PinRequired = none


While I didn't expect it to work, at this point I reran the connman commands:

root@fri2:/usr/lib/connman/test# ./test-connman services            
* Wired                      { ethernet_00b3386ee31d_cable }
  AT&T                       { cellular_310410469131422_context1 }


root@fri2:/usr/lib/connman/test# ./list-services | grep cellular -A 22
[ /net/connman/service/cellular_310410469131422_context1 ]
    IPv6.Configuration = { Method=auto Privacy=disabled }
    AutoConnect = false
    Strength = 80
    Name = AT&T
    Nameservers = [ ]
    Proxy.Configuration = { }
    Provider = { }
    Favorite = false
    Domains.Configuration = [ ]
    State = idle
    Proxy = { }
    Nameservers.Configuration = [ ]
    IPv4 = { }
    IPv6 = { }
    Domains = [ ]
    Ethernet = { Method=auto }
    Security = [ ]
    IPv4.Configuration = { Method=dhcp }
    Type = cellular
    Immutable = false
    Roaming = 0

root@fri2:/usr/lib/connman/test# ./test-connman connect cellular_310410469131422_context1
net.connman.Error.Failed: Input/output error

Note the final Input/output error instead of the timeout.

So I see two potential issues:

1) ofono tests are not able to establish a connection
2) connman and ofono do not appear to be working together properly
Comment 4 Dongxiao Xu 2012-05-10 00:15:21 UTC
What's the commit/branch are you using to test connman 3g feature?
Comment 5 Darren Hart 2012-05-10 06:27:50 UTC
poky: denzil
meta-intel: local fri2 branch
Comment 6 Darren Hart 2012-05-10 06:30:28 UTC
Note that later today I was able to acquire an IP address on the 3g modem using just ofono-tests. DNS lookup was working. wget and ssh would report "Connection Refused" and ping would just sit there. I've sent a note to the ofono list on this subject.
Comment 7 Dongxiao Xu 2012-05-11 07:14:24 UTC
Yilong, could you help to have a try on this one? I have some steps posted in previous comments.
Comment 8 yilong, sun 2012-05-14 08:07:22 UTC
I have tried 3G network on the FRI2 according to [Comment 1] steps. it works well.
i can ping [www.sina.com] by Ethernet or 3G network.

test environment:
Tree/Branch: poky/denzil
Commit: 3bf8069100e54153d13319dc32ca089327b6a139
Meta-intel: Master
Commit: f89405e115d73426c8a6450b6e795b5885d6bdf3

test tools: ofono-tests-1.5-r1.core2.rpm
Comment 9 Darren Hart 2012-05-14 16:03:19 UTC
It appears the trouble I am having here has been to do with using a WAP-only SIM and some necessary configuration. I will close this as not-a-bug. We still need to get connman-gnome to work though.

As you appear to have a functional 3G SIM. Can you check if connman-gnome lists the 3G interface and if it can bring it up successfully? If there are some specific steps that were necessary, can you please write those up so I can include them in the FRI2 BSP README?

Thanks!
Comment 10 Dongxiao Xu 2012-05-15 01:03:25 UTC
Currently the 3G configuration is not functional in connman-gnome, and I think Paul will look at it since he re-wrote the connman-gnome due to API update.
Comment 11 Dongxiao Xu 2012-05-21 07:16:39 UTC
Darren, could you help to close the bug? Or you need bug asigner to close it?
Comment 12 Darren Hart 2012-05-24 20:04:54 UTC
Chalking this one up to user error (or possibly lack of documentation regarding using 3G modems with ofono and connman).