From nobody Wed Aug 14 19:15:05 2024 X-Original-To: freebsd-hackers@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 4WkdLH6mC1z5Sgw5 for ; Wed, 14 Aug 2024 19:17:27 +0000 (UTC) (envelope-from dirkx@webweaving.org) Received: from weser.webweaving.org (weser.webweaving.org [148.251.234.232]) (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-signature ECDSA (P-384) client-digest SHA384) (Client CN "weser.webweaving.org", Issuer "E6" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WkdLH22bzz45Z1 for ; Wed, 14 Aug 2024 19:17:27 +0000 (UTC) (envelope-from dirkx@webweaving.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=webweaving.org header.s=shared header.b=RRL+pATJ; dmarc=pass (policy=none) header.from=webweaving.org; spf=pass (mx1.freebsd.org: domain of dirkx@webweaving.org designates 148.251.234.232 as permitted sender) smtp.mailfrom=dirkx@webweaving.org Received: from smtpclient.apple (fiber.static.cbizz.nl [185.142.248.117] (may be forged)) (authenticated bits=0) by weser.webweaving.org (8.18.1/8.18.1) with ESMTPSA id 47EJG7u2051926 (version=TLSv1.2 cipher=ECDHE-ECDSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 14 Aug 2024 21:16:10 +0200 (CEST) (envelope-from dirkx@webweaving.org) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=webweaving.org; s=shared; t=1723662970; bh=SmC3Muzj51Dksitk5s3FoB38Bjq8WEN1JG814xKN8oQ=; h=From:Subject:Date:To; b=RRL+pATJEyhGJhr5+9MDGi+mqa+Zhvup2Lkirg5Noj4JG5zNN0AY3mPF41s03pknK CeWMuEGH0WmnY/vsi+v/gMRmQd9cAUr3h7qRhjHRLdSzVTbub9brTsxfovWBiPByJL rtJSfbs1MgQdejj+yQkRgiwQTG5RWPjEjGe1W8ig= X-Authentication-Warning: weser.webweaving.org: Host fiber.static.cbizz.nl [185.142.248.117] (may be forged) claimed to be smtpclient.apple From: Dirk-Willem van Gulik Content-Type: multipart/alternative; boundary="Apple-Mail=_547775CF-7812-4002-8F10-0E53E6214E71" List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Minor patch for ppp.conf Message-Id: <1101247A-CCE8-4FA1-A784-6A34261F0495@webweaving.org> Date: Wed, 14 Aug 2024 21:15:05 +0200 To: FreeBSD Hackers X-Mailer: Apple Mail (2.3774.600.62) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (weser.webweaving.org [148.251.234.232]); Wed, 14 Aug 2024 21:16:10 +0200 (CEST) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[webweaving.org,none]; R_SPF_ALLOW(-0.20)[+mx:c]; R_DKIM_ALLOW(-0.20)[webweaving.org:s=shared]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DKIM_TRACE(0.00)[webweaving.org:+]; HAS_XAW(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~] X-Rspamd-Queue-Id: 4WkdLH22bzz45Z1 --Apple-Mail=_547775CF-7812-4002-8F10-0E53E6214E71 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Minor patch for ppp.conf below. This makes the out of the=20 box u3g(4) config/command referred to from its manpage a=20 lot more usable out of the box.=20 Especially now that virtually everyone uses =E2=80=9Cinternet=E2=80=9D = as=20 the APN and Usernames/passwords are no longer required. I would not mind some advice on the speed setting - as obviously=20 the card can handle a much higher baudrate; but AFAIK these cannot be set from ppp. With kind regards, Dw. *** ppp.conf.orig Wed Aug 14 21:03:58 2024 --- ppp.conf Wed Aug 14 21:09:40 2024 *************** *** 36,43 **** --- 36,61 ---- add default HISADDR # Add a (sticky) default route u3g: + # Configuration for the u3g(4) 3G and 4G datacards setup. + # + # Fill out the APN in below (often 'internet'). The PIN is + # assumed to be disabled (e.g. '0000'). If not; add a line + # =20 + # AT+CPIN=3D123 OK \ + # + # Above the AT+CPIN? line in below dial string. Some providers + # also need an authname/authkey and/or a special phone number. + # set device /dev/cuaU0.0 set phone *99\# + set speed 921600 + set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ + \"\" \ + AT OK-AT-OK \ + AT+CPIN? READY \ + AT+CSQ OK \ + AT+CGDCONT=3D1,\\\"IP\\\",\\\"\\\" OK \ + ATDT\\T TIMEOUT 40 CONNECT" set timeout 0 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add default HISADDR # Add a (sticky) default route= --Apple-Mail=_547775CF-7812-4002-8F10-0E53E6214E71 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Minor patch for ppp.conf below. This makes the out = of the 
box u3g(4) = config/command referred to from its manpage a 
lot more = usable out of the box. 

Especially now  that virtually everyone uses =E2=80=9Cinternet=E2= =80=9D as 
the APN and Usernames/passwords are = no longer required.

I would not mind some advice on the speed setting - as = obviously 
the card can = handle a much higher baudrate; but AFAIK these
cannot be set from ppp.

With kind regards,

Dw.

*** ppp.conf.orig = Wed Aug 14 21:03:58 2024
--- ppp.conf Wed Aug 14 21:09:40 2024
***************
*** 36,43 ****
--- 36,61 ----
   add default HISADDR # Add a (sticky) = default route

   u3g:
+  # Configuration for the u3g(4) 3G and 4G datacards setup.
+  #
+  # Fill out the APN in below (often 'internet'). The PIN is
+  # assumed to be disabled (e.g. '0000'). If not; add a line
+  #  
+  #     AT+CPIN=3D123 OK \
+  #
+  # Above the AT+CPIN? line in below dial string. Some = providers
+  # also need an authname/authkey and/or a special phone = number.
+  #
   set device /dev/cuaU0.0
   set phone *99\#
+  set speed 921600
+  set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
+            \"\" \
+            AT OK-AT-OK \
+ 
           AT+CPIN? READY = \
+            AT+CSQ OK = \
+            AT+CGDCONT=3D1,\\\"IP\\\",\\\"<your-providers-APN>\\\" = OK \
+            ATDT\\T TIMEOUT 40 = CONNECT"
   set timeout 0
   set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
   add default HISADDR # Add a (sticky) = default route
= --Apple-Mail=_547775CF-7812-4002-8F10-0E53E6214E71--