I cannot use my Nokia N900 as a 3G modem using the Network Menu

Bug #624601 reported by Connel Hooley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Menu
Invalid
Low
Unassigned
ofono
Fix Released
Undecided
Unassigned

Bug Description

I am running Ubuntu 10.04 and using the latest daily build version of the Network Menu (as of writing 0.2.10-0ubuntu1+r71+201008250728) via the daily build PPA. I have installed both ofono and usb-modeswitch (from the same PPA) however when I plug in my phone, select PC Suite on the phone and then run "cmcc list" in a terminal only my Wi-Fi connection is listed. I did noticed however that when I plug in my phone and select PC Suite a notify OSD bubble appears saying "Wire Disonnceted" (each word on a separate line inside the bubble).

Thanks Connel

summary: - I cannot use my phone as 3G modem using the Network Menu
+ I cannot use my phone as a 3G modem using the Network Menu
Revision history for this message
Kalle Valo (kvalo) wrote : Re: [Bug 624601] [NEW] I cannot use my phone as a 3G modem using the Network Menu

Connel Hooley <email address hidden> writes:

> Public bug reported:
>
> I am running Ubuntu 10.04 and using the latest daily build version of
> the Network Menu (as of writing 0.2.10-0ubuntu1+r71+201008250728) via
> the daily build PPA. I have installed both ofono and usb-modeswitch
> (from the same PPA) however when I plug in my phone, select PC Suite on
> the phone and then run "cmcc list" in a terminal only my Wi-Fi
> connection is listed.

I remember that you have N900, so I'll update the bug title accordingly.

What's the version of ofono you are using? There are multiple issues:

1) Older ofono releases had broken Nokia N900 support. It somewhat
   worked when using manually with ofono, but the connections from
   connman didn't work. Last week (or so) ofono got fixes for N900, so
   it should work better now from ofono point of view.

2) BUT ofono developers decided to (delibrately) break the API between
   connman and ofono few weeks ago and current daily builds of ofono
   won't work with connman. This is very unfortunate and I have informed
   upstream about this. Hopefully they fix connman to use the new API
   soon.

Let's handle the item 1) in this bug and I filed a separate bug for item
2):

https://bugs.launchpad.net/connman/+bug/624643

> I did noticed however that when I plug in my phone and select PC Suite
> a notify OSD bubble appears saying "Wire Disonnceted" (each word on a
> separate line inside the bubble).

When you enable PC Suite on N900 it also enables USB network interface.
connman sees the interface and that's why you see the notification. I
think the notification is a bug in indicator-network, but not sure. I
would not mind receiving a bug about that as well :)

Thank you for the report.

--
Kalle Valo

Kalle Valo (kvalo)
summary: - I cannot use my phone as a 3G modem using the Network Menu
+ I cannot use my Nokia N900 as a 3G modem using the Network Menu
Changed in indicator-network:
status: New → Confirmed
Changed in ofono:
status: New → Confirmed
Revision history for this message
Connel Hooley (connelhooley) wrote :

I am currently using ofono version 0.26-0ubuntu0~ind2+r3200+201008260449 (updated to this earlier this morning). I'm sorry but I will need instructions on how to use ofono manually to confirm that the bug is fixed in ofono if that is ok.

I will also create a separate report about the notification I'm getting when I plug in my Nokia N900.

Thanks your help once again :)

Connel

Revision history for this message
Kalle Valo (kvalo) wrote : Re: [Bug 624601] Re: I cannot use my Nokia N900 as a 3G modem using the Network Menu

Connel Hooley <email address hidden> writes:

> I am currently using ofono version 0.26-0ubuntu0~ind2+r3200+201008260449
> (updated to this earlier this morning).

Ok, so connman won't work with this version of ofono due to bug #624643,
but we knew this already.

> I'm sorry but I will need instructions on how to use ofono manually to
> confirm that the bug is fixed in ofono if that is ok.

Here are the instructions, there might mistakes but I hope you get the
general idea:

1. Get the necessary test scripts from the ofono git. Either use 'git
   clone git://git.kernel.org/pub/scm/network/ofono/ofono.git' or
   download the manually here (using the raw link in the page):

http://git.kernel.org/?p=network/ofono/ofono.git;a=tree;f=test;h=155d6e80d56850918b222d62dc549976cc81f099;hb=HEAD

2. Better to disable connman during this test so that we have full
   control of ofono:

sudo /etc/init.d/connman stop

3. Plugin N900 and enable PC Suite mode

4. Run ./list-modem to see that ofono has detected N900.

5. N900 should be in offline mode and you should see "Online = 0" in the
   output. Put the modem to online:

./online-modem

6. Check that the modem is in online state ("Online = 1"):

./list-modem

