3

I'm trying to get an internet connection from my laptop via my SGS2. The phone is rooted, and I've tried two different WiFi tethering apps. I don't have a tethering plan (they want to charge me more than my home broadband!) so that's why I'm not using the native tether.

When my laptop connects to the WiFi hotspot, it fails to get an IP address. I guess this is due to the phone not running a DHCP server. I've tried the following:

  • Setting the IP of the interface to 192.168.1.99 and 10.0.0.99 (in case of standard /24 and /8 ranges) with x.x.x.1 as the default gateway.
  • The same as above, except with the public 3G internet-facing IP as the default gateway.
  • Setting the IP of the interface to the phone's public 3G internet-facing IP.

I've been unable to send ICMP pings to any IP address. I've also tried setting various DNS servers (private IPs, 8.8.8.8, etc.) but can't resolve any host names. It's like the traffic just gets black-holed at the phone.

Any ideas? I'd be happy to go with a USB tether, but my plan doesn't cover that and I've yet to find an app that'll allow me to get round it.

5
  • With the hotspot enabled, have you checked what IP it is using -- or have you simply guessed the 192.168.1.99 and 10.0.0.99 addresses? OS Monitor is one of the apps showing you all interfaces and their current settings, when in doubt.
    – Izzy
    Apr 22, 2013 at 22:18
  • I guessed the 192.168.1.0/24 and 10.0.0.0/8 ranges, and you were 100% right - I got them wrong. Don't know why I never considered running ifconfig wlan0 on the device - it was running on 192.168.43.0/24. A little annoying that the app didn't tell me which IP to use though...
    – Polynomial
    Apr 22, 2013 at 22:34
  • LOL Yeah, I didn't want to suggest that -- though I should have guessed you are familiar with the command line :) So did that solve your issue, so I should make it an answer for others to find? (And btw: I find it very annoying that it cannot be configured. I'd like to fix it to a given network, so I've not to pray it won't switch the next time...)
    – Izzy
    Apr 22, 2013 at 22:36
  • @Izzy Yup, solved it. Add an answer and I'll accept it. And I absolutely agree that it should be configurable. FoxFi seems rather limited in that regard, but at least it works. I believe that Barnacle does allow for such configuration, but it doesn't seem to work on my device due to problems starting the driver.
    – Polynomial
    Apr 22, 2013 at 22:42
  • Glad I was able to help - and thanks for the upvote :)
    – Izzy
    Apr 22, 2013 at 22:59

1 Answer 1

1

You should first check which IP address (and network) your hotspot is using. From the (e.g. using a app like Android Terminal Emulator or adb shell) you can figure this out with the command

ifconfig wlan0

If you rather want to avoid the command line, or your device uses womething other than wlan0 for the interface and you want to avoid guessing, OS Monitor is an app which tells you all the necessary details for each interface as well.

Once you've found out the correct data, you can specify those on your laptop: Use the IP of the interface for the gateway, and take network and mask accordingly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .