Re: USB tethering between FreeBSD and mobile phone (Debian OS)

From: Arthur Chance <freebsd_at_qeng-ho.org>
Date: Tue, 14 Nov 2023 12:20:05 UTC
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.

-- 
We build our computer systems the way we build our cities; over time,
without a plan, on top of ruins.
			— Ellen Ullman