ubuntu-touch icon indicating copy to clipboard operation
ubuntu-touch copied to clipboard

RNDIS is not working in xenial

Open kugiigi opened this issue 7 years ago • 18 comments

  • Device: Nexus 5 and Nexus 7 2013 (flo)
  • Channel: RC and DEV
  • Build: latest

Steps to reproduce

  1. Enable RNDIS in UT Tweak Tool
  2. Connect your phone to a PC.
  3. Check via ifconfig if an IP address has been assigned or check in the PC itself.

Expected behavior

An IP address should be assigned and the PC should detect the new connection.

Actual behavior

Nothing happens and no IP address is assigned.

Logfiles and additional information

I've only tested this on Windows 7 and tried WinSCP and Putty to try to connect to my devices via SSH.

kugiigi avatar Jul 27 '18 10:07 kugiigi

UTdmesg.txt UTlogcat.txt

Here are the logs I generated.

kugiigi avatar Oct 06 '18 13:10 kugiigi

The PC seems to detect the new connection but it doesn't get an IP address. On the device, there's no trace of the connection in ifconfig

kugiigi avatar Oct 06 '18 13:10 kugiigi

Same behaviour on MEIZU PRO 5 M576U

wesertrainer avatar Oct 09 '18 16:10 wesertrainer

To everyone watching this bug: try this solution and let us know if it works for you https://forums.ubports.com/topic/2440/solved-impossible-usb-tethering-standard-not-reverse-connection/10

jumpy88 avatar Mar 06 '19 13:03 jumpy88

i can confirm that solution works

Fuseteam avatar May 10 '19 16:05 Fuseteam

the issue is now resolved in UT Tweak Tool can/should this issue be closed?

Fuseteam avatar May 24 '19 15:05 Fuseteam

Maybe. I confirm UT Tweak Tool works, despite in terminal both

android-gadget-service enable rndis
sudo tethering enable

are still required.

jumpy88 avatar May 24 '19 18:05 jumpy88

UT Tweak Tool implements those two commands, was this issue about both being necessary? i thought it was about rdnis not working via UTTT........

Fuseteam avatar May 24 '19 22:05 Fuseteam

I think this issue was about tethering not working (@kugiigi please confirm or correct me), but when it was created it wasn't clear which was the reason, because in a previous version of Ubuntu Touch

android-gadget-service enable rndis

was enough to enable it. Before to understand

sudo tethering enable

was required too, UTTT was broken too.

jumpy88 avatar May 25 '19 13:05 jumpy88

and tethering is working now :p now i wonder if reverse tethering works without the second command

Fuseteam avatar May 25 '19 14:05 Fuseteam

Well the issue is mainly for the command that wasn't working anymore in xenial. We learned that an additional command is necessary for RNDIS. I'm not sure if it's still necessary to find out why the new command is needed. How was it discovered anyway?

kugiigi avatar May 25 '19 14:05 kugiigi

I discovered it more or less by chance reading these steps as tracked here. When I'll have some time I'll try with reverse tethering.

jumpy88 avatar May 25 '19 16:05 jumpy88

it is interesting that the sed is no longer neccesary even tho the sudo tethering enable is. i have attempted to follow the steps here but i'm not sure if the host computer should have an existing connection or not on step 2, as i get different ips depending on whether the ubuntu host has an active internet connection or not. I believe without the active connection is the actual rdnis ip.....but i haven't managed to test further yet that said i have made a feature request in UTTT to "prepare the phone for reverse tethering" here as well

Fuseteam avatar May 28 '19 19:05 Fuseteam

Hi, I installed Ubuntu touch on my Fairphone 3. At first, I installed the stable 20.04 version, but I found out that UTTT was not available for that version, neither the android-gadget-service command, so I installed 16.04 instead. Now the tethering is still not working:

phablet@ubuntu-phablet:~$ sudo android-gadget-service enable rndis
rndis enabled
phablet@ubuntu-phablet:~$ sudo tethering enable
Device "rndis0" does not exist.
Error: Connection 'tethering' does not exist.
phablet@ubuntu-phablet:~$ 

Zahrun avatar Aug 30 '23 13:08 Zahrun

@Zahrun at this point it is better to use focal, we no longer need android-gadget-service on focal, it has been replaced by a dbus call instead: when you have connected your cable:

gdbus call --system --dest com.meego.usb_moded --object-path /com/meego/usb_moded --method com.meego.usb_moded.set_mode rndis_adb

or if you want to configure it for the next plugin:

gdbus call --system --dest com.meego.usb_moded --object-path /com/meego/usb_moded --method com.meego.usb_moded.set_config rndis_adb

Fuseteam avatar Sep 03 '23 01:09 Fuseteam

@Fuseteam it works, thank you! Is this documented anywhere?

Zahrun avatar Sep 03 '23 23:09 Zahrun

@Zahrun at this point it is better to use focal, we no longer need android-gadget-service on focal, it has been replaced by a dbus call instead: when you have connected your cable:

gdbus call --system --dest com.meego.usb_moded --object-path /com/meego/usb_moded --method com.meego.usb_moded.set_mode rndis_adb

or if you want to configure it for the next plugin:

gdbus call --system --dest com.meego.usb_moded --object-path /com/meego/usb_moded --method com.meego.usb_moded.set_config rndis_adb

oh, so it could be integrated to the settings

lduboeuf avatar Sep 04 '23 08:09 lduboeuf

@Zahrun it is not, but i think getting this integrated into settings as @lduboeuf mentions is probably a better idea :D

Fuseteam avatar Sep 06 '23 00:09 Fuseteam