Ask / Submit
2

[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 (192.168.2.1), 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 (192.168.2.53), I get the same message on the PC.

# ip route show
default via 192.168.2.1 dev usb0 scope link
192.168.2.0/24 dev usb0 proto kernel scope link
192.168.2.0/24 dev wlan0 proto kernel scope link src 192.186.2.53
192.168.2.1 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

Comments

1

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
0

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 192.168.2.15 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:

[network]
ip = 10.0.0.2
gateway = 10.0.0.1

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

Comments

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 192.168.2.1

@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 192.168.2.1.

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

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

d3Xt3r gravatar image

Solved it!

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

Edited the file, changed LOCAL_IP=192.168.2.1 to LOCAL_IP=10.0.0.2, 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

Follow
1 follower

Stats

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

Seen: 432 times

Last updated: May 30 '14