7. Find out your APN name for your 3G network. For example, my Elisa
   operator in Finland with my dataplan uses 'internet' as the APN name.
   The xml file in mobile-broadband-provider-info package might help
   you.

8. Create gprs context. Replace myapnname with the correct APN, for
   example I used internet:

./create-context myapnname

9. Then check that you see the context with the apn name:

./list-context

10. Then activate the context:

./activate-context

11. And then you should see an active context with IP address, interface
gprs0 etc:

./list-context

Actually now you can use the connection. You just need to manually set
all IP settings provided by ofono. For example, you can use ip or
ifconfig commands to set them.

> I will also create a separate report about the notification I'm getting
> when I plug in my Nokia N900.

Thanks.

> Thanks your help once again :)

No, thank you for your efforts! :) I appreaciate this a lot, this is
very valuable.

--
Kalle Valo

Revision history for this message
Connel Hooley (connelhooley) wrote :

Ok I ran git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git to download the test scripts. I then ran the following but I got an error when running ./activate-context. I've also found that the network menu has stopped connecting on start-up sometimes. I will create a separate report.

connel@connel-laptop:~$ cd /home/connel/ofono/test/

connel@connel-laptop:~/ofono/test$ sudo /etc/init.d/connman stop
• Stopping Connection Manager [ OK ]

connel@connel-laptop:~/ofono/test$ ./list-modems
[ /isimodem0 ]
    Features = sim
    Powered = 1
    Interfaces = org.ofono.Phonebook org.ofono.SimManager org.ofono.VoiceCallManager
    Online = 0
    Model = Nokia N900
    Manufacturer = Nokia
    Serial = 356938032649155
    Revision = RX-51_10.2010.19.1
V 0.0.000
RX-51
(c) NOKIA
    [ org.ofono.Phonebook ]
    [ org.ofono.SimManager ]
        SubscriberNumbers =
        CardIdentifier = 8944110064559156744
        LockedPins =
        PinRequired = none
        SubscriberIdentity = 234105563494527
        Present = 1
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 119 118 999 110 08 000 911 112

connel@connel-laptop:~/ofono/test$ ./online-modem
Setting modem /isimodem0 online...

connel@connel-laptop:~/ofono/test$ ./create-context internet
Setting APN of /isimodem0/context1 to internet

connel@connel-laptop:~/ofono/test$ ./list-contexts
[ /isimodem0 ]
    [ /isimodem0/context1 ]
        Username =
        Protocol = ip
        Name = Internet
        Settings = { }
        Active = 0
        AccessPointName = internet
        Password =
        Type = internet

connel@connel-laptop:~/ofono/test$ ./activate-context
Error activating /isimodem0/context1: org.ofono.Error.Failed: Operation failed

Revision history for this message
Kalle Valo (kvalo) wrote :

Connel Hooley <email address hidden> writes:

> connel@connel-laptop:~/ofono/test$ ./list-contexts
> [ /isimodem0 ]
> [ /isimodem0/context1 ]
> Username =
> Protocol = ip
> Name = Internet
> Settings = { }
> Active = 0
> AccessPointName = internet
> Password =
> Type = internet
>
> connel@connel-laptop:~/ofono/test$ ./activate-context
> Error activating /isimodem0/context1: org.ofono.Error.Failed: Operation failed

Is your APN really "internet"? What operator are using and in what
country?

I have N900 myself and at some point it was working with ofono with the
instructions above. But maybe something is broken again.

--
Kalle Valo

Revision history for this message
Connel Hooley (connelhooley) wrote :

I am using O2 (on a contract) in the UK. I looked inside serviceproviders.xml and found:

<provider>
<name>o2</name>

<gsm>
<network-id mcc="262" mnc="07"/>
<network-id mcc="262" mnc="08"/>
<network-id mcc="262" mnc="11"/>

<apn value="internet">
<name>Pay-by-MB</name>
<dns>195.182.110.132</dns>
<dns>62.134.11.4</dns>
</apn>

<apn value="surfo2">
<name>Pay-by-time</name>
<dns>195.182.110.132</dns>
<dns>62.134.11.4</dns>
</apn>
</gsm>
</provider>

But looking at it now they are pay and go connections. So instead I found these:
<provider>
<name>o2</name>

<gsm>
<network-id mcc="234" mnc="02"/>
<network-id mcc="234" mnc="10"/>
<network-id mcc="234" mnc="11"/>

<apn value="mobile.o2.co.uk">
<name>Contract</name>
<username>o2web</username>
<password>password</password>
<dns>193.113.200.200</dns>
<dns>193.113.200.201</dns>
</apn>

<apn value="mobile.o2.co.uk">
<name>Contract (faster)</name>
<username>faster</username>
<password>password</password>
<dns>193.113.200.200</dns>
<dns>193.113.200.201</dns>
</apn>

<apn value="payandgo.o2.co.uk">
<name>Pay and Go (Prepaid)</name>
<username>payandgo</username>
<password>payandgo</password>
</apn>

<apn value="idata.o2.co.uk">
<name>iPhone (Contract)</name>
<username>vertigo</username>
<password>password</password>
</apn>

<apn value="wap.o2.co.uk">
<name>WAP</name>
<username>o2wap</username>
<password>password</password>
</apn>
</gsm>
</provider>

So I think my correct apn is 'mobile.o2.co.uk'. I will try again and get back to you.

Connel

Revision history for this message
Connel Hooley (connelhooley) wrote :
Download full text (3.7 KiB)

Yeah sorry that was my fault. I just entered the wrong apn. I'm not familiar with ip or ifconfig so wasn't able to actually use the connection lol but it does appear to be working. Here is the output this time around:

connel@connel-laptop:~$ cd /home/connel/ofono/test/
connel@connel-laptop:~/ofono/test$ sudo /etc/init.d/connman stop
[sudo] password for connel:
 * Stopping Connection Manager [ OK ]
connel@connel-laptop:~/ofono/test$ ./list-modems
[ /isimodem0 ]
    Features = sim
    Powered = 1
    Interfaces = org.ofono.Phonebook org.ofono.SimManager org.ofono.VoiceCallManager
    Online = 0
    Model = Nokia N900
    Manufacturer = Nokia
    Serial = 356938032649155
    Revision = RX-51_10.2010.19.1
V 0.0.000
RX-51
(c) NOKIA
    [ org.ofono.Phonebook ]
    [ org.ofono.SimManager ]
        SubscriberNumbers =
        CardIdentifier = 8944110064559156744
        LockedPins =
        PinRequired = none
        SubscriberIdentity = 234105563494527
        Present = 1
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 119 118 999 110 08 000 911 112

connel@connel-laptop:~/ofono/test$ ./online-modem
Setting modem /isimodem0 online...
connel@connel-laptop:~/ofono/test$ ./create-context mobile.o2.co.uk
Setting APN of /isimodem0/context1 to mobile.o2.co.uk
connel@connel-laptop:~/ofono/test$ ./list-contexts
[ /isimodem0 ]
    [ /isimodem0/context1 ]
        Username =
        Protocol = ip
        Name = Internet
        Settings = { }
        Active = 0
        AccessPointName = mobile.o2.co.uk
        Password =
        Type = internet

connel@connel-laptop:~/ofono/test$ ./activate-context
connel@connel-laptop:~/ofono/test$ ./list-contexts
[ /isimodem0 ]
    [ /isimodem0/context1 ]
        Username =
        Protocol = ip
        Name = Internet
        Settings = { Interface=gprs0 Netmask=255.255.255.255 Method=static DomainNameServers=82.132.254.2,82.132.254.3, Address=10.115.4.111 }
        Active = 1
        AccessPointName = mobile.o2.co.uk
        Password =
        Type = internet

connel@connel-laptop:~/ofono/test$ ifconfig
gprs0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP POINTOPOINT RUNNING NOARP MTU:1400 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:18488 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18488 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2498280 (2.4 MB) TX bytes:2498280 (2.4 MB)

usbpn0 Link encap:UNSPEC HWaddr 1B-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP POINTOPOINT RUNNING NOARP MTU:65541 Metric:1
          RX packets:97 errors:0 dropped:0 overruns:0 frame:0...

Read more...

Revision history for this message
Kalle Valo (kvalo) wrote :

Connel Hooley <email address hidden> writes:

> Yeah sorry that was my fault. I just entered the wrong apn. I'm not
> familiar with ip or ifconfig so wasn't able to actually use the
> connection lol but it does appear to be working.

Excellent that you got it working!

> Settings = { Interface=gprs0 Netmask=255.255.255.255 Method=static DomainNameServers=82.132.254.2,82.132.254.3, Address=10.115.4.111 }

You can do something like this:

sudo ip addr add 10.115.4.111/32 dev gprs0
sudo ip route default via dev gprs0
sudo sh -c "echo nameserver 82.132.254.2 > /etc/resolv.conf"

Warning: completely untested! Be careful with the commands above. And
please note that IP settings most likely change during every gprs
connection.

ip command is from package iproute. Alternatively you can use ifconfig.

--
Kalle Valo

Revision history for this message
Kalle Valo (kvalo) wrote :

N900 is now working with ofono, I tested it myself. Marking bug as fix committed.

But there's a problem with nameservers in connman, I filed bug #643809 to handle that issue.

Changed in ofono:
status: Confirmed → Fix Committed
Kalle Valo (kvalo)
Changed in indicator-network:
importance: Undecided → Low
status: Confirmed → Invalid
Kalle Valo (kvalo)
Changed in ofono:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.