On 05/10/2012 12:00 PM, Denis Kenzior wrote:
> Hi Darren,
>
>>>> 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...
>>>>
>>>> # ./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 ]
>>
>
> 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@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.
>
> 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
>
> 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@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...
>>
>>
>>>
>>>> # ./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?
>>
>
> 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.
>
>> 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.
>
>>>
>>>> # 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.
>>
>> 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.
>>
>> ...
>>
>
> 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.
>
>>>> # ./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
>>>
>>> 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.
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,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono