Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2024 21:15:05 +0200
From:      Dirk-Willem van Gulik <dirkx@webweaving.org>
To:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Minor patch for ppp.conf
Message-ID:  <1101247A-CCE8-4FA1-A784-6A34261F0495@webweaving.org>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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 “internet” 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=123 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=1,\\\"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
[-- Attachment #2 --]
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><font face="Courier New">Minor patch for ppp.conf below. This makes the out of the&nbsp;</font><div><font face="Courier New">box u3g(4) config/command referred to from its manpage&nbsp;</font><span style="font-family: &quot;Courier New&quot;;">a&nbsp;</span></div><div><font face="Courier New">lot more usable out of the box.&nbsp;</font></div><div><font face="Courier New"><br></font></div><div><span style="font-family: &quot;Courier New&quot;;">Especially now &nbsp;</span><span style="font-family: &quot;Courier New&quot;;">that virtually everyone uses “internet” as&nbsp;</span></div><div><span style="font-family: &quot;Courier New&quot;;">the APN and&nbsp;</span><span style="font-family: &quot;Courier New&quot;;">Usernames/passwords are no longer required.</span></div><div><br></div><div><font face="Courier New">I would not mind some advice on the speed setting - as obviously&nbsp;</font></div><div><font face="Courier New">the card can handle a much higher baudrate; but AFAIK these</font></div><div><font face="Courier New">cannot be set from ppp.</font></div><div><font face="Courier New"><br></font></div><div><font face="Courier New">With kind regards,</font></div><div><font face="Courier New"><br>Dw.</font><div><font face="Courier New"><br>*** ppp.conf.orig	Wed Aug 14 21:03:58 2024<br>
--- ppp.conf	Wed Aug 14 21:09:40 2024<br>
***************<br>
*** 36,43 ****<br>
--- 36,61 ----<br>
&nbsp;&nbsp; add default HISADDR			# Add a (sticky) default route</font></div><div><font face="Courier New"><br>
&nbsp;&nbsp;
u3g:<br>
+&nbsp; # Configuration for the u3g(4) 3G and 4G datacards setup.<br>
+&nbsp; #<br>
+&nbsp; # Fill out the APN in below (often 'internet'). The PIN is<br>
+&nbsp; # assumed to be disabled (e.g. '0000'). If not; add a line<br>
+&nbsp; #&nbsp;&nbsp;</font></div><div><font face="Courier New">+&nbsp; # &nbsp; &nbsp; AT+CPIN=123 OK \<br>
+&nbsp; #<br>
+&nbsp; # Above the AT+CPIN? line in below dial string. Some providers<br>
+&nbsp; # also need an authname/authkey and/or a special phone number.<br>
+&nbsp; #<br>
&nbsp;&nbsp; set device /dev/cuaU0.0<br>
&nbsp;&nbsp; set phone *99\#<br>
+&nbsp; set speed 921600<br>
+&nbsp; set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"\" \<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AT OK-AT-OK \<br>
+&nbsp;</font><span style="font-family: &quot;Courier New&quot;;">&nbsp;</span><span style="font-family: &quot;Courier New&quot;;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-family: &quot;Courier New&quot;;">AT+CPIN? READY \</span></div><div><font face="Courier New">
+&nbsp;</font><span style="font-family: &quot;Courier New&quot;;">&nbsp;</span><span style="font-family: &quot;Courier New&quot;;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-family: &quot;Courier New&quot;;">AT+CSQ OK \</span></div><div><font face="Courier New">
+&nbsp;</font><span style="font-family: &quot;Courier New&quot;;">&nbsp;</span><span style="font-family: &quot;Courier New&quot;;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-family: &quot;Courier New&quot;;">AT+CGDCONT=1,\\\"IP\\\",\\\"&lt;your-providers-APN&gt;\\\" OK \</span></div><div><font face="Courier New">
+&nbsp;</font><span style="font-family: &quot;Courier New&quot;;">&nbsp;</span><span style="font-family: &quot;Courier New&quot;;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-family: &quot;Courier New&quot;;">ATDT\\T TIMEOUT 40 CONNECT"</span></div><div><font face="Courier New">
&nbsp;&nbsp; set timeout 0<br>
&nbsp;&nbsp; set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0<br>
&nbsp;&nbsp; add default HISADDR			# Add a (sticky) default route</font></div></div></body></html>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1101247A-CCE8-4FA1-A784-6A34261F0495>