From nobody Tue Nov 14 12:20:05 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SV53X2K0bz50ksN for ; Tue, 14 Nov 2023 12:20:24 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailout.qeng-ho.org (mailout.qeng-ho.org [217.155.128.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SV53X0RKXz4dSy for ; Tue, 14 Nov 2023 12:20:23 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Authentication-Results: mx1.freebsd.org; none Received: from [IPV6:2a02:8010:64c9:1::2] (unknown [IPv6:2a02:8010:64c9:1::2]) by mailout.qeng-ho.org (Postfix) with ESMTP id 817B5F9A28; Tue, 14 Nov 2023 12:20:15 +0000 (GMT) Message-ID: <091f7b66-ce45-4cf4-a4a9-6cd1de66c09b@qeng-ho.org> Date: Tue, 14 Nov 2023 11:20:05 -0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: USB tethering between FreeBSD and mobile phone (Debian OS) Content-Language: en-GB To: Alexander Burke , questions@freebsd.org Cc: Matthias Apitz References: <65b7ecef-b189-4350-a246-3cab934151fd@alexburke.ca> From: Arthur Chance In-Reply-To: <65b7ecef-b189-4350-a246-3cab934151fd@alexburke.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13037, ipnet:217.155.0.0/16, country:GB] X-Rspamd-Queue-Id: 4SV53X0RKXz4dSy 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