Malformed /etc/NetworkManager/system-connections/tethering on mako

Bug #1427697 reported by Fabian Herb
98
This bug affects 19 people
Affects Status Importance Assigned to Milestone
dbus-property-service (Ubuntu)
Confirmed
High
Oliver Grawert

Bug Description

After executing

android-gadget-service enable rndis

The connected PC (Windows or OS X with HoRNDIS driver) recognizes a new network device, but doesn’t get an IP. On the phone a network device usb0 appears, but it doesn’t have an IP. I noticed a file /etc/NetworkManager/system-connections/tethering appearing with the following contents:

[802-3-ethernet]
duplex=full
mac-address=

[connection]
id=tethering
uuid=ca16a21d-7d8b-4b49-926e-
type=802-3-ethernet
timestamp=1425385307

[ipv6]
method=auto

[ipv4]
method=shared
may-fail=false

Note the truncated UUID and the missing MAC address.

$ system-image-cli -i
current build number: 16
device name: mako
channel: ubuntu-touch/ubuntu-rtm/14.09
last update: 2015-03-03 13:05:42
version version: 16
version ubuntu: 20150219
version device: 20150116
version custom: mako-1.1

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dbus-property-service (Ubuntu):
status: New → Confirmed
Oliver Grawert (ogra)
Changed in dbus-property-service (Ubuntu):
importance: Undecided → High
assignee: nobody → Oliver Grawert (ogra)
Revision history for this message
Oliver Grawert (ogra) wrote :

i took a quick look today and it seems the mako simply doesnt call the interface rndis0 but usb0 (as mentioned by the OP above) ... fixing the interface name in /usr/bin/tethering to point to usb0 doesnt seem to be enough though ... since NM doesnt assign a IP on the mako even with the file being correct.

Revision history for this message
lgd (lgd) wrote :

vivid-devel from 19.04.15 of the bq device (krillin) is affected from the same or similar problem too! Connected but no IPv4, only IPv6 which does not work for internet access on a Ubuntu 14.04 PC.

Revision history for this message
Adam Brisebois (ccr-0) wrote :

Has anyone figured out a workaround to this issue yet? I really need to be able to use my Nexus 4 to tether. I am running Ubuntu 14.04 on my machines, and the latest devel channel on my Nexus.

Revision history for this message
jrose (jroesler) wrote :

I have a workaround (at least it works on my setup).

0) unplug the USB cable
1) correct /usr/bin/tethering:
    "rndis0" should be "usb0" as indicated above.
2) enable rndis: "sudo android-gadget-service enable rndis"
3) enable tethering: "sudo tethering enable"
    Note: this gave me an error (I think NetworkManager is unable to bring the usb0 interface up), but it seems not to matter.
4) plug in the USB cable, and the computer connects to the internet using a new wired connection.

One problem I initially had was that I couldn't connect with adb if the device wasn't in mtp mode, but that seems to be mutually exclusive with rndis, which is part of the reason I recommended unplugging the device in step 0. You just enter the commands in the terminal app.

I have to admit that I have only a very shady idea of what I'm doing here. I discovered these steps through trial and error. Hopefully, it works for you and/or helps ogra resolve the issue.

-John

Revision history for this message
jtd (jtdjtdjtd-business) wrote :

Mako Ubuntu 15.04 (r23)

Can see hotspot from Ubuntu laptop 14.04 but cannot connect (authentication fails repeatedly)

Situation: Phone > System Settings > Hotspot > Enable (Hotspot name: Ubuntu); Phone Wi-Fi also enabled

Expected Behavior: From Laptop, try to connect to Ubuntu with network GUI, enter passphrase, connect to internet

Actual Behavior: From Laptop, try to connect to Ubuntu with network GUI, enter passphrase, fails, requests passphrase again...

Revision history for this message
Oliver Grawert (ogra) wrote :

this bug is about wired USB tethering, not about wireless AP ... for hotspot issues on mako please see bug 1487157

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote :

Here is an updated version of John's recipe (comment 5) for fixing wired tethering!
Worked on standard image for Nexus 4 (and Ubuntu 15.04 or 15.10 on computer).

Prerequisites for your phone:
- Turn on developer mode: "System settings" | "About this phone" | "Developer mode"
- Make the OS image writable by entering on external computer connected via USB:
  > phablet-config writable-image
- Make sure that WLAN is turned off.

Steps for fixing tethering (only needed once; repeat after a phone update)
1) unplug the USB cable (on phone side suffices);
   2015-10-15: it seems to have changed now: you must be connected already
2) correct in /usr/bin/tethering:
   "rndis0" should be "usb0"
3) enable rndis:
  > sudo android-gadget-service enable rndis
4) enable tethering:
  > sudo tethering enable
    Note: this might print an error, which can be ignored.
5) If not done before, plug in the USB cable and the computer connects to the internet using
   a new wired connection.

Instead of steps 2.-4., you can use a script named "fix-tethering" on your phone:

  > sh fix-tethering

The file fix-tethering should contain the following 4 lines:

#!
sudo sed -i -e 's/rndis0/usb0/g' /usr/bin/tethering
sudo android-gadget-service enable rndis
sudo tethering enable

Revision history for this message
Andrew M (muka) wrote :

sudo system-image-cli -i
[sudo] password for phablet:
current build number: 25
device name: mako
channel: ubuntu-touch/stable/ubuntu
last update: 2016-01-12 16:01:54
version version: 25
version ubuntu: 20151118.2
version tag: OTA-8
version device: 20150911
version custom: 20151118.2

 I had to downgrade the image from 26 to 25 because USB tethering stopped working.

Revision history for this message
Cesar Herrera (chg1) wrote :

I have a BQ 4.5 with OTA-8.5 and I don't know if this is a correct place to say this:
In the notebook I used to make the SSH keys by:
ssh-keygen -t dsa
Then I copied id_dsa.pub in the .ssh of the phone as authorized_keys
I changed the .ssh in the phone with:
chmod 755 ~/.ssh
I connected the phone win an USB cable and executed:
android-gadget-service enable rndis
android-gadget-service enable ssh

In the notebook I put:
ssh phablet@10.42.0.1
and I where connected. But now I get:
Permission denied (publickey).

Revision history for this message
Fabian Herb (fherb) wrote :

No, SSH issues are not related with this bug.

Apparently, USB tethering issues are worse now. When I execute "android-gadget-service enable rndis", everything crashes and I get the Ubuntu bootup screen forever. A lot of processes are eating CPU, like upstart, unity8, upstart-dbus-bridge and unity-system-compositor-spinner.

$ system-image-cli -i
current build number: 26
device name: mako
channel: ubuntu-touch/stable/ubuntu
last update: 2015-12-19 20:06:10
version version: 26
version ubuntu: 20151210
version tag: OTA-8.5
version device: 20150911
version custom: 20151210

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote :

Tethering works for me on Nexus 4 with OTA-13. (Some steps from my recipe in comment 8 are even redundant now; let me know if you need details.)

Revision history for this message
Fabian Herb (fherb) wrote :

The crash I described in my comment from January is gone. Apart from that, everything is still in the state it was when the bug was opened. /usr/bin/tethering still tries to get the MAC address from rndis0.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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