Skip to contentSkip to conversation

ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused)

DISCUSSION Denis Kenzior 3 participants 8 messages May 10, 2012 – May 11, 2012 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi Darren,

Quoted 4 lines · Darren Hart

I have successfully used ofono-tests to enable,online,activate,and create-internet-context. I have an IP address and added the opendns servers. DNS appears to be working and the route looks sane-ish.

Please keep in mind that oFono is only signaling settings to an external component (e.g. a connection manager like ConnMan). So route assignment, DNS entry assignment, etc are not done by oFono. oFono only brings up the interface and assigns the local IPv4 address.

Quoted 7 lines

However, ping, wget, and ssh all fail. ping just sits there, wget and ssh both fail with Connection Refused.

Is there something obvious/common I might be running into?

I'm using ofono 1.5. The steps I took for context follow:

Quoted 8 lines
# ./enable-modem
Connecting modem /mbm_0...
# ./online-modem
Setting modem /mbm_0 online...
# ./activate-context

These steps are fine, is your context pre-configured already? What does the output of list-contexts look like?

Quoted 3 lines
# ./create-internet-context
Found context /mbm_0/context1

Generally you do this _before_ activate_context and you give parameters for the context settings. e.g. create-internet-context "apn.operator.com" "username" "password"

Quoted 9 lines
# ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 02:80:37:EC:02:00
          inet addr:10.25.40.80  Bcast:10.25.40.95  Mask:255.255.255.224
          inet6 addr: fe80::80:37ff:feec:200/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:846 (846.0 B)  TX bytes:28270 (27.6 KiB)

That looks good.

Quoted 7 lines
# cat /etc/resolv.conf 
# Generated by Connection Manager
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 127.0.0.1
Quoted 8 lines
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.25.40.66     0.0.0.0         UG    0      0        0 usb0
10.25.40.64     0.0.0.0         255.255.255.224 U     0      0        0 usb0
10.25.40.66     0.0.0.0         255.255.255.255 UH    0      0        0 usb0
172.18.7.170    10.25.40.66     255.255.255.255 UGH   0      0        0 usb0

The route assignment seems fine, I assume you're using connman?

Quoted 41 lines
# ping dvhart.com                                     
PING dvhart.com (184.154.165.98): 56 data bytes                                    
^C                                                                                 
--- dvhart.com ping statistics ---                                                 
1 packets transmitted, 0 packets received, 100% packet loss          
# wget http://www.dvhart.com/darren/hello             
Connecting to www.dvhart.com (184.154.165.98:80)                                   
wget: can't connect to remote host (184.154.165.98): Connection refused
# ssh dvhart(a)dvhart.com                               
ssh: Exited: Error connecting: Connection refused

After disabling usb0 and bringup eth0, all of the above commands work as expected.

And finally, I saved the output of list-modems off, but I don't recall when in the process, but I'm including it for the modem information, etc:

# ./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
Quoted 8 lines
        Strength = 80
        Name = AT&T
        LocationAreaCode = 33998
        Mode = auto-only
        MobileCountryCode = 310
        Technology = hspa
        CellId = 13805302
        MobileNetworkCode = 410

I see you're on AT&T. What APN are you using, the WAP-only APN or something that allows actual internet connections?

Quoted 27 lines

[ 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 =

Quoted 9 lines

PreferredLanguages = en
BarredDialing = 0
CardIdentifier = 89014104254691314226
LockedPins =
MobileNetworkCode = 410
SubscriberIdentity = 310410469131422
Present = 1
PinRequired = none

This looks sane?

Regards,
-Denis

#2 lore raw
Quoted 8 lines · Denis Kenzior

Hi Darren,

Quoted 4 lines · Darren Hart

I have successfully used ofono-tests to enable,online,activate,and create-internet-context. I have an IP address and added the opendns servers. DNS appears to be working and the route looks sane-ish.

Quoted 4 lines

Please keep in mind that oFono is only signaling settings to an external component (e.g. a connection manager like ConnMan). So route assignment, DNS entry assignment, etc are not done by oFono. oFono only brings up the interface and assigns the local IPv4 address.

I should have clarified this a bit. I'm putting together a Board Support Package (BSP) for the Yocto Project. This involves a kernel config, sometimes some kernel patches, and listing a set of packages to be installed.

I have ofono ofono-tests connman and connman-tests. I tried the connman-gnome UI, but the 3G modem doesn't appear in the UI. I tried the connman-tests tools which does list the modem in services, but the connect command times out. I then tried the ofono-tests scripts as described below. The system obtained the IP address after the create-internet-context command. As far as I know, connman was not involved (the 3g connection didn't appear in the connman-gnome UI afterward).

