[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian xfce network tethering an SGS2



On 12/1/13, Ron Leach <ronleach@tesco.net> wrote:
> On 29/11/2013 20:10, Reco wrote:
>> You need to configure /etc/network/interfaces. Something along the
>> lines of (assuming you've already setup DHCP server on your phone):
>>
>> allow-hotplug usb0
>> iface usb0 inet dhcp
>
> Tried this, and Debian responded well each time I plugged and
> unplugged the phone.

What do you mean "responded well"?
Do you mean the internet worked for you?

> #ifconfig usb0
>
> gave more details, including an IPv4 address (and another IPv6), but
> no gateway was listed, nor DNS servers.  (Maybe they are not normally
> listed, even on active interfaces.)

They are not. Run the following commands to find out about these things:
man route # eg run route -n
man resolv.conf # eg run cat /etc/resolv.conf

> #ifup usb0
> replied with
> ifup: interface usb0 already configured
> so that command was not necessary in this case - the automatic up/down
> seems to be working correctly.

Yes, that's what I hinted at. The line "allow-hotplug usb0" makes it
automatic (unless something goes wrong).

> # ping www.google.com
> failed, but worked when typed into a terminal app on the phone.

OK, so internet did not work.

> # route
> revealed that the laptop was still using the gateway setting, and DNS
> settings, that are used whenever eth0 is up.

Are you able to attach your /etc/network/interfaces file?

Are you able to configure eth0 using allow-hotplug option?

Are you trying to access internet through BOTH eth0 and usb0, at the
same time, eg doing channel bonding?

Is eth0 a static or dynamic configuration?

Why do you still have eth0 enabled, when you are trying to connect to
internet through phone with usb0?

> wicd showed eth0 disconnected, but I issued
> #ifdown eth0
> to be sure. Nevertheless,

May be do that before plugging phone in.

> # route
> still showed that the normal gateway and DNS settings used on our LAN
> were still set.

after re-plugging (or disable/enable usb tethering) on the phone?

>> allow-hotplug usb0
>> iface usb0 inet static
>>      address 192.168.55.230  # manually set the address given
>>      netmask 255.255.255.0 # as reported by ifconfig
>>      gateway 192.168.55.1 # other end of USB as reported by ARP
>         network 192.168.55.0 # added because eth0 had this
>         broadcast 192.168.55.255 # added because eth0 had this
>>      dns-nameservers 8.8.4.4 # google DNS server

If the above is a new attempt by you to configure things (eg using
static instead of dynamic/dhcp), then you should remove the ">"
characters at front of every line, otherwise it looks like you are
simply replying to someone else, and we don't see that you are
provided some new test data re your problem.

> I think Debian is working correctly - at least, all the settings look
> correct.  At this stage, I conclude that the SGS2 is not functioning
> completely, in particular:
>
> (a) SGS2 DHCP does not issue a gateway or dns server address, and
> (b) its NAT function does not forward from tethered devices, onto its
> own upstream connection.

What menu option sequence are you using to
enable USB _tethering_ on your SGS2?
Please list your steps in detail.

> Unless anyone thinks there is more I could do in Wheezy to make this
> work, I'll concentrate on confirming the functionality of tethering
> and NAT in Android on SGS2; there may be an app which plugs these gaps.

As above, how are you enabling tethering on the phone?

> Reco, thank you for your clear advice, which was helpful. Zenaan, you
> also contributed in the thread and seemed to report success; were you
> able to test that devices tethered to the Samsung Galaxy S2 could not
> only be attached and 'see' a usb connection, but could also reach
> external internet through it?

Yes. My apologies if my statements were unclear on this fact. Wireless
tethering worked for me from SGS2 to a wheezy laptop, and a sid
laptop; USB tethering worked for me from SGS2 to the same wheezy
laptop (didn't test the sid laptop).

> If so, could you say what Android
> version the phone you tested with is using?

Possibly can let you know in time...

However, there are two areas for configuration of wireless on the SGS2
that I was setting up in this case (one to use wireless, one to
provide wireless tethering - ie to establish the phone as a wireless
hotspot for other devices). And it is on this tethering option screen,
that there were 3 tethering options:
a) wireless, which can be enabled at will,
b) USB tethering which could NOT be enabled until AFTER the usb cable
had been connected to the laptop, and
c) bluetooth tethering, which I assume is similar to wireless
tethering, but I didn't try, since the phone-owner's preference was to
use USB tethering anyway, to avoid the microwave radiation from the
wireless option (but the wireless was a backup I wanted to test).

Good luck,
Zenaan


Reply to: