Ask / Submit

[Bug] usb0 causing WiFi to fail due to IP conflict

asked 2014-05-27 05:34:25 +0200

d3Xt3r gravatar image

updated 2014-12-12 16:14:54 +0200

eric gravatar image

I'm not able to browse the web or connect to other devices on WiFi.

After I connect, I get an error message "Problem with connection" at the top of the screen.

I can ping my router (, but as soon if I ping an external IP, I get the message "connect: Network is unreachable". If I ping a PC within my network, I get "Destination Host Unreachable" If I ping from any PC to Sailfish (, I get the same message on the PC.

# ip route show
default via dev usb0 scope link dev usb0 proto kernel scope link dev wlan0 proto kernel scope link src dev wlan0 scope link

So it does look like a routing issue - default gateway is set to usb0 and there's probably an IP/subnet conflict as well. This would also explain why I'm able to connect just fine via other APs, as they are assigning a different IP (192.168.1.x / 10.10.1.x etc)

Now I could mess about with the routing table and the ip config and fix the issue temporarily, but I'd much rather:

a) Delete / disable usb0 permanently or b) Reconfigure usb0 with a different IP/subnet on bootup

I'm not too familiar with the internals of Sailfish, so could someone please help me set up the above?

Thanks in advance.

Device: Nexus 4 | Sailfish version: 1.0.5 | Kernel: 3.4.0-perf-ge1d9619

edit retag flag offensive close delete



Does this happen even when you have nothing connected to the USB plug, when no network connection should be active on it?

juiceme ( 2014-05-27 07:13:24 +0200 )edit

@juiceme: Yes.

d3Xt3r ( 2014-05-27 09:34:32 +0200 )edit

I wonder if network issues on switching between 3G/4G and Wifi are due to that kind of behaviour. We probably have a piece of solution here.

TNZ ( 2014-05-27 11:08:20 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2014-05-27 16:23:35 +0200

rainisto gravatar image

updated 2014-05-30 11:31:43 +0200

If you do not like the ip or want automatic gateway setting you can enable this by editing /etc/usb-moded/usb-moded.ini file

Add a network section as follows:

ip =
gateway =

Disclaimer: this will change in the future, and there will be a settings ui where you can set your custom ip-addresses. Or you could change your wlan AP not to use 192.168.2.x mask.

PS. This was for Jolla, dont know about Nexus.

edit flag offensive delete publish link more


There is already a UI for this, you can change it in the developer mode settings. However the problem here seems to be on the PC end as we do not give a gateway in developer mode.

But for some reason we are not using usb_moded yet on nexus 4 so I do not know where to fix this.

Philippe De Swert ( 2014-05-28 13:13:46 +0200 )edit

@rainisto: Thanks, but that didn't work. ifconfig still says usb0 is on

@Philippe De Swert: There is a UI indeed, but that doesn't seem to do anything. I can make the changes to the IP there but it reverts back to

d3Xt3r ( 2014-05-29 11:54:44 +0200 )edit

answered 2014-05-29 12:32:18 +0200

d3Xt3r gravatar image

Solved it!

I grep'd / for all files containing "" and found /init-debug

Edited the file, changed LOCAL_IP= to LOCAL_IP=, rebooted and viola, we're back in business!

Confirmed via ifconfig. GUI no longer shows "Problem with connection". All network functions appear to be working normally.

Thanks everyone for your comments.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

1 follower


Asked: 2014-05-27 05:34:25 +0200

Seen: 432 times

Last updated: May 30 '14