Re: which in /dev/* for tethering to android?

2015-12-08 Thread Stuart Henderson
On 2015-12-07, 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.



Re: which in /dev/* for tethering to android?

2015-12-07 Thread luke350

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.  Maybe it would have been easier if 'man ifconfig'
said something like:  "If a device was not already automatically
created, see 'man hostname.if' for details."  So to that point it might
be good now, on the laptop side.

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.)

I probably won't be able to work on this more now, for a while. I'm
sending the reply in case anyone else gets stuck at the same point as I
did.

Thanks for the kind help.

-Luke



Re: which in /dev/* for tethering to android?

2015-11-28 Thread Jason Adams
On 11/28/2015 02:07 PM, luke...@onemodel.org wrote:
> Or, is the issue that I need to think differently about and somehow
> be using ifconfig, urndis, or umsm? 
How old is this phone?

Almost anything built in the last 3 years has wifi tethering built in.  Just 
turn that
on and connect to the phone's wifi hotspot. No wires.

-- 
Wait  Time is wasting.



Re: which in /dev/* for tethering to android?

2015-11-28 Thread Tati Chevron

On Sat, Nov 28, 2015 at 03:07:15PM -0700, luke...@onemodel.org wrote:

I know these scripts probably
lack important things, but I thought I should get a response
from the "ATZ" command before expecting anything else to work.


Are you able to issue AT commands to the device manually, using /usr/bin/tip?

--
Tati Chevron
Perl and FORTRAN specialist.
SWABSIT development and migration department.
http://www.swabsit.com



Re: which in /dev/* for tethering to android?

2015-11-28 Thread Jiri B
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.

It works, tested many times.

j.




Re: which in /dev/* for tethering to android?

2015-11-28 Thread Michael McConville
Jason Adams wrote:
> On 11/28/2015 02:07 PM, luke...@onemodel.org wrote:
> > Or, is the issue that I need to think differently about and somehow
> > be using ifconfig, urndis, or umsm? 
> 
> How old is this phone?
> 
> Almost anything built in the last 3 years has wifi tethering built in.
> Just turn that on and connect to the phone's wifi hotspot. No wires.

IIRC, there are issues with certain versions of OpenBSD DHCP clients
paired with certain versions of Android DHCP servers. I haven't had
problems for about a year, though.

Just a heads up.



Re: which in /dev/* for tethering to android?

2015-11-28 Thread Stuart Henderson
On 2015-11-28, luke...@onemodel.org  wrote:
> I'd like to get an internet connection via my android phone (on
> tmobile).

Two options:

- enable USB tethering, "dhclient urndis0".
- enable wifi hotspot and connect to it.