* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) [not found] <4FAAF3DB.2080007@linux.intel.com> @ 2012-05-10 15:33 ` Denis Kenzior 2012-05-10 18:18 ` Darren Hart 0 siblings, 1 reply; 9+ messages in thread From: Denis Kenzior @ 2012-05-10 15:33 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 5920 bytes --] Hi Darren, On 05/09/2012 05:46 PM, Darren Hart wrote: > 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. > 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? > # ./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" > # 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. > > # cat /etc/resolv.conf > # Generated by Connection Manager > nameserver 208.67.222.222 > nameserver 208.67.220.220 > nameserver 127.0.0.1 > > # 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? > # 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 > 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? > [ 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 > This looks sane? Regards, -Denis ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) 2012-05-10 15:33 ` ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) Denis Kenzior @ 2012-05-10 18:18 ` Darren Hart 2012-05-10 19:00 ` Denis Kenzior 0 siblings, 1 reply; 9+ messages in thread From: Darren Hart @ 2012-05-10 18:18 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 6673 bytes --] On 05/10/2012 08:33 AM, Denis Kenzior wrote: > Hi Darren, > > On 05/09/2012 05:46 PM, Darren Hart wrote: >> 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. 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). > >> 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 ] > >> # ./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). > >> # 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. ... >> # ./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? > >> [ 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 >> > > This looks sane? Does the '?' imply that there is something clearly wrong with this listing? Thanks, -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) 2012-05-10 18:18 ` Darren Hart @ 2012-05-10 19:00 ` Denis Kenzior 2012-05-10 20:55 ` Darren Hart 0 siblings, 1 reply; 9+ messages in thread From: Denis Kenzior @ 2012-05-10 19:00 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 7499 bytes --] 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(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. > > >> >>> # ./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. >> >>> [ 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 >>> >> >> This looks sane? > > Does the '?' imply that there is something clearly wrong with this listing? > Nah, it all looks good. Regards, -Denis ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) 2012-05-10 19:00 ` Denis Kenzior @ 2012-05-10 20:55 ` Darren Hart 2012-05-10 21:39 ` Denis Kenzior 2012-05-10 21:50 ` Darren Hart 0 siblings, 2 replies; 9+ messages in thread From: Darren Hart @ 2012-05-10 20:55 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 7872 bytes --] 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(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. > > 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(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... >> >> >>> >>>> # ./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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) 2012-05-10 20:55 ` Darren Hart @ 2012-05-10 21:39 ` Denis Kenzior 2012-05-10 21:50 ` Darren Hart 1 sibling, 0 replies; 9+ messages in thread From: Denis Kenzior @ 2012-05-10 21:39 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 4276 bytes --] Hi Darren, <snip> > > > In my case, AccessPointName is empty. > Then provisioning failed. >> >> 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 > > And this is why the context is not shown in ConnMan's list of available services. ConnMan ignores contexts with empty APNs as invalid. >> >> 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 Yep, looks like this pre-paid account is configured with access to the APN with WAP based services only. > > 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> >>> 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. > 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. > 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. > 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. > > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) 2012-05-10 20:55 ` Darren Hart 2012-05-10 21:39 ` Denis Kenzior @ 2012-05-10 21:50 ` Darren Hart 2012-05-11 0:46 ` Denis Kenzior 1 sibling, 1 reply; 9+ messages in thread From: Darren Hart @ 2012-05-10 21:50 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 3615 bytes --] On 05/10/2012 01:55 PM, Darren Hart wrote: > > > 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(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. > >> >> 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(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 > 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? -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) 2012-05-10 21:50 ` Darren Hart @ 2012-05-11 0:46 ` Denis Kenzior 2012-05-11 4:22 ` Darren Hart 0 siblings, 1 reply; 9+ messages in thread From: Denis Kenzior @ 2012-05-11 0:46 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1449 bytes --] Hi Darren, <snip> > 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? > > 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. > > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) 2012-05-11 0:46 ` Denis Kenzior @ 2012-05-11 4:22 ` Darren Hart 0 siblings, 0 replies; 9+ messages in thread From: Darren Hart @ 2012-05-11 4:22 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2023 bytes --] On 05/10/2012 05:46 PM, Denis Kenzior wrote: > Hi Darren, > > <snip> > >> 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? It does, and the RX/TX counters do increase. > >> >> 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. > >> >> 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! -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 9+ messages in thread
* ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused)
@ 2012-05-09 23:06 Darren Hart
0 siblings, 0 replies; 9+ messages in thread
From: Darren Hart @ 2012-05-09 23:06 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 4833 bytes --]
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.
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
# ./create-internet-context
Found context /mbm_0/context1
# 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)
# cat /etc/resolv.conf # Generated by Connection Manager
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 127.0.0.1
# 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
# 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
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
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 9+ messages in threadend of thread, other threads:[~2012-05-11 4:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4FAAF3DB.2080007@linux.intel.com>
2012-05-10 15:33 ` ofono-tests internet context: DNS works, ping wget and ssh do not (Connection Refused) Denis Kenzior
2012-05-10 18:18 ` Darren Hart
2012-05-10 19:00 ` Denis Kenzior
2012-05-10 20:55 ` Darren Hart
2012-05-10 21:39 ` Denis Kenzior
2012-05-10 21:50 ` Darren Hart
2012-05-11 0:46 ` Denis Kenzior
2012-05-11 4:22 ` Darren Hart
2012-05-09 23:06 Darren Hart
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.