Quoted 11 lines
Quoted 11 lines

However, ping, wget, and ssh all fail. ping just sits there, wget and ssh both fail with Connection Refused.

Is there something obvious/common I might be running into?

I'm using ofono 1.5. The steps I took for context follow:

# ./enable-modem
Connecting modem /mbm_0...
Quoted 8 lines
Quoted 5 lines
# ./online-modem
Setting modem /mbm_0 online...
# ./activate-context

These steps are fine, is your context pre-configured already? What does the output of list-contexts look like?

How can I tell? Is there some permanent state that gets recorded after I've run through the above once?

After a reboot, I see the following:

$ ./list-contexts
[ /mbm_0 ]
Quoted 8 lines
Quoted 4 lines
# ./create-internet-context
Found context /mbm_0/context1

Generally you do this _before_ activate_context and you give parameters for the context settings. e.g. create-internet-context "apn.operator.com" "username" "password"

OK. I'm new to setting up 3G connectivity. I'm using a prepaid AT&T go phone sim card. I have successfully sent and received SMS messages from the device without having to setup any kind of pin or other authentication credentials. Are these credentials always required - even with SIM cards? If so, how do I go about discovering what they would be?

If I'm understanding this correctly, there exists one context for the mbm_0 modem after I ran create-internet-context, and it is no longer necessary to run create-internet-context again (assuming it was created correctly).

Quoted 11 lines
Quoted 10 lines
# ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 02:80:37:EC:02:00
          inet addr:10.25.40.80  Bcast:10.25.40.95  Mask:255.255.255.224
          inet6 addr: fe80::80:37ff:feec:200/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:846 (846.0 B)  TX bytes:28270 (27.6 KiB)
Quoted 1 line

That looks good.

To test the connman interaction, I disabled connman and setup an entry in /etc/network/interfaces:

iface usb0 inet dhcp

I then ran "ifup usb0". I got an IP address the route and resolv.conf were updated automatically. This time there was no inet6 addr. ping, wget, and ssh are still behaving the same though.

...

Quoted 30 lines
Quoted 21 lines
# ./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
Quoted 8 lines
        Strength = 80
        Name = AT&T
        LocationAreaCode = 33998
        Mode = auto-only
        MobileCountryCode = 310
        Technology = hspa
        CellId = 13805302
        MobileNetworkCode = 410
Quoted 2 lines

I see you're on AT&T. What APN are you using, the WAP-only APN or something that allows actual internet connections?

This makes it clear to me that I have some research to do. I don't know what those terms mean, and certainly don't know which APN I am using (or should be using). I haven't specified one intentionally. Any tips on how I can determine this?

Quoted 38 lines
Quoted 28 lines

