How to make Nokia E70 access Internet through a Linux box

Introduction

Sometimes there are things done in Linux for which instructions are difficult to find.

So, my case:

Accessing Linux-network through phone

The software that came with the phone is available only for Windows. No help there.

My LAN configuration (simplified for this documentation) is as follows:

You could use DHCP, it doesn't matter. I use static addresses, and these are instructions for that.

I'm using Gentoo GNU/Linux in the desktop computer.

I believe these instructions will work also on most other Nokia phones that have the Series-60 (S60) operating system.

Quick summary

The phone is connected to the computer using the USB cable. Your kernel must have RNDIS support built-in (not as module).

These instructions use Ethernet Bridging, so you must enable it too, and thus you must install bridge-utils. Bridge your ethernet card and the rndis interface together, and it'll work. Remember not to mount NFS shares before creating the bridge.

Alternative to Ethernet Bridging would be NAT. I won't cover that here.

Instructions

Phone configuration

Finnish labels of the options are in parenthesis. (My phone is Finnish, and I am only guessing what the English names for the options are.)

  1. Menu (Valikko)
  2. Control panel (Työkalut)
  3. Settings (Asetukset)
  4. Connections (Yhteys)
  5. Connection addresses (Yhteysosoitteet)
    • Options --> Add new --> Use defaults
      1. Name: Give it a name
      2. Type (Siirtotie): IP passthrough
        • Options --> Advanced (Lisäasetukset)
          1. IPV4 settings
            • Configure your settings here!
            • I used: IP=10.104.4.99, mask=255.0.0.0, gateway=10.104.4.14

Linux configuration

These changes are done in the computer where you plug the USB connection into!

Kernel

First, you need to build your custom kernel. This is important.

I assume you have already set up your USB working so that you can connect USB devices to your computer.

Ensure that the following settings are as shown:

  • Device Drivers / USB support:
    • Support for host-side USB: Y. This must not be a module!
    • USB network adapters:
      • Multi-purpose USB Networking framework: Y.
      • Host for RNDIS devices: Y. This must not be a module!

If rndis is built as a module, usbcore will ignore RNDIS devices, and your ethn device cannot be found.

  • Networking / Networking options:
    • 802.1d Ethernet Bridging: Y or M.

It is not mandatory to use bridging (you could set up NAT instead), but I chose this option, and this documentation is based on that.

Compile the kernel with these changes, and reboot. You must reboot for the changes in RNDIS+usbcore to take effect; modprobe/rmmod won't help.

Software

Install bridge-utils. If you use Gentoo like I do, the command is: USE=sysfs emerge bridge-utils. The USE flag is not necessary, but I chose it for possible future purposes.

_-Setting up the bridge

This is a quick HOW-TO on bridges on Linux.

  • I had: eth0, which is an Ethernet card, and has address 10.104.4.15.
  • I had: eth1, which is the rndis interface, which represents the cellular phone.

  brctl addbr br0
  brctl addif br0 eth0
  brctl addif br0 eth1
  ifconfig eth0 0.0.0.0
  ifconfig eth1 0.0.0.0
  ifconfig br0 10.104.4.15          <-- this is the IP eth0 previously had
  route add default gw 10.104.4.14  <-- this is the router's IP, aka. gateway address
Explanation: A bridge connects multiple network interfaces together, making them act as one. This command sequence assimilates the settings of eth0 into br0 (which was created here).

Peers behind eth0 will observe that your ethernet pipe hosts two IP addresses: the one you configured to the bridge, and the traffic that comes through your phone.

Now try to access Internet using your phone, using the interface you created (by the name you gave).

Note: If your kernel crashes in a kernel-panic when you do that, try the following workarounds, which helped:

  1. Compile your network card driver into the kernel instead of having it as a module.
  2. Cease all network access (including NFS mounts) before creating the bridge.
    • In Gentoo, /etc/init.d/nfs stop
    • After creating the bridge, remount the NFS shares if necessary. (/etc/init.d/nfs start)
This resolved the issue for me.

Every time you disconnect and reconnect your phone to the USB cable, you need to repeat these commands:

  brctl addif br0 eth1
  ifconfig eth1 0.0.0.0

Troubleshooting

On this phone, web browsing worked fine. Email sending didn't. According to tcpdump, the phone has this error that when it sends email, it sends the first TCP packet with ff:ff:ff:ff:ff:ff MAC address. When it uses web, it works properly.

To remedy this issue, install PuTTY in the phone. Connect PuTTY to some arbitrary server, leave it on background (use the red button), and then attempt sending e-mail. It doesn't matter whether you can actually log in to the server you tried to connect to.
E-mail should now work, because the routing tables have already been initialized, and the email client won't mess up things.

Accessing phone memory card filesystem in Linux

Quick summary

The phone is connected to the computer using the USB cable.

Instructions

Phone configuration

  1. Menu (Valikko)
  2. Connections (Yhteydet)
  3. Datakaapeli (Data cable)
  4. Select "data transfer" (tiedonsiirto)

Linux configuration

These changes are done in the computer where you plug the USB connection into!

Kernel

The kernel module cdc_acm is required to be installed, along with the normal USB drivers.

Software

When the phone is configured into data transfer mode, Linux should immediately notice a new block device in the system. In my case, it was /dev/sda.

Now you can simply mount this drive (mount /dev/sda yourtmpdir -t vfat and access the files on it.

Umount the drive (umount yourtmpdir and disconnect the data transfer (hit red button) to end.

Note that the phone will not be accepting calls when it is in data transfer mode.


Last edited at: 2008-06-25T17:42:47+00:00