From nobody Tue Nov 14 16:56:54 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 4SVCBk3XXVz51WWC for ; Tue, 14 Nov 2023 16:57:02 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SVCBk1JvHz4Nl5 for ; Tue, 14 Nov 2023 16:57:02 +0000 (UTC) (envelope-from guru@unixarea.de) Authentication-Results: mx1.freebsd.org; none Received: from [188.174.55.85] (helo=c720-1400094.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r2wif-0080TT-K8; Tue, 14 Nov 2023 17:56:57 +0100 Received: from c720-1400094.fritz.box (localhost [127.0.0.1]) by c720-1400094.unixarea.de (8.17.1/8.14.9) with ESMTP id 3AEGutlc002367; Tue, 14 Nov 2023 17:56:55 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by c720-1400094.fritz.box (8.17.1/8.14.9/Submit) id 3AEGusE7002366; Tue, 14 Nov 2023 17:56:54 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: c720-1400094.fritz.box: guru set sender to guru@unixarea.de using -f Date: Tue, 14 Nov 2023 17:56:54 +0100 From: Matthias Apitz To: Arthur Chance Cc: Alexander Burke , questions@freebsd.org Subject: Re: USB tethering between FreeBSD and mobile phone (Debian OS) Message-ID: Reply-To: Matthias Apitz References: <65b7ecef-b189-4350-a246-3cab934151fd@alexburke.ca> <091f7b66-ce45-4cf4-a4a9-6cd1de66c09b@qeng-ho.org> 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <091f7b66-ce45-4cf4-a4a9-6cd1de66c09b@qeng-ho.org> X-Operating-System: FreeBSD 14.0-CURRENT r1400094 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.55.85 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:42730, ipnet:178.254.0.0/19, country:DE] X-Rspamd-Queue-Id: 4SVCBk1JvHz4Nl5 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.