We have moved to a new Sailfish OS Forum. Please start new discussions there.
9

[3.1.0.11] USB tethering no longer working [released]

Tracked by Jolla (In release)

asked 2019-07-21 19:24:04 +0300

chalupa gravatar image

updated 2020-04-14 23:44:28 +0300

jovirkku gravatar image

I had no problem with USB connection sharing till the previous release, 3.0.3.10, but last update broke it completely. After pluging the phone, the computer's network configuration starts but gets a timeout while trying to get the IP address. Is there a proper way to debug this failure?

edit retag flag offensive close delete

Comments

1

It is a bit difficult to suggest something because it is unclear what you have tried already and might be missing. What OS do you want to connect to? What have you tried lsusb or lsblk for instance? It is difficult to offer a starting point.

onehundredpercentdruken ( 2019-07-21 23:58:30 +0300 )edit

Have you ever considered getting a proper phone and a proper OS that actually works?

Mukaparska ( 2020-02-10 06:10:29 +0300 )edit

@Mukaparska: posting non-sense questions is anything but helpful.

chalupa ( 2020-02-11 03:46:57 +0300 )edit

4 Answers

Sort by » oldest newest most voted
3

answered 2020-01-29 09:46:13 +0300

spiiroin gravatar image

@chalupa: If you were using usb-moded-connection-sharing-android-config.rpm or functionally equivalent mode configuration -> those ceased to work after connman changes around 3.0.3 release.

If you were using usb-moded-connection-sharing-android-connman-config.rpm and it worked, it ought to have continued to work. [Some devices e.g. Xperia XA2 and Xperia 10 have problems with this config too].

Both / at least one of these configuration packages should be working in SFOS >= 3.3.0

edit flag offensive delete publish link more

Comments

On a Sony XA2 Plus (3.2.1.20); made the following:

Create the file, /etc/usb-moded/dyn-modes/connection_sharing.ini:
[mode]
name = connection_sharing
module = none
network = 1
network_interface = rndis0
appsync = 1

[options]
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = rndis
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
idProduct = 0A02
dhcp_server = 1
nat = 1
nat_interface=rmnet_data0


Added at end of: /etc/usb-moded/dyn-modes/developer_mode-android.ini

nat = 1
nat_interface = rmnet_data0

Executed on operating system:

devel-su
sysctl net.ipv4.ip_forward=1

iptables -t nat -A POSTROUTING -o rmnet_data0 -j MASQUERADE
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i rndis0 -o rmnet_data0 -j ACCEPT

On the client computer (linux)
ip route add default via 192.168.2.15 dev enp0s20f0u1

- 192.168.2.15 is the IP address of the USB interface Sailfish side
- enp0s20f0u1 is the name of the USB Interface (ip a or ifconfig)

Then added the 8.8.8.8 to the file /etc/resolv.conf


Until a new reboot of the phone, you don't need to excute again the command on operating system.

Hope this will help people.

manu007 ( 2020-01-29 11:42:25 +0300 )edit

@manu007 Side note: having those "sysfs_path", "softconnect_path", "softconnect", and "softconnect_disconnect" values in there accomplishes nothing - they are ignored since usb-moded usb-moded 0.86.0+mer25 / sfos 2.2.2 or so.

spiiroin ( 2020-01-29 12:54:50 +0300 )edit

Thanks @spiiroin! Removing usb-moded-connection-sharing-android-config.rpm did the trick on one Xperia X. I hope this mess to be finally fixed in the next update.

chalupa ( 2020-02-11 03:42:25 +0300 )edit
2

answered 2020-04-14 09:57:42 +0300

jovirkku gravatar image

USB tethering works again with Sailfish OS 3.3.0 release. There is still no proper GUI for it, so you will need to rely on the CLI. Please read this help article: https://jolla.zendesk.com/hc/en-us/articles/203548266.

edit flag offensive delete publish link more
1

answered 2019-08-14 12:39:56 +0300

chalupa gravatar image

After trying several proposals made here in tjc, the one that actually worked in my case is

this one.

edit flag offensive delete publish link more

Comments

1

@chalupa it would be good if you could confirm which device you are using as get no issues with F5121, F5122 or F5321 but XA2 series is a different matter as continually get "Preparing USB mode" with suggested fixes.

aspergerguy ( 2019-08-15 12:42:46 +0300 )edit

Same problem happened with both the Xperia X and the XA2 and this trick solved both cases.

chalupa ( 2019-08-19 17:39:42 +0300 )edit

On XA2 after updates it seems to be breaking for me. Some of the config files get overwritten by the updates including 3.2.1 Nuuksio. After using the link above to revisit those config files it is working again. Thanks to @ixevix@chalupa, @"Philipe de Swet" and @rozgwi

adamjrat ( 2019-12-23 11:32:58 +0300 )edit
0

answered 2019-08-11 22:12:21 +0300

jchrbe gravatar image

updated 2019-08-15 10:09:25 +0300

jovirkku gravatar image

I'm not sure I've quite the same problem, but the question is mine. After the 3.1 Sailfish OS upgrade, not way to get Internet Data from my Jolla to my PC.

Formerly (Sailfish OS 2), I had to set the Developer Mode and Remote Connection, at my own risk. After, I had to open the developer console and install (superuser) the usb-moded-connection-sharing-android-config package

I had to repeat it with the Sailfish OS 3.0 major upgrade, but with this 3.1 one, it seems not to work anymore.

Regards,

jchrbe

edit flag offensive delete publish link more

Comments

@jchrbe You did not specify which device you have, but ...

Until the fixes get released:

  • usb-moded-connection-sharing-android-connman-config works in some devices, but
  • usb-moded-connection-sharing-android-config will not work in any device

After the fixes are released:

  • using usb-moded-connection-sharing-android-connman-config is the preferred option, but
  • usb-moded-connection-sharing-android-config might be required for some devices, but
  • for example geminipda has some additional issues that have not been addressed yet
spiiroin ( 2020-01-30 09:11:47 +0300 )edit
Login/Signup to Answer

Question tools

Follow
10 followers

Stats

Asked: 2019-07-21 19:24:04 +0300

Seen: 1,357 times

Last updated: Apr 14