Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2023 17:56:54 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        Arthur Chance <freebsd@qeng-ho.org>
Cc:        Alexander Burke <alex@alexburke.ca>, questions@freebsd.org
Subject:   Re: USB tethering between FreeBSD and mobile phone (Debian OS)
Message-ID:  <ZVOm1vDEYf9HUril@c720-1400094.fritz.box>
In-Reply-To: <091f7b66-ce45-4cf4-a4a9-6cd1de66c09b@qeng-ho.org>
References:  <ZVMO/8ord7UwUxnz@pureos> <65b7ecef-b189-4350-a246-3cab934151fd@alexburke.ca> <091f7b66-ce45-4cf4-a4a9-6cd1de66c09b@qeng-ho.org>

next in thread | previous in thread | raw e-mail | index | archive | help
El día martes, noviembre 14, 2023 a las 11:20:05a. m. -0100, Arthur Chance escribió:

> On 14/11/2023 08:27, Alexander Burke wrote:
> > Hi Mathias,
> > 
> > I added a single line in `/etc/rc.conf` to take care of this
> > automagically when I need to tether via USB to my Pixel running
> > GrapheneOS (which also produces a `ue0` interface on the FreeBSD side):
> > 
> > ifconfig_ue0="up SYNCDHCP"
> > 
> > IIRC, I found this solution here:
> > https://forums.freebsd.org/threads/wireless-setup-and-syncdhcp.41488/
> > 
> > I'm usually not tethering so it thus causes a slight delay at boot
> > because the interface isn't up at that point and boot is paused until
> > this times out, but it causes `dhclient` to remain running and fetch an
> > address whenever it does come up.
> > 
> > It's possible this isn't the best way to do it; perhaps others can chime
> > in to improve further on this implementation.
> 
> I've never used tethering so this is just a suggestion, but isn't this
> the sort of thing that ought to be handled by devfs with a conf file in
> /etc/devd. Have a rule that notices when ue0 attaches (and possibly on
> detaching as well) and Do The Right Thing at that point.

I've checked the log file on the mobile phone in /var/log/syslog. The
phone's NetworkManager sees the carrier on usb0 and waits 45 secs for
DHCP requests being fulfilled. This way it works also fine with the
MacBook as laptop. There is running some DHCP server on interface en7
and the mobile gets it IP addr from it.

I will start my poudriere oven to compile the port net/isc-dhcp44-server.

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

I am not at war with Russia.
Я не воюю с Россией.
Ich bin nicht im Krieg mit Russland.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZVOm1vDEYf9HUril>