[ 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 =

Quoted 9 lines

PreferredLanguages = en
BarredDialing = 0
CardIdentifier = 89014104254691314226
LockedPins =
MobileNetworkCode = 410
SubscriberIdentity = 310410469131422
Present = 1
PinRequired = none

Quoted 1 line

This looks sane?

Does the '?' imply that there is something clearly wrong with this listing?

Thanks,

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#3 lore raw

Hi Darren,

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines

However, ping, wget, and ssh all fail. ping just sits there, wget and ssh both fail with Connection Refused.

Is there something obvious/common I might be running into?

I'm using ofono 1.5. The steps I took for context follow:

# ./enable-modem
Connecting modem /mbm_0...
Quoted 8 lines
Quoted 5 lines
# ./online-modem
Setting modem /mbm_0 online...
# ./activate-context

These steps are fine, is your context pre-configured already? What does the output of list-contexts look like?

Quoted 8 lines

How can I tell? Is there some permanent state that gets recorded after I've run through the above once?

After a reboot, I see the following:

$ ./list-contexts
[ /mbm_0 ]

This means there are no contexts. For MBM they show up after you run online-modem.

Assuming a brand new, virgin device, oFono runs context provisioning using mobile-broadband-provider-info. If you are lucky, the context will be configured automagically and the list-contexts output will look something like this:

denkenz(a)localhost ~/ofono-master $ test/list-contexts [ /mbm_0 ]
[ /mbm_0/context1 ]
Username =
Protocol = ip
Name = Internet
Settings = { }
IPv6.Settings = { }
Active = 0
AccessPointName = wap.cingular Password =
Type = internet

The settings are then persisted in /var/lib/ofono/<your sim card's imsi>

If provisioning fails, oFono creates a default, empty context. It can be recognized by an empty APN. In theory activating an empty APN should fail.

You then need to use create-internet-context to set the settings manually. For AT&T the WAP-only APN is wap.cingular, and the data APN is isp.cingular I believe.

Quoted 11 lines
Quoted 10 lines
Quoted 6 lines


# ./create-internet-context
Found context /mbm_0/context1

Generally you do this _before_ activate_context and you give parameters for the context settings. e.g. create-internet-context "apn.operator.com" "username" "password"

Quoted 6 lines

OK. I'm new to setting up 3G connectivity. I'm using a prepaid AT&T go phone sim card. I have successfully sent and received SMS messages from the device without having to setup any kind of pin or other authentication credentials. Are these credentials always required - even with SIM cards? If so, how do I go about discovering what they would be?

The SIM PIN credentials are separate from GPRS context credentials. Essentially the SIM PIN locks the SIM card, so the modem cannot read what is on it until the PIN is entered. Once the access to the SIM card is allowed, we can 'dial up' to the network. Think of the APN details as old style dial-up modem credentials. E.g. APN is the phone number, and the username and password are self-explanatory.

Quoted 5 lines

If I'm understanding this correctly, there exists one context for the mbm_0 modem after I ran create-internet-context, and it is no longer necessary to run create-internet-context again (assuming it was created correctly).

Correct, oFono persists the information in /var/lib/ofono. You only need to run create-internet-context if your settings are wrong.

Quoted 16 lines
Quoted 11 lines
Quoted 10 lines
# ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 02:80:37:EC:02:00
          inet addr:10.25.40.80  Bcast:10.25.40.95  Mask:255.255.255.224
          inet6 addr: fe80::80:37ff:feec:200/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:846 (846.0 B)  TX bytes:28270 (27.6 KiB)
Quoted 1 line

That looks good.

To test the connman interaction, I disabled connman and setup an entry in /etc/network/interfaces:

Quoted 8 lines

iface usb0 inet dhcp

I then ran "ifup usb0". I got an IP address the route and resolv.conf were updated automatically. This time there was no inet6 addr. ping, wget, and ssh are still behaving the same though.

...

This all sounds correct. Btw, you can also use test/process-context-settings to do the above. It should even do the DHCP / static assignment correctly.

Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
# ./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
Quoted 8 lines
Quoted 2 lines

I see you're on AT&T. What APN are you using, the WAP-only APN or something that allows actual internet connections?

This makes it clear to me that I have some research to do. I don't know what those terms mean, and certainly don't know which APN I am using (or should be using). I haven't specified one intentionally. Any tips on how I can determine this?

If you are using an AT&T GoPhone SIM then likely you're limited to WAP-only network, not a real internet connection. The easy way to tell is to run

test/create-internet-context "isp.cingular"

And then try to activate the context.

Quoted 38 lines
Quoted 38 lines
Quoted 37 lines

[ 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

Quoted 4 lines
Quoted 1 line

This looks sane?

Does the '?' imply that there is something clearly wrong with this listing?

Nah, it all looks good.

Regards,
-Denis

#4 lore raw
Quoted 38 lines · Denis Kenzior

Hi Darren,

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines

However, ping, wget, and ssh all fail. ping just sits there, wget and ssh both fail with Connection Refused.

Is there something obvious/common I might be running into?

I'm using ofono 1.5. The steps I took for context follow:

# ./enable-modem
Connecting modem /mbm_0...
Quoted 8 lines
Quoted 5 lines
# ./online-modem
Setting modem /mbm_0 online...
# ./activate-context

These steps are fine, is your context pre-configured already? What does the output of list-contexts look like?

Quoted 8 lines

How can I tell? Is there some permanent state that gets recorded after I've run through the above once?

After a reboot, I see the following:

$ ./list-contexts
[ /mbm_0 ]

This means there are no contexts. For MBM they show up after you run online-modem.

Assuming a brand new, virgin device, oFono runs context provisioning using mobile-broadband-provider-info. If you are lucky, the context will be configured automagically and the list-contexts output will look something like this:

Quoted 12 lines

denkenz(a)localhost ~/ofono-master $ test/list-contexts [ /mbm_0 ]
[ /mbm_0/context1 ]
Username =
Protocol = ip
Name = Internet
Settings = { }
IPv6.Settings = { }
Active = 0
AccessPointName = wap.cingular Password =
Type = internet

In my case, AccessPointName is empty.

Quoted 2 lines

The settings are then persisted in /var/lib/ofono/<your sim card's imsi>

# cat /var/lib/ofono/310410469131422/gprs

[Settings]
Powered=true
RoamingAllowed=false

[context1]
Name=Internet
AccessPointName=
Username=
Password=
Type=internet
Protocol=ip

Quoted 9 lines

If provisioning fails, oFono creates a default, empty context. It can be recognized by an empty APN. In theory activating an empty APN should fail.

You then need to use create-internet-context to set the settings manually. For AT&T the WAP-only APN is wap.cingular, and the data APN is isp.cingular I believe.

OK:

# ./create-internet-context isp.cingular
Found context /mbm_1/context1
Setting APN to isp.cingular
root(a)fri2:/usr/lib/ofono/test# cat /var/lib/ofono/310410469131422/gprs

[Settings]
Powered=true
RoamingAllowed=false

[context1]
Name=Internet
AccessPointName=isp.cingular
Username=
Password=
Type=internet
Protocol=ip

# ./activate-context
Error activating /mbm_1/context1: org.ofono.Error.Failed: Operation failed

I don't know why the modem is now mbm_1 instead of mbm_0...

Quoted 102 lines
Quoted 11 lines
Quoted 10 lines
Quoted 6 lines


# ./create-internet-context
Found context /mbm_0/context1

Generally you do this _before_ activate_context and you give parameters for the context settings. e.g. create-internet-context "apn.operator.com" "username" "password"

Quoted 6 lines

OK. I'm new to setting up 3G connectivity. I'm using a prepaid AT&T go phone sim card. I have successfully sent and received SMS messages from the device without having to setup any kind of pin or other authentication credentials. Are these credentials always required - even with SIM cards? If so, how do I go about discovering what they would be?

The SIM PIN credentials are separate from GPRS context credentials. Essentially the SIM PIN locks the SIM card, so the modem cannot read what is on it until the PIN is entered. Once the access to the SIM card is allowed, we can 'dial up' to the network. Think of the APN details as old style dial-up modem credentials. E.g. APN is the phone number, and the username and password are self-explanatory.

Quoted 5 lines

If I'm understanding this correctly, there exists one context for the mbm_0 modem after I ran create-internet-context, and it is no longer necessary to run create-internet-context again (assuming it was created correctly).

Correct, oFono persists the information in /var/lib/ofono. You only need to run create-internet-context if your settings are wrong.

Quoted 16 lines
Quoted 11 lines
Quoted 10 lines
# ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 02:80:37:EC:02:00
          inet addr:10.25.40.80  Bcast:10.25.40.95  Mask:255.255.255.224
          inet6 addr: fe80::80:37ff:feec:200/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:846 (846.0 B)  TX bytes:28270 (27.6 KiB)
Quoted 1 line

That looks good.

To test the connman interaction, I disabled connman and setup an entry in /etc/network/interfaces:

Quoted 8 lines

iface usb0 inet dhcp

I then ran "ifup usb0". I got an IP address the route and resolv.conf were updated automatically. This time there was no inet6 addr. ping, wget, and ssh are still behaving the same though.

...

This all sounds correct. Btw, you can also use test/process-context-settings to do the above. It should even do the DHCP / static assignment correctly.

Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
# ./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
Quoted 8 lines
Quoted 2 lines

I see you're on AT&T. What APN are you using, the WAP-only APN or something that allows actual internet connections?

This makes it clear to me that I have some research to do. I don't know what those terms mean, and certainly don't know which APN I am using (or should be using). I haven't specified one intentionally. Any tips on how I can determine this?

Quoted 7 lines

If you are using an AT&T GoPhone SIM then likely you're limited to WAP-only network, not a real internet connection. The easy way to tell is to run

test/create-internet-context "isp.cingular"

And then try to activate the context.

See above.

Also, I'm trying to look up the distinction between WAP-only and Full GPRS:

http://en.wikipedia.org/wiki/General_Packet_Radio_Service
http://en.wikipedia.org/wiki/Wireless_Application_Protocol

This suggests to me that this SIM can only do WAP and not IP, which explains why my wget, ssh, and ping tests fail. I'm confused why I'm then able to get a an inet and an inet6 address though, and DNS appears to work.

So, is there a typical way to verify that WAP is at least working?

Should I update the context Protocol to "wap" instead of "ip" ?

Finally, if the Go Phone SIM is WAP-only, what do I need for a "Full GPRS" SIM?

Thanks,

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#5 lore raw

Hi Darren,

<snip>

Quoted 4 lines

In my case, AccessPointName is empty.

Then provisioning failed.

Quoted 9 lines
Quoted 2 lines

The settings are then persisted in /var/lib/ofono/<your sim card's imsi>

# cat /var/lib/ofono/310410469131422/gprs

[Settings]
Powered=true
RoamingAllowed=false

Quoted 9 lines

[context1]
Name=Internet
AccessPointName=
Username=
Password=
Type=internet
Protocol=ip

And this is why the context is not shown in ConnMan's list of available services. ConnMan ignores contexts with empty APNs as invalid.

Quoted 32 lines
Quoted 9 lines

If provisioning fails, oFono creates a default, empty context. It can be recognized by an empty APN. In theory activating an empty APN should fail.

You then need to use create-internet-context to set the settings manually. For AT&T the WAP-only APN is wap.cingular, and the data APN is isp.cingular I believe.

OK:

# ./create-internet-context isp.cingular
Found context /mbm_1/context1
Setting APN to isp.cingular
root(a)fri2:/usr/lib/ofono/test# cat /var/lib/ofono/310410469131422/gprs

[Settings]
Powered=true
RoamingAllowed=false

[context1]
Name=Internet
AccessPointName=isp.cingular
Username=
Password=
Type=internet
Protocol=ip

Quoted 2 lines
# ./activate-context
Error activating /mbm_1/context1: org.ofono.Error.Failed: Operation failed

Yep, looks like this pre-paid account is configured with access to the APN with WAP based services only.

Quoted 3 lines

I don't know why the modem is now mbm_1 instead of mbm_0...

Have you pulled it out and re-inserted? In general oFono does not have a facility to persist the hardware ids unless the hardware exports its serial number to udev. I'm guessing this hardware does not.

<snip>

Quoted 18 lines
Quoted 6 lines
Quoted 5 lines

This makes it clear to me that I have some research to do. I don't know what those terms mean, and certainly don't know which APN I am using (or should be using). I haven't specified one intentionally. Any tips on how I can determine this?

Quoted 7 lines

If you are using an AT&T GoPhone SIM then likely you're limited to WAP-only network, not a real internet connection. The easy way to tell is to run

test/create-internet-context "isp.cingular"

And then try to activate the context.

See above.

Also, I'm trying to look up the distinction between WAP-only and Full GPRS:

Quoted 8 lines

http://en.wikipedia.org/wiki/General_Packet_Radio_Service
http://en.wikipedia.org/wiki/Wireless_Application_Protocol

This suggests to me that this SIM can only do WAP and not IP, which explains why my wget, ssh, and ping tests fail. I'm confused why I'm then able to get a an inet and an inet6 address though, and DNS appears to work.

Sorry I confused you. While WAP does provide a replacement to IP, no one ended up using it in the end. Carriers run WAP services over HTTP but with a weird compressed binary format. Generally the only thing you can reach from the "wap.cingular" APN is the WAP gateway IP and/or the MMSC (for MMS, aka picture messaging) gateway IP. The contexts are still some form of IP.

Quoted 2 lines

So, is there a typical way to verify that WAP is at least working?

ping the wap gateway, assuming you can find its IP on Google somewhere.

Quoted 1 line

Should I update the context Protocol to "wap" instead of "ip" ?

Nope, the Protocol setting is correct. Carriers can choose to run different services on different APNs (e.g. for billing or traffic counting purposes). Hence you can have an 'internet' APN, an mms-only APN, a wap-only APN, everything and the kitchen sink APN. Sometimes you might even have a VPN-to-your-employer APN, etc.

The operator can set up different billing structures for each APN, e.g. bill MMS by the number of messages, not bytes.

Quoted 3 lines

Finally, if the Go Phone SIM is WAP-only, what do I need for a "Full GPRS" SIM?

I don't know how AT&T structures their pre-paid plans these days. I believe you had to buy another package for $20 or so to add internet capability to pre-paid SIMs. You can also check out what T-Mobile is doing for pre-paid data.

Alternatively just borrow an iPhone of someone nearby ;)

Regards,
-Denis

#6 lore raw
In reply to Darren Hart
Quoted 98 lines · Darren Hart
Quoted 38 lines · Denis Kenzior

Hi Darren,

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines

However, ping, wget, and ssh all fail. ping just sits there, wget and ssh both fail with Connection Refused.

Is there something obvious/common I might be running into?

I'm using ofono 1.5. The steps I took for context follow:

# ./enable-modem
Connecting modem /mbm_0...
Quoted 8 lines
Quoted 5 lines
# ./online-modem
Setting modem /mbm_0 online...
# ./activate-context

These steps are fine, is your context pre-configured already? What does the output of list-contexts look like?

Quoted 8 lines

How can I tell? Is there some permanent state that gets recorded after I've run through the above once?

After a reboot, I see the following:

$ ./list-contexts
[ /mbm_0 ]

This means there are no contexts. For MBM they show up after you run online-modem.

Assuming a brand new, virgin device, oFono runs context provisioning using mobile-broadband-provider-info. If you are lucky, the context will be configured automagically and the list-contexts output will look something like this:

Quoted 12 lines

denkenz(a)localhost ~/ofono-master $ test/list-contexts [ /mbm_0 ]
[ /mbm_0/context1 ]
Username =
Protocol = ip
Name = Internet
Settings = { }
IPv6.Settings = { }
Active = 0
AccessPointName = wap.cingular Password =
Type = internet

In my case, AccessPointName is empty.

Quoted 2 lines

The settings are then persisted in /var/lib/ofono/<your sim card's imsi>

# cat /var/lib/ofono/310410469131422/gprs

[Settings]
Powered=true
RoamingAllowed=false

[context1]
Name=Internet
AccessPointName=
Username=
Password=
Type=internet
Protocol=ip

Quoted 9 lines

If provisioning fails, oFono creates a default, empty context. It can be recognized by an empty APN. In theory activating an empty APN should fail.

You then need to use create-internet-context to set the settings manually. For AT&T the WAP-only APN is wap.cingular, and the data APN is isp.cingular I believe.

OK:

# ./create-internet-context isp.cingular
Found context /mbm_1/context1
Setting APN to isp.cingular
root(a)fri2:/usr/lib/ofono/test# cat /var/lib/ofono/310410469131422/gprs

[Settings]
Powered=true
RoamingAllowed=false

Quoted 8 lines

[context1]
Name=Internet
AccessPointName=isp.cingular
Username=
Password=
Type=internet
Protocol=ip

Per some random set of instructions I found on the intertubes:

http://www.unlockit.co.nz/unlockit/?p=587

I've updated the context:

AccessPointName=wap.cingular
Username=WAP(a)CINGULARGPRS.COM
Password=CINGULAR1

I still get an IP address via DHCP and name resolution is working, but my ping,wget,ssh tests fail.

A colleague allowed me to bottow his AT&T phone. I used this SIM card and he had the same APN and Username entered in the phone (assuming same password, wasn't visible and he didn't want me to change it just in case :-). His phone reported an "EDGE" connection and successfully, albeit SLOWLY, displayed web pages.

So this suggests to me that the SIM can do IP and not just WAP. However, it says EDGE (2G?), does ofono support EDGE? I am I off in the weeds now?

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#7 lore raw

Hi Darren,

<snip>

Quoted 9 lines

I've updated the context:

AccessPointName=wap.cingular
Username=WAP(a)CINGULARGPRS.COM
Password=CINGULAR1

I still get an IP address via DHCP and name resolution is working, but my ping,wget,ssh tests fail.

If name resolution is working, doesn't this suggest that you get packets to the network?

Quoted 6 lines

A colleague allowed me to bottow his AT&T phone. I used this SIM card and he had the same APN and Username entered in the phone (assuming same password, wasn't visible and he didn't want me to change it just in case :-). His phone reported an "EDGE" connection and successfully, albeit SLOWLY, displayed web pages.

You are using your pre-paid SIM in this phone correct? Was it an older feature-phone type device? If so, then I suspect the phone is using the WAP browser, not a regular internet connection. That is what WAP gateway is for, to convert regular HTML web pages into an 'optimized' binary format on slow (think 10 years ago) networks.

Quoted 4 lines

So this suggests to me that the SIM can do IP and not just WAP. However, it says EDGE (2G?), does ofono support EDGE? I am I off in the weeds now?

Yes oFono supports 2G and yes you're in the weeds. You just need to find a SIM card with a proper data plan. Unfortunately US carriers don't really understand that it is useful to have actual data allowances on prepaid plans ;)

