On 2015-12-07, luke...@onemodel.org <luke...@onemodel.org> wrote:
> On 11/28/15 15:15, Jiri B wrote:
>> On Sat, Nov 28, 2015 at 03:07:15PM -0700, luke...@onemodel.org wrote:
>>> I'd like to get an internet connection via my android phone (on
>>> tmobile).  After connecting the phone via usb and turning on its
>>> tethering option, I see the usb info in dmesg, but when I try to run
>>> the pppd chat script it doesn't get any response from the phone.
>>
>> Why do you do this? urndis is like ethernet iface, it is you phone
>> which establishes connection and acts as a gateway for your laptop.
>
> Thanks.  It seems the key part I didn't realize was where 'man urndis'
> mentions 'man ifconfig', which in turn mentions the hostname.if file:
> It seems that I needed to create that file, with one line
> saying 'dhcp' in it.

In case it's not clear, that isn't a literal ".if", it's replaced with the
interface name e.g. hostname.urndis0 - but it's only used automatically at
boot. If you wanted to configure it automatically at runtime you could use
hotplugd, though I think most people just run dhclient manually.

> But it disconnects after a couple of minutes, with android saying
> something about can't connect to data, but maybe that's something to do
> with android and I need to get a later cyanogenmod release and see if
> that helps, or something else phone-related.  (The data plan works fine
> w/ the built-in android browser.)

It works fairly reliably for me; if you want to isolate the mobile network
when testing, you could connect the phone to wifi then connect to that via
urndis. That'll help pinpoint the problem.

Reply via email to