So here it is, the first Ubuntu Touch build with working 3G data connection.

http://cdimage.ubuntu.com/ubuntu-touch-preview/daily-preinstalled/20130601.1/ (please flash using phablet-flash, build id >= 147)

In a big picture, we added data connection support at the oFono RILD modem, and also added oFono support in Network Manager, so you can use NM to also handle your 3G data connections.

Using NM helps us as it's the default stack used by our desktop, and also what is managing our wireless connection in Touch already.

Follows the steps needed to make a data call with your phone, running Ubuntu Touch:

1) Create a mobile broadband connection via NetworkManager on a system running standard Ubuntu Desktop:
1.1) Run 'nm-connection-editor'
1.2) Click Add.
1.3) Select Mobile Broadband
1.4) Follow the steps in the wizard to choose your provider; or edit to specify the correct APN settings for your provider's phone 3G data features.

2) Copy the created file from /etc/NetworkManager/system-connections/<connection> to the mobile device:

You can use adb push <connection> /data/ubuntu/etc/NetworkManager/system-connections/<connection>

Make sure the file is owned by root:root (600 as well) (inside the Ubuntu container):
$ sudo chown root:root /etc/NeworkManager/system-connections/<connection>
$ sudo chmod 600 /etc/NeworkManager/system-connections/<connection>

3) On the device, run:

nmcli con up id "<connection>"

This will activate the connection and bring you online, setting routes and all.

To disconnect:

nmcli con down id "<connection>"

To show status:

nmcli dev

Next week we'll be adding support to easily connect and disconnect via an indicator, which will remove the need of running the command by hand. For proper shell access while using the phone/tablet, please install the ubuntu-terminal-app package.

Example (with my TIM network):
phablet@ubuntu-phablet:~$ sudo cat /etc/NetworkManager/system-connections/TIM\ Default\ 1
[connection]
id=TIM Default 1
uuid=66da80ea-4ea4-4072-a546-b321fd8dbc9c
type=gsm
autoconnect=false

[gsm]
number=*99#
username=tim
password=tim
apn=tim.br

[ipv4]
method=auto

[serial]
baud=115200

phablet@ubuntu-phablet:~$ nmcli dev
DEVICE     TYPE              STATE
/ril_0     gsm               disconnected
wlan0      802-11-wireless   disconnected
phablet@ubuntu-phablet:~$ nmcli con up id "TIM Default 1"
phablet@ubuntu-phablet:~$ nmcli dev
DEVICE     TYPE              STATE
/ril_0     gsm               connected
wlan0      802-11-wireless   disconnected
phablet@ubuntu-phablet:~$ ifconfig
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:379 errors:0 dropped:0 overruns:0 frame:0
          TX packets:379 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:42892 (42.8 KB)  TX bytes:42892 (42.8 KB)

rmnet_usb0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:177.111.228.209  Mask:255.255.255.252
          inet6 addr: fe80::3f25:a358:dc2d:eb25/64 Scope:Link
          UP RUNNING  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:961 (961.0 B)  TX bytes:1152 (1.1 KB)

wlan0     Link encap:Ethernet  HWaddr 10:68:3f:fe:09:8f
          UP BROADCAST MULTICAST  MTU:1500  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:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

phablet@ubuntu-phablet:~$ ping ubuntu.com
PING ubuntu.com (91.189.94.156) 56(84) bytes of data.
64 bytes from vostok.canonical.com (91.189.94.156): icmp_req=1 ttl=52 time=526 ms
64 bytes from vostok.canonical.com (91.189.94.156): icmp_req=2 ttl=52 time=530 ms
64 bytes from vostok.canonical.com (91.189.94.156): icmp_req=3 ttl=52 time=457 ms
^C
--- ubuntu.com ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3168ms
rtt min/avg/max/mdev = 457.638/504.788/530.636/33.402 ms

phablet@ubuntu-phablet:~$ nmcli con down id "TIM Default 1"
phablet@ubuntu-phablet:~$ nmcli dev
DEVICE     TYPE              STATE
/ril_0     gsm               disconnected
wlan0      802-11-wireless   disconnected

Enjoy!
Shared publiclyView activity