Regards,
-Denis

#8 lore raw
Quoted 11 lines · Denis Kenzior

Hi Darren,

<snip>

Quoted 7 lines

I've updated the context:

AccessPointName=wap.cingular
Username=WAP(a)CINGULARGPRS.COM
Password=CINGULAR1

Quoted 5 lines
Quoted 2 lines

I still get an IP address via DHCP and name resolution is working, but my ping,wget,ssh tests fail.

If name resolution is working, doesn't this suggest that you get packets to the network?

It does, and the RX/TX counters do increase.

Quoted 15 lines
Quoted 7 lines

A colleague allowed me to bottow his AT&T phone. I used this SIM card and he had the same APN and Username entered in the phone (assuming same password, wasn't visible and he didn't want me to change it just in case :-). His phone reported an "EDGE" connection and successfully, albeit SLOWLY, displayed web pages.

You are using your pre-paid SIM in this phone correct? Was it an older feature-phone type device? If so, then I suspect the phone is using the WAP browser, not a regular internet connection. That is what WAP gateway is for, to convert regular HTML web pages into an 'optimized' binary format on slow (think 10 years ago) networks.

Quoted 1 line
Quoted 8 lines
Quoted 3 lines

So this suggests to me that the SIM can do IP and not just WAP. However, it says EDGE (2G?), does ofono support EDGE? I am I off in the weeds now?

Yes oFono supports 2G and yes you're in the weeds. You just need to find a SIM card with a proper data plan. Unfortunately US carriers don't really understand that it is useful to have actual data allowances on prepaid plans ;)

OK, I think I understand the situation now. I'm looking for a suitable data plan. I'm considering something like this:

http://www.gprssim.com/index.php?route=product/product&path=20_42_26&product_id=97

They are expensive, but for validating hardware, they are probably less expensive than the $25 I drop every 3 months for a Go Phone WAP SIM!

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel