Hotplug USB teethering using an Android phone

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Hotplug USB teethering using an Android phone

Jean-Michel Pouré

Dear all,

First, I would like to thank you all for the hard work over OpenBSD
over the years.

My question is about USB teethering using an Android phone. I would
like to mount urdnis0 and dhcp interface as soon as the phone is
connected.

urdnis is configured as follows:

$cat /etc/hostname.urndis0
up
dhcp

hotplugd is running as follows:

$cat /etc/hotplug/attach                                                      
#!/bin/sh
 
DEVCLASS=$1
DEVNAME=$2
 
case $DEVCLASS in
3)
        # network devices; requires hostname.$DEVNAME
        sh /etc/netstart $DEVNAME
        ;;
esac

Do you know why dhcpclient is not triggered over phone usb connection?

Kind regards,
--
Jean-Michel Pouré <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Hotplug USB teethering using an Android phone

Alexander Hall


On January 15, 2018 9:10:12 AM GMT+01:00, "Jean-Michel Pouré" <[hidden email]> wrote:

>
>Dear all,
>
>First, I would like to thank you all for the hard work over OpenBSD
>over the years.
>
>My question is about USB teethering using an Android phone. I would
>like to mount urdnis0 and dhcp interface as soon as the phone is
>connected.
>
>urdnis is configured as follows:
>
>$cat /etc/hostname.urndis0
>up
>dhcp
>
>hotplugd is running as follows:
>
>$cat /etc/hotplug/attach                                              
>      
>#!/bin/sh
>
>DEVCLASS=$1
>DEVNAME=$2
>
>case $DEVCLASS in
>3)
>        # network devices; requires hostname.$DEVNAME
>        sh /etc/netstart $DEVNAME
>        ;;
>esac
>
>Do you know why dhcpclient is not triggered over phone usb connection?

Maybe

# chmod +x /etc/hotplug/attach

If not, try

logger "attach $*" or somesuch in the script, to see if it is run at all.

/Alexander

Reply | Threaded
Open this post in threaded view
|

Re: Hotplug USB teethering using an Android phone

Edgar Pettijohn III-2
In reply to this post by Jean-Michel Pouré

On Jan 15, 2018 12:25 PM, Alexander Hall <[hidden email]> wrote:

>
>
>
> On January 15, 2018 9:10:12 AM GMT+01:00, "Jean-Michel Pouré" <[hidden email]> wrote:
> >
> >Dear all,
> >
> >First, I would like to thank you all for the hard work over OpenBSD
> >over the years.
> >
> >My question is about USB teethering using an Android phone. I would
> >like to mount urdnis0 and dhcp interface as soon as the phone is
> >connected.
> >
> >urdnis is configured as follows:
> >
> >$cat /etc/hostname.urndis0
> >up
> >dhcp
> >
> >hotplugd is running as follows:
> >
> >$cat /etc/hotplug/attach                                              
> >     
> >#!/bin/sh
> >
> >DEVCLASS=$1
> >DEVNAME=$2
> >
> >case $DEVCLASS in
> >3)
> >        # network devices; requires hostname.$DEVNAME
> >        sh /etc/netstart $DEVNAME

sh /etc/"$DEVNAME"0

maybe

> >        ;;
> >esac
> >
> >Do you know why dhcpclient is not triggered over phone usb connection?
>
> Maybe
>
> # chmod +x /etc/hotplug/attach
>
> If not, try
>
> logger "attach $*" or somesuch in the script, to see if it is run at all.
>
> /Alexander
>
Reply | Threaded
Open this post in threaded view
|

Re: Hotplug USB teethering using an Android phone

Edgar Pettijohn III-2
In reply to this post by Jean-Michel Pouré

On Jan 15, 2018 1:42 PM, [hidden email] wrote:

>
>
> On Jan 15, 2018 12:25 PM, Alexander Hall <[hidden email]> wrote:
> >
> >
> >
> > On January 15, 2018 9:10:12 AM GMT+01:00, "Jean-Michel Pouré" <[hidden email]> wrote:
> > >
> > >Dear all,
> > >
> > >First, I would like to thank you all for the hard work over OpenBSD
> > >over the years.
> > >
> > >My question is about USB teethering using an Android phone. I would
> > >like to mount urdnis0 and dhcp interface as soon as the phone is
> > >connected.
> > >
> > >urdnis is configured as follows:
> > >
> > >$cat /etc/hostname.urndis0
> > >up
> > >dhcp
> > >
> > >hotplugd is running as follows:
> > >
> > >$cat /etc/hotplug/attach                                              
> > >     
> > >#!/bin/sh
> > >
> > >DEVCLASS=$1
> > >DEVNAME=$2
> > >
> > >case $DEVCLASS in
> > >3)
> > >        # network devices; requires hostname.$DEVNAME
> > >        sh /etc/netstart $DEVNAME

Sorry
sh /etc/netstart "$DEVNAME"0

> maybe
> > >        ;;
> > >esac
> > >
> > >Do you know why dhcpclient is not triggered over phone usb connection?
> >
> > Maybe
> >
> > # chmod +x /etc/hotplug/attach
> >
> > If not, try
> >
> > logger "attach $*" or somesuch in the script, to see if it is run at all.
> >
> > /Alexander
> >