Tethering Jolla on Arch Linux

Wed 2017-08-09

The Jolla smartphone from the Finnish company of the same name has the ability to share its mobile data connection to a host computer over USB. But this needs a bit of manual configuration to set up.

Configuration on the phone

In a shell with super user privileges run

# pkcon install usb-moded-connection-sharing-android-config

This adds an option for internet sharing to the menu that pops up when connecting the phone to the host computer over USB.

Configuration on the host computer

Plugging in the phone and selecting "Internet sharing" should make a new ethernet interface show up (check with ip link). Its name depends on the USB port used, i.e. it is impractical to write configuration files for netctl if one does not always want to connect to the same USB port.

Luckily, interface naming can be configured via udev. After figuring out some sufficiently unique attributes that identify the phone one can write a udev rule to consistently name the jolla tethering network interface regardless of USB port used.

In my case I added the following line to /etc/udev/rules.d/10-network.rules

SUBSYSTEM=="net", ACTION=="add", ATTRS{product}=="Jolla", ATTRS{serial}=="DU41701161", NAME="jollausb"

This renames the interface to jollausb.

With this now consistent interface name it is straightforward to write a netctl config file to use this interface.

# /etc/netctl/tether
Description='Jolla shared connection via USB tether'
Interface=jollausb
Connection=ethernet
IP=dhcp
IP6=no

Notes

I noticed that I had to first activate the mobile data connection on then phone and only after this connect it to the computer. Otherwise the network interface would show up, but no internet connection would be available.

Note that consistently renaming the network interface also simplifies the process of logging into the phone via ssh over USB.

Tags:

This text by Ludger Sandig is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.