Ask / Submit

Internet sharing problem with Linux

asked 2016-08-24 10:42:23 +0200

khul gravatar image

updated 2016-08-24 15:30:10 +0200

jiit gravatar image

I use debian jessie on my laptop and use the jolla internet sharing. Often, the laptop disconnects, saying "network activation failed". According to the syslog it's tried three times to send auth to the mac address of the jolla. Switchin\ g off wlan on the computer, restarting the internet sharing on the phone, and restarting the computer wlan often gets me a connection. However, very often it drops agan, and quite frequently the phone suddenly reboots just after I've switched on internet sharing. This happens mostly (or maybe almost always) when I am travelling in public with many other devices in the vicinity which are also running access points. Is there some way of controlling the channel choice for the AP?

I have also noticed that sometimes the the status indicator goes on promptly when I switch on internet sharing on the phone, sometimes is flashes for quite a while before it goes on, and sometimes it flashes for quite a while and then goes off (and sometimes it flashes for a while and then the phone reboots). I'm not sure how to interpret this.

edit retag flag offensive close delete



you may try to restart networking on the Jolla phone via sailfish utitlities. Or you can use a USB connection, that should be more reliable

till ( 2016-08-24 11:21:42 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2016-08-24 23:50:57 +0200

tetris11 gravatar image

updated 2016-08-24 23:51:20 +0200

Here's what I do:

  1. Plug Jolla into laptop USB
  2. Select "Internet Sharing Mode" (install the package if you don't have this option)
  3. On Laptop run this script:

    dev=`ip a | grep -oP "(usb|enp0s[^ ]*)[0-9]"`
    echo "listen on $dev"
    sudo dhcpcd $dev
    sudo ip route del default via
  4. The terminal should keep printing something like "no route to host"

  5. On Jolla, with it still plugged in, and with the messages on the laptop still printing;

    a. Disable wifi

    b. Enable wifi

  6. Wait 10 seconds
  7. You should see the terminal on the laptop start printing "64 bytes from"
  8. Ctrl-C the terminal, you are now connected.
edit flag offensive delete publish link more


Could you explain roughly what you're doing, why it works and what condition it is addressing? I'm also failing to get reliable internet sharing with wifi and bluetooth - only usb is reliable, and some insight to why exactly this might be happening would be nice :)

moofang ( 2016-08-25 11:11:39 +0200 )edit

Ah my apologies, I thought the problem was USB sharing. This is all I've described above

tetris11 ( 2016-08-25 16:17:25 +0200 )edit

Which package should I install for "Internet Sharing Mode"? I tried

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

which resulted in

Fatal error: File './mw/armv7hl/usb-moded-connection-sharing-android-config-0.84.5-1.20.1.armv7hl.rpm' not found on medium ''

khul ( 2016-08-30 09:55:36 +0200 )edit

I have both usb-moded-connection-sharing-android-config and usb-moded-connection-sharing-android-connman-config installed. You may need to refresh your repos first to get them though zypper refresh

tetris11 ( 2016-08-30 10:16:58 +0200 )edit

I don't have zypper, but I discovered I don't need to install anything, just set ip forwarding on the jolla with

echo 1 > /proc/sys/net/ipv4/ip_forward


/sbin/iptables -t nat -A POSTROUTING -o rmnet0 -j MASQUERADE /sbin/iptables -A FORWARD -i rmnet0 -o rndis0 -m state --state RELATED,ESTABLISHED -j ACCEPT /sbin/iptables -A FORWARD -i rndis0 -o rmnet0 -j ACCEPT

and set the DNS server to use in the debian network manager (or by editing /etc/resolv.conf). So no need to install additional packages. This does indeed seem more reliable than the wlan connection, and I will use USB for now. However, I would prefer not to have to use a cable.

khul ( 2016-09-01 14:21:18 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2016-08-24 10:42:23 +0200

Seen: 503 times

Last updated: Aug 24 '16